[PROJ] Howto stop conversion when a point is outside a grid-shift file?

Even Rouault even.rouault at spatialys.com
Thu Jun 25 03:58:22 PDT 2020


On jeudi 25 juin 2020 12:02:16 CEST markus wrote:
> Hello,
> 
> in my case I have a point which is outside the grid-shift file.
> I would expect cs2cs to stop with an error message and/or set a
> return code.

You didn't specify which PROJ version you use, but I suspect this must be PROJ 4 or 5 from 
the debug traces.

With latest PROJ, it will return an error in that situation (at least on a case where I tried to 
simulate yours)

With PROJ master:

$ echo -50 -50 | cs2cs +proj=longlat +nadgrids=ntf_r93.gsb +to  +proj=longlat +nadgrids=null
*	* inf

vs PROJ 4.9.2

$ echo -50 -50 | cs2cs +proj=longlat +nadgrids=ntf_r93.gsb +to  +proj=longlat +nadgrids=null
50dW	50dS 0.000

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20200625/555f42df/attachment.html>


More information about the PROJ mailing list