MATLAB Answers

0

Parse WKT projection files and use them for raster reference

Asked by Andrea Vaccari on 7 Oct 2015
Latest activity Answered by Anna Weeks on 24 Aug 2018
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!

  0 Comments

Sign in to comment.

1 Answer

Answer by Anna Weeks on 24 Aug 2018

I have used the following code to parse a WTK Projection file.

  0 Comments

Sign in to comment.