Parse WKT projection files and use them for raster reference
Show older comments
I'm working on a project where I use data within shapefiles to perform some calculation and the results are a series of arrays that I'd like to save a GeoTIFFs using the same projection information contained in the shapefiles .prj files.
Each shapefile comes with a projection file that is written in standard WTK format:
PROJCS["NAD_1983_UTM_Zone_10N",
GEOGCS["GCS_North_American_1983",
DATUM["D_North_American_1983",
SPHEROID["GRS_1980",6378137.0,298.257222101]
],
PRIMEM["Greenwich",0.0],
UNIT["Degree",0.0174532925199433]
],
PROJECTION["Transverse_Mercator"],
PARAMETER["False_Easting",500000.0],
PARAMETER["False_Northing",0.0],
PARAMETER["Central_Meridian",-123.0],
PARAMETER["Scale_Factor",0.9996],
PARAMETER["Latitude_Of_Origin",0.0],
UNIT["Meter",1.0]
]
What I'd like to do is:
- read the .prj file, import the projection information (does the mapping toolbox offer this capability? I couldn't find it...)
- use the imported data to specify the projection of the GeoTIFF (maprasterref?)
- save the GeoTIFF
Thanks!
Answers (1)
Anna Weeks
on 24 Aug 2018
0 votes
I have used the following code to parse a WTK Projection file.
Categories
Find more on Coordinate Reference Systems in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!