[Gdal-dev] Single point projection
Frank Warmerdam
fwarmerdam at gmail.com
Mon May 9 16:48:09 EDT 2005
On 5/9/05, Ilya Serebrianik <predator2448 at hotmail.com> wrote:
>
> Hello,
>
> I am trying to use the following to reproject a single point from utm
> to latlong, but it gives me an error (see after the code), apparently
> windows already uses the PVALUE definition:
>
> #include <projects.h>
>
> PJ *psPJSource;
> PJ *psPJTarget;
> int err;
> int nCount = 1;
> double x, y, z;
> x = 635999.000;
> y = 4836001.200;
> z = NULL;
> psPJSource = pj_init_plus("+proj=utm +zone=17 +datum=NAD83");
> psPJTarget = pj_init_plus("+proj=latlong +datum=WGS84");
> err = pj_transform( psPJSource, psPJTarget, nCount, 1, &x, &y, &z );
Ilya,
Techniclally this is a PROJ.4 issue and would be better
addressed on that mailing list.
The problem is that you are including projects.h, the "private"
PROJ.4 include file. If you include proj_api.h, the public
interfaces, you will not run into this incompatibility with windows.h.
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 Gdal-dev
mailing list