[Gdal-dev] Datum shifting

Frank Warmerdam warmerdam at pobox.com
Wed Dec 10 15:46:28 EST 2003


> ogr2ogr -t_srs WGS84 out.shp cities_alb.shp
> 
> However if I do the same thing with a shape file with its geometry in a
> NAD 1927 UTM Zone 16N projection I get the following result:
 >
> This command: ogr2ogr -t_srs WGS84 out.shp roads.shp
> 
> produces this error message:
> ERROR 1: failed to load NAD27-83 correction file
> Failed to transform feature 0.
> ERROR 1: Terminating translation prematurely after failed
> translation of layer roads


Hank,

I am not sure what is going wrong.  What I will note is that error
-38 from PROJ.4 (which is reported as "failed to load NAD27-83 correction file"
can be produced for a number of reasons, apparently including:

  o Not finding the datum shift file (any datum shift file, not just nad27/83
    ones for the US).
  o not having a shift file for the location you are attempting to translate
    (are your vectors all in the continental US?)
  o The file having a corrupt header as would occur if the binary version
    (nad27/83) was generated on a different platform.

Recent PROJ.4 source includes support for setting the PROJ_DEBUG environment
variable (to anything) to turn on some extra debug information in the
datum shift code.  You might want to try this.

You might want to debug into pj_apply_gridshift() if and below if you are
able to build proj.4 in debug.

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