[OSRS-PROJ] One more help, please...

Frank Warmerdam warmerdam at pobox.com
Mon Jun 10 05:36:36 PDT 2002


Paul Selormey wrote:

> 1. Define global structures in the individual files to hold the extra
> parameters with
>    a declared global variable each:
> 
>  struct foo
>  {
>       double cosphi1;
>      int       mode;
>  };
> 
> static foo gExtra;
> 
> 2. Add a long type variable to the PJ to hold pointer to use-defined extra
> structures:
> 
> typedef struct PJconsts
> {
> 
>         .........
> 
>     long lUserParameter;
> } PJ;
> 
> The user parameters can then be created from some define structures and with
> pointer
> saved in the lUserParameter member.

Paul,

Why use a long for lUserParameter instead of a void *?

I would suggest defining a union within the base structure, and using
anonymous structures within that to hold the values for different projections.
This would make the values externally visible which could be useful in some
cases.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent


----------------------------------------
PROJ.4 Discussion List
See http://www.remotesensing.org/proj for subscription, unsubscription
and other information.



More information about the Proj mailing list