[gdal-dev] Error while Warping GTiff to EPSG3763

Frank Warmerdam warmerdam at pobox.com
Wed May 5 10:00:08 EDT 2010

Franz Schiller wrote:
> Hello Frank. Did you manage to get any sucess with this?
> Thank you for your help


Sorry for the delay in responding.  I moved my household over the weekend,
and only got back on the net last night.   I have reproduced your problem
and come to the conclusion that it is due to an incomplete coordinate system
in your source file that is being misinterpreted.   The listgeo report looks

    Version: 1
    Key_Revision: 1.0
       ModelTiepointTag (2,3):
          0                0                0
          0                0                0
       ModelPixelScaleTag (1,3):
          0                0                0
       GTModelTypeGeoKey (Short,1): ModelTypeGeographic
       GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
       GeographicTypeGeoKey (Short,1): Unknown-65535
       GeogLinearUnitsGeoKey (Short,1): Linear_Meter
       GeogAngularUnitsGeoKey (Short,1): Linear_Meter
       ProjCoordTransGeoKey (Short,1): User-Defined

GDAL translates this to:

         SPHEROID["unretrievable - using WGS84",6378137,298.257223563]],

The key problem here is that the geographic coordinate system is not
being recognised as being in degrees, and so GDAL does not map it back
to radians before doing the transformation and things all go wrong.

The simple workaround is to include the "-s_srs WGS84" switch on the
commandline to override the source coordinate system and treat it as
normal WGS84.

gdalwarp -s_srs WGS84 -t_srs EPSG:3763 ROI_QB_MUL_2.tif out.tif

The geotags in the file are sufficiently malformed that I'm not
inclined to try and adjust how GDAL handles it.

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

More information about the gdal-dev mailing list