[gdal-dev] ecw - file: wrong extent/corner coordinates

Even Rouault even.rouault at spatialys.com
Fri Oct 23 11:28:08 PDT 2015


> 
> content of 6617-04.eww:
> 
> 0.2
> 0.0
> 0.0
> -0.2
> 653750.1
> 169999.9
> 
> following geotransform item added to 6617-04.ecw.aux.xml:
> 
> <PAMDataset>
> 
> <SRS>PROJCS["MGI_BMNM34",GEOGCS["GCS_MGI",DATUM["M
> ilitar_Geographische_Institute",SPHEROID["Bessel_1841",63773
> 97.155,299.1528128]],PRIMEM["Greenwich",0.0],UNIT["Degree&qu
> ot;,0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAME
> TER["False_Easting",750000.0],PARAMETER["False_Northing&quot
> ;,-5000000.0],PARAMETER["Central_Meridian",16.333333333333],PARAM
> ETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin"
> ,0.0],UNIT["Meter",1.0]]</SRS>
> <GeoTransform>653750.1,0.2,0,169999.9,0,-0.2</GeoTransform>

--> This is not the more accurate translation from worldfile convention to GDAL 
convention. The coordinates of the top-left pixel in worldfiles are the center 
of pixel. In GDAL convention, it is the top-left corner of the top-left pixel, 
hence a half-pixel shift. So in GDAL, the GeoTransform should be:

<GeoTransform>653750,0.2,0,170000,0,-0.2</GeoTransform>

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list