Is there a valid proj4 description of the following coordinate system in wkt?

GEOGCS["WGS84_ds",
    DATUM["D_WGS_1984",
        SPHEROID["WGS_1984",6378137.0,298.257223563]],
    PRIMEM["Greenwich",0.0],
    UNIT["Second",0.00000484813681109536]]

I used the following python code from the web to get the proj4 using the ogr library.

#!/usr/bin/python

import osr
import sys

def main(prj_file):
    prj_text = open(prj_file, 'r').read()
    srs = osr.SpatialReference()
    if srs.ImportFromWkt(prj_text):
        raise ValueError("Error importing PRJ information from: %s" % prj_file)
    print srs.ExportToProj4()

if __name__=="__main__":
    main(sys.argv[1])

Unfortunately it results in: +proj=longlat +ellps=WGS84 +no_defs

Which is the same string I get for this wkt:

GEOGCS["GCS_WGS_1984",
    DATUM["D_WGS_1984",
        SPHEROID["WGS_1984",6378137.0,298.257223563]],
    PRIMEM["Greenwich",0.0],
    UNIT["Degree",0.0174532925199433]]

I'm trying to use an app that requires cs spec's in proj4 format is why I'm looking for the proj4 string.

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?

Thanks.
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to