[Gdal-dev] About OGR question
=?GB2312?Q?=CC=EF=CE=C4=BE=FC?=
wjtian at seahigh.com
Wed Feb 22 04:25:39 EST 2006
gdal-dev,
Hello,My name is tian.I use your code about OGR,and find it very good for me .Thank you for your program.Now I have a question to ask you.
I have the data Longitude and Latitude for map,but use your code:
//////////
OGRPoint *poPoint = new OGRPoint();
poPoint->setX( x );
poPoint->setY( y );
poFeature->SetGeometryDirectly( poPoint );
//////////
This code is not for Longitude and Latitude's data,how can I convert between them?
I find your code about :
////////////////
OGRSpatialReference oUTM, *poLatLong;
OGRCoordinateTransformation *poTransform;
oUTM.SetProjCS("UTM 17 / WGS84");
oUTM.SetWellKnownGeogCS( "WGS84" );
oUTM.SetUTM( 17 );
poLatLong = oUTM.CloneGeogCS();
poTransform = OGRCreateCoordinateTransformation( &oUTM, poLatLong );
if( poTransform == NULL )
{
...
}
...
if( !poTransform->Transform( nPoints, x, y, z ) )
...
///////////////////
But this code can't help me .The oUTM can't be initialization.
So can you help me about this question,I have the Longitude = 116 ,and Latitude = 39,How I transform it to x,y,z.
Thank you.
More information about the Gdal-dev
mailing list