No subject
Mon Jun 6 10:06:03 EST 2011
the setup code which includes the ENTRY0; I think that I am unable to check
in the ENTRY0 directive for the error conditions for inverse projections.
Is this correct?
So should I use the I_ERROR directive in this case? If so, it doesn't seem
to allow for entering errno values (its defined as -20). Can I create a new
directive similar to E_ERROR(err) but for I_ERROR?
</pre>
</blockquote>
<pre wrap="">
Michael,
I would actually encourage you to actually explicitly call
the error code instead of using the opaque I_ERROR
or a similar macro. For instance in PJ_tmerc.c I now do:
/*
* Fail if our longitude is more than 90 degrees from the
* central meridian since the results are essentially garbage.
* Is error -20 really an appropriate return value?
*
* <a class="moz-txt-link-freetext" href="http://trac.osgeo.org/proj/ticket/5">http://trac.osgeo.org/proj/ticket/5</a>
*/
if( lp.lam < -HALFPI || lp.lam > HALFPI )
{
xy.x = HUGE_VAL;
xy.y = HUGE_VAL;
pj_ctx_set_errno( P->ctx, -14 );
return xy;
}
Best regards,
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Michael Speth
Scientific Programmer
Landcare Research</pre>
</body>
</html>
--------------020403090107060204020507--
More information about the Proj
mailing list