<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<small>Hi Frank</small>,<br>
<small>There are 4 errors that I want to generate which are only
in the inverse projections and not the forward. However, the
E_ERROR directive seems to only work in the ENTRY and SETUP
functions (because it returns an int). <br>
<br>
From looking at proj.c, the forward or inverse functions are
called after 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?<br>
<br>
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?<br>
<br>
Thanks<br>
</small><br>
<small>On 01/11/11 08:28, Frank Warmerdam wrote:</small>
<blockquote
cite="mid:CA+YzLBe58LB16G=5KfpmaDFhiYBohgn4LKLfb1MdqWpdXTssTQ@mail.gmail.com"
type="cite">
<pre wrap="">Michael,
The full list of proj.4 errors are in pj_strerrno.c. I have added
a few #define constants for errors in projects.h, but I haven't
tried to add these for older errors. Right now it can be relatively
hard to find all the places a particular error code might come from!
On Mon, Oct 31, 2011 at 12:20 PM, Michael Speth
<a class="moz-txt-link-rfc2396E" href="mailto:spethm@landcareresearch.co.nz"><spethm@landcareresearch.co.nz></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Greetings,
The E_ERROR calls the set_errno function. Is there a header file that
contains a reference to the error codes for proj.4? In the case of HEALPix
and rHEALPix, I want to report that for the inverse of these projections,
that the point is not within the projection space. Also, for the rHEALPix,
I want to report that the values for npole and spole are invalid.
How should I choose the the values to pass to errno?
</pre>
</blockquote>
<pre wrap="">
I guess just look at the error text and try to chose something appropriate.
I'd generally not encourage adding new error codes if avoidable.
Note that a point not being in the projection space on inverse
projection is (I think) normally just represented by returning
HUGE_VAL, not by setting an error number.
Best regards,
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Michael Speth
Scientific Programmer
Landcare Research</pre>
</body>
</html>