Reinaldo Escada Chohfi wrote:
Hello all,
We place this piece of code to test how coordinate transformation works
with OGR.
OGRSpatialReference oSourceSRS, oTargetSRS;
OGRCoordinateTransformation *poCT;
double x1, y1;
oSourceSRS="EPSG:4326";
oTargetSRS="EPSG:4989";
poCT = OGRCreateCoordinateTransformation( &oSourceSRS,
&oTargetSRS );
x1 = -45.859485925833;
y1 = -23.2101365278;
printf("%lf %lf \n",x1,y1);
if( poCT == NULL || !poCT->Transform( 1, &x1, &y1 ) )
printf( "Transformation failed.\n" );
else
printf( "(-45.859485925833,-23.2101365278) -> (%f,%f)\n",
x1, y1 );
The program compiles fine, but it gives the following runtime error:
ERROR 6: Unable to load PROJ.4 library (proj.dll), creation of
OGRCoordinateTransformation failed.
Isn't PROj.4 (proj.lib) built in OGR?
Reinaldo,
In the default configuration PROJ.4 is loaded at runtime rather than
being linked against at build time. This was a slightly peculiar and
unusual decision on my part many years ago. Do you have PROJ.dll available
in your PATH? If not, you will need to add it for reprojection support.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev