[gdal-dev] reproject points using raster info

Yann Chemin yann.chemin at gmail.com
Sat Jan 10 02:16:18 EST 2009


Hello,

(C API)

The aim is to get a (lat,long) pair
into (projX,projY) pair from hDataset1 projection info.

Lat/long projection was defined with:

char    *pszProj4 = "+proj=ll +ellps=wgs84 +datum=wgs84";
OGRSpatialReferenceH hSRS;
OSRImportFromProj4(hSRS, pszProj4);
printf( "%s\n", pszProj4 );

Using GDALGetProjectionRef( hDataset1 ),
the raster projection info is extracted.

Here somehow the extracted projection information
should be imported into a second OGRSpatialReferenceH,
called hSRS1 for example. But I don't know how to do that.

I am confused by the C++ examples actually,
and have difficulties to find a proper C example somewhere to do that.

thanks for any help/suggestion,
Yann


More information about the gdal-dev mailing list