[Proj] Getting Proj information after pj_init has been thrown

Gerald I. Evenden geraldi.evenden at gmail.com
Mon Jan 5 09:56:32 PST 2009


Below is the definition of the structure returned by proj_init():

typedef struct PROJconsts {
	PROJ_XY  (*fwd)(PROJ_LP, struct PROJconsts *);
	PROJ_LP  (*inv)(PROJ_XY, struct PROJconsts *);
	void (*spc)(PROJ_LP, struct PROJconsts *, struct PROJ_FACTORS *);
    int  (*derivs)(struct PROJconsts *, PROJ_LP, struct PROJ_DERIVS *);
	void (*pfree)(struct PROJconsts *);
	const char *descr;
	paralist *params;   /* parameter list */
	int over;   /* over-range flag */
	int geoc;   /* geocentric latitude flag */
	double
		a,  /* major axis or radius if es==0 */
		e,  /* eccentricity */
		es, /* e ^ 2 */
		ra, /* 1/A */
		one_es, /* 1 - e^2 */
		rone_es, /* 1/one_es */
		lam0, phi0, /* central longitude, latitude */
		x0, y0, /* easting and northing */
		k0,	/* general scaling factor */
		to_meter, fr_meter; /* cartesian scaling */
#ifdef PROJ_PARMS__
PROJ_PARMS__
#endif /* end of optional extensions */

I think you will find that it is *very* similar to old proj.4 material.

One interesting feature of this header definition is that it is not complete.  
Completion is "added" during the initialization of a projection and further 
elements are after the 'double' declaration.  But not to worry.  All the 
parameters used in initializing the projection are in the linked 
list 'paralist' whose structure is defined elsewhere in the header.

Hopefully, this will be much better documented if we can get libproj into a 
Doxygen system that will be much more open to any interested user.

-- 
The whole religious complexion of the modern world is due
to the absence from Jerusalem of a lunatic asylum.
-- Havelock Ellis (1859-1939) British psychologist



More information about the Proj mailing list