[Proj] .NET / C# port of proj4

Glynn Clements glynn at gclements.plus.com
Wed Jun 7 19:27:48 EDT 2006


Jason Askew wrote:

> So, question one:
> 
> In file: pj_transform.c
> 
> projected_loc is defined as so:
> 
> XY         projected_loc;
> 
> XY being defined as:
> 
> typedef struct { double x, y; }     XY;

Not in pj_transform.c; see below.

> buy then later in pj_transform.c, u and v members show up in
> pj_transforms.c, like so:
> 
>                     projected_loc.u = x[point_offset * i];
>                     projected_loc.v = y[point_offset * i];
> 
> I must be missing something painfully obvious.  I see the defines
> wrapped around the def of the XY struct, i.e.:
> 
> #ifndef PJ_LIB__
> #define XY projUV
> #define LP projUV
> #else
> typedef struct { double x, y; }     XY;
> typedef struct { double lam, phi; } LP;
> #endif
> 
> but PJ_LIB__ is defined.

It's defined on a file-by-file basis. The PJ_*.c files define it, as
do some of the pj_*.c files, but pj_transform.c doesn't.

> Not to mention pj_inv and pj_inv expect the XY for and not the projUV form.

pj_inv.c defines PJ_LIB__.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the Proj mailing list