<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="SV" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hello, list. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I am confused about the result I get from the Proj4 inverse projection of Lambert Azimuthal Equal Area,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">when the original projected input point is outside the valid circle.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I thought that in cases like these, the result point should have coordinates that are
</span><span lang="EN-US" style="font-family:&quot;Courier New&quot;">HUGE_VAL</span><span lang="EN-US"> , &nbsp;that is,
</span><span lang="EN-US" style="font-family:&quot;Courier New&quot;;color:black">1e&#43;300</span><span lang="EN-US">.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">There seems to be code in </span><span lang="EN-US" style="font-family:&quot;Courier New&quot;">pj_inv.c</span><span lang="EN-US"> that checks error conditions and sets coordinates to
</span><span lang="EN-US" style="font-family:&quot;Courier New&quot;">HUGE_VAL</span><span lang="EN-US">, but these<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">checks aren&#8217;t triggered in my example.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Instead, my debugger says that I get a point with coordinates&nbsp;
</span><span lang="EN-US" style="font-family:&quot;Courier New&quot;">&#8211;nan(ind)</span><span lang="EN-US">.&nbsp;
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I suppose that is an <i>Indefinite NaN</i>. &nbsp;I am not too familiar with the various flavours of NaN, but it&#8217;s certainly different from
</span><span lang="EN-US" style="font-family:&quot;Courier New&quot;;color:black">1e&#43;300</span><span lang="EN-US">.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">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:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">C:\&gt; proj -I &#43;init=epsg:3035<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Courier New&quot;">4321000 3210000<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Courier New&quot;">10dE&nbsp;&nbsp;&nbsp; 52dN<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Courier New&quot;">16350000 -1090000<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Courier New&quot;">-2147483648d-2147483648'-1.#IO&quot;E&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -2147483648d-2147483648'-1.#IO&quot;N<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I think I remember that invalid coordinates are usually written as asterisks by the console application.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Avoiding the default DMS formatting of the output, I get the following instead:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">C:\&gt;proj -I &#43;init=epsg:3035 -f &quot;%.5f&quot;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Courier New&quot;">4321000 3210000<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Courier New&quot;">10.00000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 52.00000<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Courier New&quot;">16350000 -1090000<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Courier New&quot;">-1.#IND0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -1.#IND0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">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<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">can be represented by either</span><span lang="EN-US" style="font-family:&quot;Courier New&quot;"> HUGE_VAL
</span><span lang="EN-US">or</span><span lang="EN-US" style="font-family:&quot;Courier New&quot;"> NaN
</span><span lang="EN-US">depending on the projection?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Best regards, <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal">Mikael Rittri<o:p></o:p></p>
<p class="MsoNormal">Carmenta<o:p></o:p></p>
<p class="MsoNormal">Sweden<o:p></o:p></p>
<p class="MsoNormal">http://www.carmenta.com<o:p></o:p></p>
</div>
</body>
</html>