[Gdal-dev] OGR, PROJ.4, and handling of Datum

Ben Discoe ben at vterrain.org
Wed Apr 16 22:57:27 EDT 2003


> -----Original Message-----
> From: Ed McNierney
>
> While it might seem "quite reasonable" to think 7 degrees North, 81
> degrees West is covered by NAD27, it's not there.  So the first issue is
> that your datum shift effort should not ever succeed, because the input
> value is undefined (outside valid domain).

Hmmmmm...  i have this message from the person who provided the Panama data:
"I have two sources of data..  The basemaps down there are 1960's vintage US
Army, and are clearly labeled NAD27 / Clark 1866 spheroid, UTM Zone 17."

So perhaps there is such as a thing as NAD27 for Panama, and we (users of
PROJ) simply lack a Datum shift file for it.

> You didn't describe exactly what OGR does, other than give "bogus"
> results.  Can you give us a bit more detail?  Thanks!

Correct output for the UTM point is around: (-81.8, 7.7)
The resulting OGRCoordinateTransformation is producing: (-1.42, 0.13)

Eeek, i just realized that it's incorrect to point the finger at OGR's
successful creation of a transformation - the failure isn't until the
Transform, and Transform is indeed return 0 to indicate an error for the
point lying outside its known Datum conversion space.  What was throwing me
off is that although it returns 0 to indicate error, it *also* modifies the
values passed in by pointer, as if it was succeeding :)

-Ben




More information about the Gdal-dev mailing list