<!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>
&nbsp;&nbsp;&nbsp; DATUM["D_WGS_1984",<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SPHEROID["WGS_1984",6378137.0,298.257223563]],<br>
&nbsp;&nbsp;&nbsp; PRIMEM["Greenwich",0.0],<br>
&nbsp;&nbsp;&nbsp; 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>
&nbsp;&nbsp;&nbsp; prj_text = open(prj_file, 'r').read()<br>
&nbsp;&nbsp;&nbsp; srs = osr.SpatialReference()<br>
&nbsp;&nbsp;&nbsp; if srs.ImportFromWkt(prj_text):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; raise ValueError("Error importing PRJ information from: %s" %
prj_file)<br>
&nbsp;&nbsp;&nbsp; print srs.ExportToProj4()<br>
<br>
if __name__=="__main__":<br>
&nbsp;&nbsp;&nbsp; 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>
&nbsp;&nbsp;&nbsp; DATUM["D_WGS_1984",<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SPHEROID["WGS_1984",6378137.0,298.257223563]],<br>
&nbsp;&nbsp;&nbsp; PRIMEM["Greenwich",0.0],<br>
&nbsp;&nbsp;&nbsp; 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.&nbsp;
Is this cs just not representable in proj4 syntax?<br>
<br>
Thanks.<br>
</tt></font>
</body>
</html>