[gdal-dev] Inconsistencies in WKT CRS representations

Small, Jennifer L. (GSFC-618.0)[SCIENCE SYSTEMS AND APPLICATIONS INC] jennifer.l.small at nasa.gov
Wed Aug 16 08:59:07 PDT 2023


I’m noticing subtle differences between the WKT representations for a given projection when consulting spatialreference.org, epsg.io, and the output from gdalinfo on an orthorectified raster. For example, for Africa Albers (ESRI code 102022):

1) gdalinfo output for a raster, CRS set with “SetFromUserInput(‘ESRI:102022’)”:

PROJCRS["Africa_Albers_Equal_Area_Conic",
    BASEGEOGCRS["WGS 84",
        DATUM["World Geodetic System 1984",
            ELLIPSOID["WGS 84",6378137,298.257223563,
                LENGTHUNIT["metre",1]]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433]],
        ID["EPSG",4326]],
    CONVERSION["Albers Equal Area",
        METHOD["Albers Equal Area",
            ID["EPSG",9822]],
        PARAMETER["Latitude of false origin",0,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8821]],
        PARAMETER["Longitude of false origin",25,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8822]],
        PARAMETER["Latitude of 1st standard parallel",20,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8823]],
        PARAMETER["Latitude of 2nd standard parallel",-23,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8824]],
        PARAMETER["Easting at false origin",0,
            LENGTHUNIT["metre",1],
            ID["EPSG",8826]],
        PARAMETER["Northing at false origin",0,
            LENGTHUNIT["metre",1],
            ID["EPSG",8827]]],
    CS[Cartesian,2],
        AXIS["easting",east,
            ORDER[1],
            LENGTHUNIT["metre",1,
                ID["EPSG",9001]]],
        AXIS["northing",north,
            ORDER[2],
            LENGTHUNIT["metre",1,
                ID["EPSG",9001]]]]

2) WKT for ESRI 102022 at https://spatialreference.org/ref/esri/102022/prettywkt/

PROJCS["Africa_Albers_Equal_Area_Conic",
    GEOGCS["GCS_WGS_1984",
        DATUM["WGS_1984",
            SPHEROID["WGS_1984",6378137,298.257223563]],
        PRIMEM["Greenwich",0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Albers_Conic_Equal_Area"],
    PARAMETER["False_Easting",0],
    PARAMETER["False_Northing",0],
    PARAMETER["longitude_of_center",25],
    PARAMETER["Standard_Parallel_1",20],
    PARAMETER["Standard_Parallel_2",-23],
    PARAMETER["latitude_of_center",0],
    UNIT["Meter",1],
    AUTHORITY["EPSG","102022"]]

3) WKT for ESRI 102022 at https://epsg.io/102022


PROJCS["Africa_Albers_Equal_Area_Conic",

    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"]],

    PROJECTION["Albers_Conic_Equal_Area"],

    PARAMETER["latitude_of_center",0],

    PARAMETER["longitude_of_center",25],

    PARAMETER["standard_parallel_1",20],

    PARAMETER["standard_parallel_2",-23],

    PARAMETER["false_easting",0],

    PARAMETER["false_northing",0],

    UNIT["metre",1,

        AUTHORITY["EPSG","9001"]],

    AXIS["Easting",EAST],

    AXIS["Northing",NORTH],

    AUTHORITY["ESRI","102022"]]

Note that the projection parameters are all the same (but with slightly different naming conventions), but the CRS AUTHORITY line does not exist in the GDAL version, is EPSG 102022 in the spatialreference.org version, and is ESRI 102022 in the epsg.io version.

Is it best to represent the CRS with WKT rather than importing using SetFromUserInput with EPSG:code or ESRI:code? If so, what source has the definitive WKT, spatialreference.org or epsg.io?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230816/a1bba1a4/attachment-0001.htm>


More information about the gdal-dev mailing list