[Gdal-dev] Re: OGRCoordinateTransformation::Transform problem

Patrick Dooley pdooley at pyxisinnovation.com
Fri Oct 8 09:58:44 EDT 2004


"Frank Warmerdam" <warmerdam at pobox.com> wrote in message
news:41660E31.7080906 at pobox.com...
> Patrick Dooley wrote:
> > I have two issues.  I would first like to set up a geocentric
> > OGRSpatialReference source as opposed to any specific datum.
>
> Patrick,
>
> While the underlying PROJ.4 library supports geocentric coordinate
> systems, it appears I have not propagated that support into the
> OGRSpatialReference at this time.
>
> > I am currently attempting to convert WGS84 lat lon coordinates to UTM
> > coordinates.  However when the lat lon coordinates falls outside the
> > valid range of the UTM zone,  I get invalid utm coordinates.  However
> > the transform() method reports through its error handling that the
> > conversion was successfull.
>
> The transverse mercator math used in PROJ.4 degrades very seriously
> when you get far away from the central meridian (say 30 degrees for
> instance).  How far out of the zone are you?
>
> In situations where the accuracy of the math degrades but can still
> be evaluated the projection operation will generally seem to succeed
> even if the results may not be very useful.
>
Dear Frank,

I could be way out,  I am essentially walking the globe and attempting to
try to convert these various points to the utm points.

> > I did think of doing the inverse conversion to see if the resulting lat
> > lon coordinates match the input, but that is a hack.  I was hoping that
> > there might be a isValidPoint() method on the OGRSpatialReference object
> > but I didn't find any.
>
> I'm afraid not.  Your suggestion of projecting back is a respectible
> (if hacky) way of identifying whether the equations have broken down
> pretty badly.
>
> You might also want to raise this issue on the PROJ.4 list where you
> will find folks with a deeper understanding of the projection issues.

Is there an easy way to get the geocentric lat lon limits of an
OGRSpatialReference object.  This way I could do a sanity check before
attempting to do the conversion?

Thanks for the fast response.
>
> 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