7

So here is the .prj text of a federal shapefile dataset of all public airports in its native OGC WKT format:

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

Here is the OGC WKT text of a spatialreference.org match (http://spatialreference.org/ref/epsg/4326/ogcwkt/) which I think is effectively the same projection. Most of the time the two strings are an exact match though, so I'm not completely sure:

GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]

As you can see, from a high level, these two look cannily similar. But from a low-level, it seems possible that a mismatch in the string reference ids might be a sign that they are effectively different..

8

The official OGC “Well-known Text Representation of Spatial Reference Systems” for EPSG 4326 (http://spatialreference.org/ref/epsg/4326/ogcwkt/) is (your second projection):

GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]

and not

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

that is the "ESRI WKT" dialect representation that you can find in http://spatialreference.org/ref/epsg/4326/esriwkt/

Confirmation with gdalsrsinfo:

$ gdalsrsinfo  -o wkt_all  "EPSG:4326"

OGC WKT :
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0,
        AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.0174532925199433,
        AUTHORITY["EPSG","9122"]],
    AUTHORITY["EPSG","4326"]]

OGC WKT (simple) :
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433]]

....

ESRI WKT :
GEOGCS["GCS_WGS_1984",
    DATUM["D_WGS_1984",
        SPHEROID["WGS_1984",6378137,298.257223563]],
    PRIMEM["Greenwich",0],
    UNIT["Degree",0.017453292519943295]]

There are other dialects of WKT. The most common dialect is this "ESRI WKT" dialect. But for projections other than WGS84, this one does not include the TOWGS84 and AUTHORITY nodes parameters:

$ gdalsrsinfo  -o wkt_all  "EPSG:4632"

 OGC WKT :
 GEOGCS["Combani 1950",
     DATUM["Combani_1950",
         SPHEROID["International 1924",6378388,297,
             AUTHORITY["EPSG","7022"]],
         TOWGS84[-382,-59,-262,0,0,0,0],
         AUTHORITY["EPSG","6632"]],
     PRIMEM["Greenwich",0,
         AUTHORITY["EPSG","8901"]],
     UNIT["degree",0.0174532925199433,
         AUTHORITY["EPSG","9122"]],
     AUTHORITY["EPSG","4632"]]

 OGC WKT (simple) :
 GEOGCS["Combani 1950",
     DATUM["Combani_1950",
         SPHEROID["International 1924",6378388,297],
         TOWGS84[-382,-59,-262,0,0,0,0]],
     PRIMEM["Greenwich",0],
     UNIT["degree",0.0174532925199433]]

 .....

 ESRI WKT :
 GEOGCS["Combani 1950",
     DATUM["D_Combani_1950",
         SPHEROID["International_1924",6378388,297]],
     PRIMEM["Greenwich",0],
     UNIT["Degree",0.017453292519943295]]

which creates problems for applications or libraries which do not take ESRI WKT into account (as libLAS) (those based on GDAL/OGR (QGIS, GRASS GIS, PostGIS ...), potentially, yes).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.