How to write a matrix into Geotiff file?

조회 수: 5 (최근 30일)
Leon
Leon 2015년 5월 27일
댓글: Waqas Ahmad 2017년 8월 22일
The instruction provided by Mathworks says this "geotiffwrite(filename,A,R) writes a georeferenced image or data grid, A, spatially referenced by R, into an output file, filename."
My question is what exactly is R?
I have a matrix Z the size of 181 x 361, and I want to save it as a Geotiff file so that my friend can read it into ArcGIS. I tried
geotiffwrite('a.tif', Z, size(Z))
and it did not work;
  댓글 수: 1
Waqas Ahmad
Waqas Ahmad 2017년 8월 22일
R is a georeferencing matrix which specifies the position of your grtid (matrix Z) on the world map when you open the geotif in arcgis. See refmatToGeoRasterReference documentation https://kr.mathworks.com/help/map/ref/refmattogeorasterreference.html

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

답변 (1개)

Dasharath Gulvady
Dasharath Gulvady 2015년 5월 28일
According to the documentation R is:
spatialref.GeoRasterReference object, referencing matrix, or referencing vector; or spatialref.MapRasterReference object or referencing matrix. Provides spatial referencing information.
You may use "georasterref" to create a reference matrix from your matrix.

카테고리

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