[FWTools] Dumping to wkt for a .prj file - meter vs. metre

Frank Warmerdam warmerdam at pobox.com
Wed Oct 25 12:57:35 EDT 2006

David Fawcett wrote:
> I am using FWTools 1.0.5 on Windows, specifically the the ogr and osr 
> modules in python. 
> In my script, for data that is in lat/lon, I am transforming it to UTM 
> Zone 15. 
> When I write the srs to WKT to create a shapefile .prj file, the units 
> come out as 'metre'.  I can understand that this unit is equivilent to 
> 100cm, but ArcMap 9.1 doesn't recognize this as a known unit.  If I edit 
> the .prj file and replace 'metre' with 'meter', the units are recognized. 
> PROJCS["NAD83 / UTM zone 
> 15N",GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 
> 1980",6378137, 
> 298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328 
> ,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4269"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor", 
> 0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26915"]]
> I can always do a string replacement in my code before writing the wkt 
> definition to the .prj file, but I am curious if this is intended. 


Please assign the WKT to an ogr.SpatialReference object, and then use the
morphToESRI() to convert the WKT to ESRI format before writing it to the
.prj file.  This will correct a variety of subtle issues.

If you find that morphToESRI does not produce an ESRI compatible WKT
result, then please file a bug against GDAL with the details and I
will fix it.

If a spatial reference object is passed in during layer creation of
a shapefile, it will be automatically morphed to ESRI format and written
to the .prj file.  This manual morphing is mainly required because you
are writing the .prj file yourself.

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

More information about the FWTools mailing list