[gdal-dev] Problem with OGRCreateCoordinateTransformation
Reinaldo Escada Chohfi
rec at geodesign.com.br
Fri Apr 10 12:34:28 EDT 2009
Thanks Frank,
Yes, I do have the proj.dll is in my path.
Also, I am looking for the gdalwin32dev160. Is it available, or we
don't need it anymore, just the gdalwin32exe160?
I've been using gdalwin32exe141 & gdalwin32dev141.
Thanks,
Reinaldo
At 11:36 AM 4/10/2009, Frank Warmerdam wrote:
>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, warmerdam at pobox.com
>light and sound - activate the windows | http://pobox.com/~warmerdam
>and watch the world go round - Rush | Geospatial Programmer for Rent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20090410/508672b2/attachment.html
More information about the gdal-dev
mailing list