<html>
<body>
<font size=3>Thanks Frank,<br><br>
Yes, I do have the proj.dll is in my path.<br><br>
Also, I am looking for the gdalwin32dev160. Is it available, or we
don't need it anymore, just the gdalwin32exe160?<br><br>
I've been using gdalwin32exe141 & gdalwin32dev141.<br><br>
Thanks,<br><br>
Reinaldo<br><br>
<br>
At 11:36 AM 4/10/2009, Frank Warmerdam wrote:<br>
<blockquote type=cite class=cite cite="">Reinaldo Escada Chohfi
wrote:<br>
<blockquote type=cite class=cite cite="">Hello all,<br>
We place this piece of code to test how coordinate transformation works
with OGR.<br>
OGRSpatialReference
oSourceSRS, oTargetSRS;<br>
OGRCoordinateTransformation
*poCT;<br>
double x1, y1;<br>
oSourceSRS="EPSG:4326";<br>
oTargetSRS="EPSG:4989";<br>
poCT =
OGRCreateCoordinateTransformation( &oSourceSRS, &oTargetSRS
);<br>
x1 = -45.859485925833;<br>
y1 = -23.2101365278;<br>
printf("%lf %lf
\n",x1,y1);<br>
<br>
if( poCT == NULL ||
!poCT->Transform( 1, &x1, &y1 ) )<br>
printf( "Transformation failed.\n" );<br>
else<br>
printf( "(-45.859485925833,-23.2101365278) ->
(%f,%f)\n",<br>
x1, y1 );<br>
The program compiles fine, but it gives the following runtime error:<br>
ERROR 6: Unable to load PROJ.4 library (proj.dll), creation of<br>
OGRCoordinateTransformation failed.<br>
Isn't PROj.4 (proj.lib) built in OGR?</blockquote><br>
Reinaldo,<br><br>
In the default configuration PROJ.4 is loaded at runtime rather than<br>
being linked against at build time. This was a slightly peculiar
and<br>
unusual decision on my part many years ago. Do you have PROJ.dll
available<br>
in your PATH? If not, you will need to add it for reprojection
support.<br><br>
Best regards,<br>
-- <br>
---------------------------------------+--------------------------------------<br>
I set the clouds in motion - turn up | Frank Warmerdam,
warmerdam@pobox.com<br>
light and sound - activate the windows |
<a href="http://pobox.com/~warmerdam" eudora="autourl">
http://pobox.com/~warmerdam</a><br>
and watch the world go round - Rush | Geospatial
Programmer for Rent<br>
</font></blockquote></body>
</html>