Well, the mystery deepens, as the following script using osr for reprojection works:<br><br>#! /usr/bin/python<br><br>import ogr<br>import osr<br><br># CREATE WKT STRING OF POINT COORDS<br>sample = (' 776041.000', '
3386618.000')<br>x = sample[0]
<br>y = sample[1]<br>wkt = 'POINT(%s %s)' % (x, y)<br><br># CREATE PROJECTION OBJECTS<br>utm16N = osr.SpatialReference ()<br>utm16N.ImportFromEPSG(26916)<br>wgs84 = osr.SpatialReference()<br>wgs84.ImportFromEPSG(4326)
<br><br># CREATE OGR POINT OBJECT, ASSIGN PROJECTION, REPROJECT<br>point = ogr.CreateGeometryFromWkt(wkt)<br>point.AssignSpatialReference(utm16N)<br>point.TransformTo(wgs84)<br><br>print wkt<br>print point<br><br>--> output:
<br>POINT( 776041.000 3386618.000)<br>POINT (-84.121611219545088 30.5802861582041)<br><br>I wonder, maybe I'm just being dumb and am using incorrect usgae syntax for ogrtoogr? Here's the command I gave:<br><br>ogr2ogr -t_srs "EPSG:4326" 4326_pot2kcl_combined.shp pot2kcl_combined.shp
<br><br>--> output:<br>ERROR 6: Unable to load PROJ.4 library (libproj.dll), creation of<br>OGRCoordinateTransformation failed.<br>Failed to create coordinate transformation between the<br>following coordinate systems. This may be because they
<br>are not transformable, or because projection services<br>(PROJ.4 DLL/.so) could not be loaded.<br>Source:<br>PROJCS["NAD_1983_HARN_StatePlane_Washington_South_FIPS_4602",<br> GEOGCS["GCS_North_American_1983_HARN",
<br> DATUM["NAD83_High_Accuracy_Regional_Network",<br> SPHEROID["GRS_1980",6378137.0,298.257222101]],<br> PRIMEM["Greenwich",0.0],<br> UNIT["Degree",
0.0174532925199433]],<br> PROJECTION["Lambert_Conformal_Conic_2SP"],<br> PARAMETER["False_Easting",1640416.666666667],<br> PARAMETER["False_Northing",0.0],<br> PARAMETER["Central_Meridian",-
120.5],<br> PARAMETER["Standard_Parallel_1",45.83333333333334],<br> PARAMETER["Standard_Parallel_2",47.33333333333334],<br> PARAMETER["Latitude_Of_Origin",45.33333333333334],<br> UNIT["Foot_US",
0.3048006096012192]]<br>Target:<br>GEOGCS["WGS 84",<br> DATUM["WGS_1984",<br> SPHEROID["WGS 84",6378137,298.257223563,<br> AUTHORITY["EPSG","7030"]],
<br>
TOWGS84[0,0,0,0,0,0,0],<br> AUTHORITY["EPSG","6326"]],<br> PRIMEM["Greenwich",0,<br> AUTHORITY["EPSG","8901"]],<br> UNIT["degree",0.01745329251994328
,<br> AUTHORITY["EPSG","9122"]],<br> AUTHORITY["EPSG","4326"]]<br>---<br><br><br><br><div class="gmail_quote">On Dec 10, 2007 4:59 PM, Frank Warmerdam <<a href="mailto:warmerdam@pobox.com" target="_blank">
warmerdam@pobox.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Roger André wrote:<br>> I'm having an interesting problem when trying to use ogr2ogr to
<br>> reproject from one coordinate system to another. What makes it<br>> interesting is that gdalwarp works properly on the same system. With<br>> ogr2ogr I get an error that says,<br>><br>> "ERROR 6: Unable to load
PROJ.4 library (libproj.dll), creation of<br>> OGRCoordinateTransformation failed.<br>> Failed to create coordinate transformation between the<br>> following coordinate systems. This may be because they<br>> are not transformable, or because projection services
<br>> (PROJ.4 DLL/.so) could not be loaded."<br><br>Roger,<br><br>GDAL and OGR both use the OGRCoordinateTransformation class to load<br>and call PROJ.4. So I can't explain the behaviour you are seeing.<br><br>
Best regards,<br><font color="#888888">--<br>---------------------------------------+--------------------------------------<br>I set the clouds in motion - turn up | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com" target="_blank">
warmerdam@pobox.com</a><br>light and sound - activate the windows | <a href="http://pobox.com/%7Ewarmerdam" target="_blank">http://pobox.com/~warmerdam</a><br>and watch the world go round - Rush | President OSGeo, <a href="http://osgeo.org" target="_blank">
http://osgeo.org</a><br><br></font></blockquote></div><br>