[OSRS-PROJ] PVALUE

Craig Bruce csbruce at cubewerx.com
Wed Mar 21 09:08:30 PST 2001


Frank Warmerdam <warmerdam at pobox.com> wrote:

> I have been requested to rename the PVALUE type in PROJ.4 to avoid a
> conflict with something defined in one of the windows include files.

It does suck the way that Windows include files grab half the common
identifiers in the known universe.

> Another alternative might be to split the minimum set of definitions
> required by applications into another include file (proj_public.h perhaps)
> and encourage applications running into problems to use that.

That sounds like how things should be anyway.  Private information should
be kept private and shouldn't pollute the global namespace of a different
application.

> Note that we have already had to rename UV (to projUV).  I can easily imagine
> XY, and LP causing problems.  Also some of the #define's in projects.h aren't
> really required by calling applications, and may cause unnecessary conflicts,
> stuff like HALFPI, FORTPI, PI, and so forth.

Given that PROJ.4 is a library and given the precedent of the function
names, all names exported from PROJ should probably start with PJ_ or pj_,
etc., as appropriate.  This should eliminate name conflicts.  Things like
HALFPI, etc., shouldn't be exported.  Most application should use M_PI,
et al., from <math.h> in most environments.

>  pj_init_plus(): Initialize directly from a string in the form
>                  "+proj=utm +zone=11 +ellps=WGS84"

Doesn't pj_init() already accept this?

>  pj_is_geographic(): to return the is_latlong flag in the PJ structure.
>  pj_latlong_from_proj(): to return a geographic coordinate system matching
>                          the ellipse and datum information of a projected PJ.
>  pj_compare(): Return TRUE if two PJ's appear to be identical.
>  pj_get_definition(): To return the internal definition of the projection,
>                       after expanding +init= values, +datum values and so
>                       forth.  This would make it easier for applications
>                       needing to transform PROJ.4 definitions into other
>                       formats to correctly support more exotic definitions.

Calls like these are required in a general-purpose coordinate system
library.

--------------------------+------------------------+--------------------------
Dr. Craig S. Bruce        | Ph.: 819-771-8303 x205 |             CubeWerx Inc.
Senior Software Developer |   Fax: 819-771-8388    |      Hull, Québec, Canada
csbruce at cubewerx.com      | http://www.csbruce.com |  http://www.cubewerx.com/
--------------------------+------------------------+--------------------------
                     "Not guilty by reason of celebrity."
----------------------------------------
PROJ.4 Discussion List
See http://www.remotesensing.org/proj for subscription, unsubscription
and other information.



More information about the Proj mailing list