[Gdal-dev] Query regarding coordinate system transformation using
GDAL
viritha 30
viritha30 at gmail.com
Tue Jul 10 12:11:49 EDT 2007
Hi Friends,
I am working on GDAL library. I have some doubts in using
it. I want to convert the geographic coordinate system into any other
projection coordinate system. That is. i want the converted values of WGS84
latitude and longitude values in any other projection coordinate system like
UTM or Mercator2SP.......etc. And also i want to retrieve the zone number
from this . If anyone know abou this convertion using GDAL library or
OGRSpatial Reference class, please mail me. its very urgent for me.
I am giving the code i am working. i dont know how to go forward . plz help
me. i am doing it in VC++ on Windows.
{
OGRSpatialReference osRS,oosRS ;
char *pszWKT=NULL;
char *pszaWKT=NULL;
CString str;
osRS.SetWellKnownGeogCS("WGS84");
osRS.exportToWkt(&pszWKT);
str.Format("%s",pszWKT);
MessageBox(str);
oosRS.SetProjCS("Mercator_2SP");
oosRS.SetWellKnownGeogCS("EPSG:9805");
oosRS.SetHOM(0, 75, 90.0, 90.0,1.0, 500000, 0);
oosRS.exportToWkt(&pszaWKT);
str.Format("%s",pszaWKT);
MessageBox(str);
void *reProjTransform=GDALCreateReprojectionTransformer(pszWKT,pszaWKT);
/////////////////
I dont know wat to do after this. how to get the converted latitude and
longitude values.
}
I even tried with the OGRCreateCoordinateTransformation()
function. by passing the two coordinate systems in WKT format. still i was
strucked.
plz help me.
--
Regards,
Viritha.B
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070710/e0094159/attachment.html
More information about the Gdal-dev
mailing list