Exporting matlab matrices to ESRI ArcMap

조회 수: 6 (최근 30일)
Sally
Sally 2011년 6월 20일
댓글: Matthew Cooper 2015년 10월 13일
I have a large (4499x1459) 2D matrix containing surface ocean current data, and want to create an ArcMap shapefile from the matrix NaN values (i.e. a land mask). I have a code which creates polygon vertices (lat, lon) for each NaN value cell, but this is taking too long to do for such a large matrix. Is there a way I can simply read the matlab matrix into ArcMap as a raster image, so I can then convert it to a vector format there?
I have had no luck with this in searches so far.
Thanks in advance.

채택된 답변

Walter Roberson
Walter Roberson 2011년 6월 20일
A thought: bwboundaries(isnan(YourMatrix)) would construct pixel lists; the pixel lists would be the vector coordinates. Not optimized to remove pixels that are in straight lines between pixels, but perhaps that is not needed at this time.
I do not know the performance of bwboundaries(), but it might be worth trying.
  댓글 수: 1
Sally
Sally 2011년 6월 21일
Hi Walter,
thanks for your answer, this gives me a boundary for my land mask very quickly. However, the results are not in a format I know how to use. Do you know how to then create a boundary file from the resulting image?
Thank you, Sally

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Rob Comer
Rob Comer 2011년 6월 21일
ArcGIS can read GeoTIFF format. If you have R2011a, perhaps you could write your ocean current grid to a GeoTIFF file using the Mapping Toolbox geotiffwrite function, then import it into ArcGIS. See:
  댓글 수: 2
Sally
Sally 2011년 6월 21일
Oh that looks amazing, unfortunately I don't have that version. I am using 2010b.
Thanks anyway Rob.
Matthew Cooper
Matthew Cooper 2015년 10월 13일
Also, it is not clear from the documentation how geotiffwrite handles NaN values - can you clarify? In my experience, when I use geotiffwrite to write Matlab matrices with NaN values into a .tif file, the NaN values are converted to NoData values such as -1.38E-38, however when I load the .tif's into ArcMap the NoData value is not recognized. Arc has tools for setting NoData, but they are in the Spatial Analyst toolbox that I do not have authorized.
Any idea how to solve that problem?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Data Import and Export에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by