<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
<font size="+1"><tt>Is there a valid proj4 description of the following
coordinate system in wkt?<br>
<br>
GEOGCS["WGS84_ds",<br>
DATUM["D_WGS_1984",<br>
SPHEROID["WGS_1984",6378137.0,298.257223563]],<br>
PRIMEM["Greenwich",0.0],<br>
UNIT["Second",0.00000484813681109536]]<br>
<br>
I used the following python code from the web to get the proj4 using
the ogr library.<br>
<br>
#!/usr/bin/python<br>
<br>
import osr<br>
import sys<br>
<br>
def main(prj_file):<br>
prj_text = open(prj_file, 'r').read()<br>
srs = osr.SpatialReference()<br>
if srs.ImportFromWkt(prj_text):<br>
raise ValueError("Error importing PRJ information from: %s" %
prj_file)<br>
print srs.ExportToProj4()<br>
<br>
if __name__=="__main__":<br>
main(sys.argv[1])<br>
<br>
Unfortunately it results in: +proj=longlat +ellps=WGS84 +no_defs<br>
<br>
Which is the same string I get for this wkt:<br>
<br>
GEOGCS["GCS_WGS_1984",<br>
DATUM["D_WGS_1984",<br>
SPHEROID["WGS_1984",6378137.0,298.257223563]],<br>
PRIMEM["Greenwich",0.0],<br>
UNIT["Degree",0.0174532925199433]]<br>
<br>
I'm trying to use an app that requires cs spec's in proj4 format is why
I'm looking for the proj4 string.<br>
<br>
The interesting thing is that ogr2ogr can properly convert from the
first cs to the second cs so internally it's doing the correct thing.
Is this cs just not representable in proj4 syntax?<br>
<br>
Thanks.<br>
</tt></font>
</body>
</html>