How do I get the extent out of the GeoTiff format? I want something like this:
Extent(293518.1886150768,5680494.194041155,890338.5054657329,6267530.571271311)
AKA the xmin, xmax, ymin, ymax coordinates from the GeoTiff?
Edit: I'm implementing my own reader so I will need to know how the file format tells me this information.
Answer
The tags you're interested in are: ModelTiepointTag, ModelPixelScaleTag, and ModelTransformationTag. The specification describes how they stored the information:
http://www.remotesensing.org/geotiff/spec/geotiff2.6.html#2.6.1
You could have a look at how GDAL implements them in this file:
http://trac.osgeo.org/gdal/browser/trunk/gdal/frmts/gtiff/geotiff.cpp
No comments:
Post a Comment