[Gdal-dev] Datum shifting

Ed McNierney ed at topozone.com
Wed Dec 10 22:23:11 EST 2003


Hank -

Just to double-check Frank's question, are all the data points in that
file within the continental US?

	- Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com
ed at topozone.com


-----Original Message-----
From: Grabowski, Hank [mailto:hgrabows at stk.com] 
Sent: Wednesday, December 10, 2003 6:59 PM
To: gdal-dev at remotesensing.org
Subject: RE: [Gdal-dev] Datum shifting

The only data files I have in my "nad" directory, which is mapped to the
environment variable as I stated below, are the ones that came with the
standard windows library zip file "proj446_win32_bin.zip" that I got
from http://remotesensing.org/proj/.  These all seem to be binary files.
When I put debug mode on I did get a weird additional error:

pj_open_lib(conus): call
fopen(C:\perforce\data\main\STKData\CentralBodies\Earth
\nad/conus).
ERROR 1: no system list, errno: 2

There is a file called conus.lla, and naming a copy of that file t
"conus" fixed that problem (if it was one at all).  After that, I get
the exact same debugging messages as I did before:

pj_open_lib(conus): call
fopen(C:\perforce\data\main\STKData\CentralBodies\Earth
\nad/conus).
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

I suppose I'm going to have to compile and see what is going on.

Hank Grabowski
hgrabowski at stk.com
1-610-578-1000
------------------------------------------------------------------------
----------
Experience the analysis and visualization power of STK 5.0 by upgrading
today! Order your free copy at http://www.stk.com to get started!



-----Original Message-----
From: Frank Warmerdam [mailto:warmerdam at pobox.com]
Sent: Wednesday, December 10, 2003 3:46 PM
To: gdal-dev at remotesensing.org
Subject: Re: [Gdal-dev] Datum shifting


> 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


_______________________________________________
Gdal-dev mailing list
Gdal-dev at remotesensing.org
http://remotesensing.org/mailman/listinfo/gdal-dev
_______________________________________________
Gdal-dev mailing list
Gdal-dev at remotesensing.org
http://remotesensing.org/mailman/listinfo/gdal-dev




More information about the Gdal-dev mailing list