[Proj] rHEALPix new parameters

Michael Speth spethm at landcareresearch.co.nz
Mon Oct 31 15:31:27 EST 2011

Hi Frank,
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).

 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?

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?


On 01/11/11 08:28, Frank Warmerdam wrote:
> 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
> <spethm at landcareresearch.co.nz>  wrote:
>> 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?
> 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,

Michael Speth
Scientific Programmer
Landcare Research

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/proj/attachments/20111101/4f086b8a/attachment.htm 

More information about the Proj mailing list