I'm using the gdal library via OSGeo for windows, and I was just wondering how to access the geotransform array for a .ecw file.
Answer
This can be found from gdalinfo, except it has three forms:
If rotation / shear coefficients (
adfGeoTransform[2]andadfGeoTransform[4]) are zero, the output is simplified:Origin = (%.15f,%.15f) % adfGeoTransform[0], adfGeoTransform[3]Pixel Size = (%.15f,%.15f) % adfGeoTransform[1], adfGeoTransform[5]If rotation / shear coefficients are non-zero, the full 6-coefficients are shown:
GeoTransform =%.16g, %.16g, %.16g % adfGeoTransform[0], adfGeoTransform[1], adfGeoTransform[2]%.16g, %.16g, %.16g % adfGeoTransform[3], adfGeoTransform[4], adfGeoTransform[5]If there is no GeoTransform information, then neither of the above two forms are shown.
The order of coefficients used by GDAL are important, and are documented here.
No comments:
Post a Comment