[Gdal-dev] Trapping coordinate transformation errors gracefully
Frank Warmerdam
fwarmerdam at gmail.com
Mon Jan 10 19:55:26 EST 2005
On Tue, 11 Jan 2005 00:30:18 +0000, Tim Sutton <tim at linfiniti.com> wrote:
> Dear Frank
>
> Many thanks for your reply. I am still getting similar problems after
> following your suggestion...any other suggestions will be much appreciated.
> Also how do I use an error handler which does print to std::cout ?
>
> Many thanks for your help
Tim,
OK, there are a few issues here. One is the error handling. I
didn't see any output from the GDAL error code in your new output so
as far as i can tell the CPLQuietErrorHandler worked fine. If you want
to implement a custom error handler that is quite easy too. You might
want to read this over:
http://www.gdal.org/cpl__error_8h.html#a23
The second issue is that the transformation is failing sometimes. I
am assuming it is failing for decent reasons. If you believe that it is
not, let me know and we could likely dig into it.
Finally there is the crash, but as I mentioned, as far as I can tell
your application is crashing because you are throwing an exception
with no handler. That has nothing to do with me. If you don't want it
to crash either add an exception handler or stop throwing the
exception and fail out gracefully.
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