[Gdal-dev] Re: Transforming shapefiles from euref89 to ed50

Frank Warmerdam warmerdam at pobox.com
Wed Apr 21 09:41:25 EDT 2004


Jakob Simon-Gaarde/Trapsoft Inc wrote:
>>>>t=osr.CoordinateTransformation(sr_euref,sr_ed50)
>>>>t.TransformPoint(560728.35341,6079776.68768)
> 
> (560731.3203323764, 6079908.6868730783, 0.0)
> 
> should have been
> (560728.35341 ; 6079776.68768) -> (560808.942 ; 6079982.529)
> 
> Any ideas??

Jakob,

I'm not sure why there is the difference.  But note that the WKT
you are using does not include any information about datum shifts,
so I would presume only an ellipsoid change is taking place.

> By the way isn't there a collection of wkt-files somewhere that are
> garanteed correct?

There is (was?) a sample translation of the EPSG database
translated into WKT made available when the OGC Coordinate
Transformation Specification was released.  However, it is far
from guaranteed correct.  Datum shift parameters are particularly
problematic.  For instance, for NAD27 to NAD83 translation there
are many available known methods including various simple
approximations (TOWGS84 style) that can be applied in some
location area, and shift file based conversions.  My point is, that
knowing the datum you have doesn't mean there is one unique way to
convert to WGS84.  There are many, and that is a big problem in
doing EPSG to WKT conversions.

I believe the GML CRS spec avoids this issue by not allowing
specification of shift parameters with the datum ... just offload
to somewhere else.

> by the way the unnamed tool is ESRI MapObjects based.

I'm pretty sure the ESRI projection engine keeps track of a
set of datum shift information which it looks up based on the
datum name, but which isn't explicit in the WKT.  The
OGRSpatialReference does *not* do that lookup.  If the TOWGS84
parameters aren't in the WKT then they are not applied.   I imagine
that is the difference.

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