[Proj] rHEALPix new parameters

Michael Speth spethm at landcareresearch.co.nz
Sun Oct 16 17:27:25 EST 2011


Thanks Frank!
* New Parameters *
For adding new parameters, what is the command line syntax?

Example: proj -v +proj=rhealpix +lon_0=0 +a=1 +R_A +ellps=WGS84 npole=0 
spole=0 -E <<EOF 0 0 EOF

This doesn't seem to work.  I've also tried using +npole=0 and +spole=0 
and also doesn't work.  How do I fix this?

* On Combining 2 Projections into 1 File
Typically, there are 2 to 4 Functions FORWARD(s_forward), 
INVERSE(s_forward), and etc.  Would I need to create 8 of these 
functions (4 for each projection)?

For instance, can I do the following:
ENTRY0(healpix)
if(P->es){
         P->inv = e_inverse; P->fwd = e_h_forward;
     }else{
         P->inv = s_inverse; P->fwd = s_h_forward;
     }
ENDENTRY(P)
ENTRY0(rhealpix)
if(P->es){
         P->inv = e_inverse; P->fwd = e_rh_forward;
     }else{
         P->inv = s_inverse; P->fwd = s_rh_forward;
     }
ENDENTRY(P)
Note, e_h_forward would correspond to the function FOWARD(e_h_forward) 
and etc.

Thank you for your help.



On 14/10/11 17:43, Frank Warmerdam wrote:
> On 11-10-13 06:22 PM, Michael Speth wrote:
>> Greetings,
>>      I've implemented the HEALPix projection and have now moved on to
>> implementing a new projection called rHEALPix.  I have two questions
>> regarding this implementation.
>>
>> * rHEALPix requires 2 new parameters (spole and npole).  How do I
>> specify those parameters on the command line?  (In the code I am using
>> the pr_param function.
> Michael,
>
> To the best of my knowledge you just grab them with pj_param().  You
> don't need to do anything special to declare them.
>
>> * The rHEALPix projection uses the HEALPix projection.  So is it
>> possible to create a header with corresponding c file that shares common
>> functions between the HEALPix and rHEALPix projections?  If so, how
>> should I name the files?
> I would suggest just putting both projections in one source file to avoid
> needing the external header file.  It is not uncommon to have more than one
> related projection in a single file (eg. tmerc and utm in PJ_tmerc).
>
> Best regards,


-- 
Michael Speth
Scientific Programmer
Landcare Research

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


More information about the Proj mailing list