How to Export Contour Plot as Shape File if Output is of Data Type 'Double'?

3 ビュー (過去 30 日間)
Michelle De Luna
Michelle De Luna 2020 年 1 月 23 日
回答済み: Walter Roberson 2020 年 1 月 23 日
Good morning!
I'm trying to export a contour plot as a shapefile. However, there seems to be a problem with the shapewrite function. The error reads, "error using shapewrite: expected input number 1, S, to be one of these types: struct, mappoint, geopoint, mapshape, geoshape. Instead its type was double." The second error reads, "error in shapewrite>parseInputs (line 639) validateattributes(S,...)." The last error reads, "error in shapewrite (line 80) [S, basename, dbfspec] = parseInputs(varargin{:})."
My initial code is:
shape = ncread('file.nc', 'var', [1,1,1], [inf,inf,1])
contourf(var')
x = contourf(var')
shapewrite(x, 'var.shp')
Note: the first two lines of code produce the contour plot and the last two lines are my attempt to convert the contour plot to a shapefile.
Again, I am trying to convert the contour plot to a shapefile so that I can work with the SHP in ArcGIS. Any help would be greatly appreciated. Thank you in advance!

採用された回答

Walter Roberson
Walter Roberson 2020 年 1 月 23 日
https://www.mathworks.com/matlabcentral/answers/358316-how-can-i-export-a-matlab-contour-as-a-polygon-shapefile

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeContour Plots についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by