[Gdal-dev] OGRSpatialReference::GetTOWGS84()

Frank Warmerdam warmerdam at pobox.com
Fri Jan 13 17:34:32 EST 2006


On 1/13/06, Ian Britten <britten at caris.com> wrote:
> Hi all,
> I'm new to using OGR, and I'm trying to work out if I've encountered a
> bug, or whether I'm doing something wrong...
>
> [ FWIW, I'm using the gdal-1.2.5-2mdk RPM on a Mandriva Linux system. ]
>
> I'm:
>      1) Creating a OGRSpatialReference, using the default constructor
>      2) Setting it to be an EPSG system, using the importFromEPSG()
>         method.
>      3) Trying to get the WGS84 conversion parameters, using the
>         GetTOWGS84() method.
>
> All the steps succeed with no errors, except for the call to
> GetTOWGS84(), which fails with an OGRERR_FAILURE error.
>
> I've tried several different EPSG numbers, and they all seem to exhibit
> the same behaviour.  Note that the OSR built successfully, and other
> methods seem to be returning correct values (ie GetSemiMajor(),
> GetSemiMinor(), etc).
>
> After doing some further digging, I wondered if my problem may be
> similar to bug #784
> (http://bugzilla.remotesensing.org/show_bug.cgi?id=784)

Ian,

Like in bug 784, your problem is likely that there
is no TOWGS84 information.  Most datums extracted
from the EPSG database do not.

You might want to dump the WKT and verify there is
not WKT entry there.

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