[Gdal-dev] Coordinate transform problem

Chapman, Martin MChapman at sanz.com
Sat Oct 16 17:47:54 EDT 2004


Frank,

Ok, that makes sense, but I am a little at a loss at how to use the
transform method then.  Previously, I used the Inverse and Forward calls
for each point, which let me handle "bad points" on a case by case
basis, thus allowing me to convert as many coordinates as feasible...a
kind of test the limit as you go type algorithm.  I could resort back to
that, but in essence then I am rewriting the Transform method.  Would it
make sense for me to modify or extend the Transform function to do this.
In other words, maybe add another optional parameter to Transform that
tells the function to drop bad points, or something like that.  Is that
a flawed strategy?  The problem with the way Transform works now is that
I have to scrub my points up front, not, really knowing what points will
process correctly and what ones won't, which leads to several
inefficiencies.  What did you mean by "error tolerance"?

Thanks for your help,
Martin

-----Original Message-----
From: Frank Warmerdam [mailto:warmerdam at pobox.com] 
Sent: Saturday, October 16, 2004 3:30 PM
To: Chapman, Martin
Cc: gdal-dev at remotesensing.org
Subject: Re: [Gdal-dev] Coordinate transform problem


Chapman, Martin wrote:
> Ok, I figured it out.  I had numerous things wrong in my code outside
> this function.  I still have one problem though.  The Transform method

> of the OGRCoordinateTransformation class doesn't like it when I pass
in 
> coordinates that are outside the valid limit for certain projections 
> (i.e. Mercator).  My new question is, how do I calculate what the
valid 
> limits are for a projection like mercator?  Is it a matter of 
> subtracting False Easting and Northing or something like that?  Any
help 
> on understanding how to calculate these limits for a projection would
be 
> much appreciated.

Martin,

I am not aware of any systematic way of determining bounds of validity
for projections.  Note that in many cases the projectinos equations
degrade gradually so there is no obvious bound.  It depends on your
error tolerance.  But even at that, there is no GDAL/OGR/PROJ support
for determining error or regions of appropriateness.

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