[Proj] TR: Getting Proj information after pj_init has been thrown

Gerald I. Evenden geraldi.evenden at gmail.com
Mon Jan 5 11:02:48 EST 2009

On Friday 02 January 2009 12:47:27 pm Till wrote:
> Sorry if duplication.
> I’m re-posting it, since it does not show in the mailing lists, whatever
> link I tried

> De : Till [mailto:till at free.fr]
> Envoyé : jeudi 1 janvier 2009 22:25
> À : 'PROJ.4 and general Projections Discussions'
> Objet : Getting Proj information after pj_init has been thrown
> Hi all and a very happy new year to anyone.
> We’re using proj.4 as API and are quite happy with it.
> So, our base reference is the proj_api.h header.
> Is there any way to retrieve PJ information (like major axis or any other
> projection information) after a pj_init() has been called?
> We did try to use projects.h in place of proj_api.h but this brings us to
> compilation nightmare since this one ‘typedef’s a PVALUE that winreg.h is
> also ‘typedef’ying (we’re using M$ platform as you may have understood).
> Any help in that manner would be welcome.

I cannot speak for what was done to the proj.4 path but the header for 
libproj4 has comments that detail the content of the structure that 
proj_init() (updated pj_init) returns and that includes details of the 
ellipsoid parameters but not the ellipsoid name.  The ascii projection 
parameters are also available in the linked list in the same structure.  Most 
of this was also available in the older proj versions.

I think the old proj program had the -V switch which dumped the settings, 
including ellipse parameters, of a init() return structure.  Certainly, lproj 
has -V,

Again, it is really sad that the original proj distribution had not been 
preserved and was needlessly altered.  i am of very little help on current 
proj.4 details.  I do note that the struct PJconsts in projects.h contains 
the comments I wrote but how it is used is unknown.

As soon as I get the geodesic distribution completed and out in a day or two I 
will start to apply much of the techniques initiated there to complete 
overhaul of libproj4.  I will add that changes in programatic linkage should 
be minimal.  More later.

Alas, these efforts are of no help for proj.4 problem.

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