[Proj] Projection Dev - How to call other projectionsfromaprojection?

Noel Zinn (cc) ndzinn at comcast.net
Sun Oct 9 19:57:54 EST 2011


It does.  This also helps:

http://lists.maptools.org/pipermail/proj/2011-August/005842.html

Hopefully someone more knowledgeable than I will help with the Proj.4 
commands.

I'm curious about which standard area preserving projection from an oblate 
spheroid to a sphere you've chosen.

Noel Zinn, Principal, Hydrometronics LLC
+1-832-539-1472 (office), +1-281-221-0051 (cell)
noel.zinn at hydrometronics.com (email)
http://www.hydrometronics.com (website)

-----Original Message----- 
From: Michael Speth
Sent: Sunday, October 09, 2011 7:50 PM
To: PROJ.4 and general Projections Discussions
Subject: Re: [Proj] Projection Dev - How to call other 
projectionsfromaprojection?

I am adding a new proj.4 projection to my local copy of the proj.4
source code.  Its our team's hopes that eventually once the projection
has gone through the proper testing that we can contribute back to proj.4.

So "implementing" more specifically means "porting" since another team
member is responsible for the development of the algorithms for these 2
projections.  He coded his algorithms in python and tested them in
Sage.  Its my task to port what he developed in python to the proj.4
library (adding to the proj.4 library).

I am trying to find out how to call a function declared as 2 #define
(INVERSE and e_inverse/s_inverse).  Meaning, from within the
INVERSE(e_inverse); function, I want to call INVERSE(s_inverse);.  It
seems that there is only 2 function pointers available in the PJConsts
struct so I don't think I can use those since those function pointers
(from what I understand) need to be assigned to the functions that need
to be called.

For instance, in order for INVERSE(e_inverse); to be called, then the
P->inv function pointer needs to be set to e_inverse (which happens in
the ENTRY function).

Does this make sense?

On 10/10/11 13:27, Noel Zinn (cc) wrote:
> Thanks.  Please clarify what you mean by "implementing"?  You're looking 
> for
> the Proj.4 commands that will pull this off?  Or you're coding this as an
> additional projection in your instance of Proj.4?  Or you are coding this
> projection in some language other than Python independent of Proj.4 and
> thought the members of this forum could offer some guidance.  Pardon me if
> I've missed the obvious.  -Noel
>
> Noel Zinn, Principal, Hydrometronics LLC
> +1-832-539-1472 (office), +1-281-221-0051 (cell)
> noel.zinn at hydrometronics.com (email)
> http://www.hydrometronics.com (website)
>
> -----Original Message-----
> From: Michael Speth
> Sent: Sunday, October 09, 2011 6:56 PM
> To: PROJ.4 and general Projections Discussions
> Subject: Re: [Proj] Projection Dev - How to call other projections
> fromaprojection?
>
> I meant ellipsoid and sphere; I apologize for confusing those terms.
>
> I am trying to implement the HEALPix projection from a python
> implementation from one of our team members.  The python version has
> methods for projecting onto an ellipsoid as well as a sphere.  The
> python version's forward and inverse ellipsoid functions call the
> forward and inverse sphere functions.
>
> We will also be implementing a new projection called an rHEALPix which
> is documented here:
> http://code.scenzgrid.org/index.php/p/scenzgrid-py/source/tree/master/docs/scenzgrid_math.pdf
>
> Thank you for your help!
>
> On 10/10/11 12:43, Noel Zinn (cc) wrote:
>> "Spheroid" and "ellipsoid" are synonyms for the same thing in geodesy and
>> cartography.  See:
>>
>> http://en.wikipedia.org/wiki/Spheroid
>>
>> Do you mean that you have an ellipsoid and a sphere, maybe a conformal
>> sphere intermediate between the ellipsoid and the plane?
>>
>> What "new" projection are you implementing?  Does it have a name or is it
>> something you invented?  Is it conformal?
>>
>> Noel Zinn, Principal, Hydrometronics LLC
>> +1-832-539-1472 (office), +1-281-221-0051 (cell)
>> noel.zinn at hydrometronics.com (email)
>> http://www.hydrometronics.com (website)
>>
>> -----Original Message-----
>> From: Michael Speth
>> Sent: Sunday, October 09, 2011 4:06 PM
>> To: proj at lists.maptools.org
>> Subject: [Proj] Projection Dev - How to call other projections from
>> aprojection?
>>
>> Greetings,
>>      I am working on implementing a new projection and stumped on how to
>> call a projection from within a projection.
>>
>> For example, the projection has both a spheroid and ellipsoid.  The
>> function for determine the projection of the ellipsoid (both forward and
>> inverse) use their respective spheroid projections during calculation.
>> Unfortunately, I'm not sure if the ENTRY function can be used because
>> for the ellipsoid calculation, but the spheroid function is only an
>> intermediate step int the calculation and there exists additional
>> computations after the spheroid function is called.
>>
>> Consider this example:
>>
>> INVERSE(e_inverse);
>>       lp = INVERSE(p_inverse);
>>       lp.phi = auth_lat(...);
>>       return lp;
>>
>> Does this make sense?  If so, is there any way of calling the inverse
>> function for sphere within the inverse function for ellipsoid?
>>
>> Thank you for your help
>> Michael Speth
>> Landcare Research
>> Scientific Programmer
>>
>>
>> _______________________________________________
>> Proj mailing list
>> Proj at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/proj
>>
>>
>> _______________________________________________
>> Proj mailing list
>> Proj at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/proj
> _______________________________________________
> Proj mailing list
> Proj at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/proj
>
>
> _______________________________________________
> Proj mailing list
> Proj at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/proj

_______________________________________________
Proj mailing list
Proj at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/proj 




More information about the Proj mailing list