[Proj] transformation in c

Frank Warmerdam warmerdam at pobox.com
Thu Mar 26 21:00:22 PDT 2009


On Wed, Mar 25, 2009 at 10:01 AM, Gerald I. Evenden
<geraldi.evenden at gmail.com> wrote:
> I can't help but find the above website very weak and merely an exercise in
> reformulating the previously simple usage of proj and then having the
> contempt to call pj_fwd, pj_inv and pj_init obsolete.

Folks,

I'm not sure there is much point in responding to this, but for completeness
the pj_fwd() and pj_inv() functions are deprecated in order to avoid
presenting too many API entry points to the application developer,
potentially leading to confusion about which to use.  The functions
continue to be available, but their use is not encouraged by me.

> To compound the issue of pj_fwd/inv, these functions are used withing
> pj_transform!  So how can they be obsolete yet required by the replacing
> procedure?

As Richard suggested, I see them as primarily for internal
use, or specialized applications.

> And, of course, the same problem occurs with the "obsolescence" of pj_init
> which is called by pj_initplus within the file pj_init.c.  It is interesting
> to note that libproj4 added the string initialization option about 3 years
> ago with the following code internal to proj_init.c:

I think if we dug we would find that pj_init_plus() was implemented
in PROJ.4 after I took up maintenance, and before Gerald started
work on libproj.4.

>
>    PROJ *
> proj_initstr(char *str) {
>    char * plist[1];
>    plist[0] = str;
>    return(proj_init(1, plist));
> }
> which is comparable to about 50 lines of code in pj_init.c.
>
> That was easy because any single array element of argc of proj_init can take a
> compound field of arguments such as: "+proj=tmerc ellps=WGS84 lon_0=90W"

This is certainly news to me.  I'm not sure it was documented or obvious.

> Also, "+" prefixes are so passe!

I find them an explicit way of introducing PROJ.4 arguments.  I can
certainly understand that they aren't strictly necessary but it is
now my practice to encourage their use, and PROJ.4 string
parsers like that in GDAL/OGR will not understand PROJ.4
coordinate systems without the '+'s.

> All this was done years ago..
>
> Please, I am completely insulted by that web page.
>
> If anything is obsolete, it is proj-4*** .

Well, this is getting subjective, so I'll avoid responding.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the Proj mailing list