[Proj] transformation in c

Gerald I. Evenden geraldi.evenden at gmail.com
Wed Mar 25 10:01:36 PDT 2009


On Wednesday 25 March 2009 11:48:01 am Frank Warmerdam wrote:
> Stanislav,
>
> There is pretty good information on using the PROJ C API at:
>
>   http://trac.osgeo.org/proj/wiki/ProjAPI

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.

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?

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:

    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"

Also, "+" prefixes are so passe!

All this was done years ago..

Please, I am completely insulted by that web page.

If anything is obsolete, it is proj-4*** .

> You will presumably want to use coordinate system
> definition strings like "+init=epsg:xxx1" in your case.
>
> Best regards,
>
> On Wed, Mar 25, 2009 at 5:45 AM, Stanislav Bek <bks at centrum.cz> wrote:
> > Hi,
> >
> > I would like to use Proj4 in my C program, particularly I want to have an
> > easy function which transforms coordinates x,y of epsg:xxx1 to x',y' of
> > epsg:xxx2.
> >
> > Please, give me an advice how I can do easily...
> >
> > Best regards,v
> > Stanislav Bek
> >
> > _______________________________________________
> > Proj mailing list
> > Proj at lists.maptools.org
> > http://lists.maptools.org/mailman/listinfo/proj



-- 
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