[Gdal-dev] OGRCreateCoordinateTransformation

Frank Warmerdam warmerdam at pobox.com
Mon May 8 13:37:13 EDT 2006


Cho Hyun-Kee wrote:
> Hello!
> 
> I use GDAL Library for coordinate transformation.
> But whenever I use OGRCreateCoordinateTransformation function, it 
> returns NULL value.
> 
> The code is like tihs. 
> OGRSpatialReference OSRInputCoordinateInform;
> OGRSpatialReference OSROutputCoordinateInform;
> 
>     
> OSRInputCoordinateInform.SetTM(38, 127, 0.9996, 100000, 200000);
> OSRInputCoordinateInform.importFromEPSG(4162);
> 
> OSROutputCoordinateInform.SetUTM(52, TRUE);
> OSROutputCoordinateInform.importFromEPSG(4166);
> 
> OGRCoordinateTransformation *poCoordinateTransform;
> poCoordinateTransform = 
> OGRCreateCoordinateTransformation(&OSRInputCoordinateInform, 
> &OSROutputCoordinateInform); // return NULL
> 
> How can I use it??

Cho Hyun-Kee,

Instantiating an OGRCoordinateTransformation object results in
an attempt to load PROJ.4 as a .so/.dll.  If that doesn't
work, you will get NULL back.  Is it possible that the PROJ
shared library isn't installed an accessable on your system?
I would have expected some sort of error message to be issued
to stderr.

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    | President OSGF, http://osgeo.org




More information about the Gdal-dev mailing list