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

Paul Selormey paul at toolscenter.org
Mon Jun 10 11:55:01 EDT 2002

Hello Frank,

> I see I neglected to explain why this was a concern to me.  There are
> platforms for which a long is smaller than a pointer, and so they can't
> always be cast back and forth freely.

I see. Me no think that far :(

> Hmm, actually now that I think of it, it was only function pointers on
> some of the new 64bit systems that were actually 128 bits long.  Anyways,
> I would encourage keeping pointers as pointers to reduce future possible
> compatibility problems.

That is right. I was using 64-bit Alpha processor machine at school running
32-bit WinNT!

> Hmm.  Actually, I think anonymous structures is the wrong way to describe
> I really mean nested structure definitions within a union, something like
> typedef struct {
>    ...
>    union {
>      struct {
>        double central_meridian;
>        double scale_factor;
>      } tmerc;
>      struct {
>        int grid_zone;
>      } nzgrid;
>    } u;
> } PJ;

This seems to be the most elegant solution. We might also pull the static
decription text into the structures to avoid the thread issue raised.
However, I did a quick search for projections using the extra parameters
and got over 30 different projections.
The union could be very large. Is it okay?

> So that a value would be reference as pj->u.nzgrid.grid_zone for instance.
> Ideally the union could remain unnamed, but I don't know if this is

No, this was not the form causing the problem. The Windows headers have
dummy name
for the unions.

Best regards,

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

More information about the Proj mailing list