EPSG code lookup for geotiffwrite
조회 수: 10 (최근 30일)
이전 댓글 표시
I have a geotiff read into matlab and with this is R.ProjectedCRS describing the projected coordinate system.
My question is, when writing a new image using geotiffwrite how can I determine the required EPSG code in an automated way .
For example
geotiffwrite(['filename.tif'],raster,R,'CoordRefSysCode',epsgCode);
I had hoped that the EPSG code would be provided within R.ProjectedCRS, but there is only given a string providing the name of coordinate system (i.e., "WGS 84 / UTM zone 11N"). From this information, and using a method inherent to matlab, how can I look up the cooresponding EPGS code?
Thanks
댓글 수: 0
답변 (1개)
Vatsal
2024년 3월 25일
Hi,
I understand that you are seeking a method to automatically identify the EPSG code from a given projected coordinate system. In MATLAB, this can be achieved using the "wktstring" function, which will output the full CRS in WKT string form, the last ID tag in the WKT string is the 'CoordRefSysCode'.
Below is an example of how to use the function:
wktstring(R.ProjectedCRS,"Format","formatted")
For further details, you might find the following MathWorks documentation helpful:
I hope this helps!
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!