[Proj] What is the expected Proj4 result when an input is out of range?
Mikael.Rittri at carmenta.com
Fri Feb 23 08:27:52 EST 2018
I am confused about the result I get from the Proj4 inverse projection of Lambert Azimuthal Equal Area,
when the original projected input point is outside the valid circle.
I thought that in cases like these, the result point should have coordinates that are HUGE_VAL , that is, 1e+300.
There seems to be code in pj_inv.c that checks error conditions and sets coordinates to HUGE_VAL, but these
checks aren't triggered in my example.
Instead, my debugger says that I get a point with coordinates -nan(ind).
I suppose that is an Indefinite NaN. I am not too familiar with the various flavours of NaN, but it's certainly different from 1e+300.
Here is a concrete example that I have run in the console application, using Proj 4.9.3 and EPSG:3035 which is ETRS89 / LAEA Europe:
C:\> proj -I +init=epsg:3035
I think I remember that invalid coordinates are usually written as asterisks by the console application.
Avoiding the default DMS formatting of the output, I get the following instead:
C:\>proj -I +init=epsg:3035 -f "%.5f"
So my question is, is this a kind of bug in the implementation of inverse LAEA, or is it to be expected that invalid coordinates
can be represented by either HUGE_VAL or NaN depending on the projection?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Proj