[Proj] Verification of inverse step in projection

Roger Oberholtzer roger at opq.se
Sun Dec 13 07:38:04 EST 2009


On Dec 12, 2009, at 2:44 PM, José Luis García Pallero wrote:

> Hi,
> I'm a new proj user and I have a doubt about the verification of
> inverse step in projection. As the manual says (proj.4.3.pdf, page
> 41):
>
> "Some projections do not have inverse capability; a state that can be
> determined by proj->inv==0."
>
> But when I try to test:
>
> #include<proj_api.h>
> ......
> projPJ pjStruct;

Perhaps:

projPJ *pjStruct;

as pj_init_plus returns a pointer.


> pjStruct = pj_init_plus("+proj=tcc +ellps=clrk66 +lon_0=90W");
> if(!pjStruct)
>    ....
> if(pjStruct->inv==0)
>    ....
>
> At compilation time I obtain the error:
>
> prueba.c: In function ‘main’:
> prueba.c:22: warning: dereferencing ‘void *’ pointer
> prueba.c:22: error: request for member ‘inv’ in something not a
> structure or union
>
> It says that inv is not a member of the projectios struct.
> What is the correct way to check if a projection has inverse step?
>
> Thanks
>
> -- 
> *****************************************
> José Luis García Pallero
> jgpallero at gmail.com
> (o<
> / / \
> V_/_
> Use Debian GNU/Linux and enjoy!
> *****************************************
> _______________________________________________
> Proj mailing list
> Proj at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/proj

Roger Oberholtzer

OPQ Systems / Ramböll RST

Ramböll Sverige AB
Kapellgränd 7
P.O. Box 4205
SE-102 65 Stockholm, Sweden

Office: Int +46 8-615 60 20
Mobile: Int +46 70-815 1696

And remember:

It is RSofT and there is always something under construction.
It is like talking about large city with all constructions finished.
Not impossible, but very unlikely.



More information about the Proj mailing list