[gdal-dev] EPSG code with vertical datum

Even Rouault even.rouault at spatialys.com
Thu May 30 07:27:41 PDT 2019


On jeudi 30 mai 2019 10:17:35 CEST Andrew Bell wrote:
> On Thu, May 30, 2019 at 5:06 AM Even Rouault <even.rouault at spatialys.com>
> 
> wrote:
> > On mercredi 29 mai 2019 20:38:02 CEST Andrew Bell wrote:
> > > In earlier GDAL versions I could call
> > > 
> > > SetFromUserInput("EPSG:4326+4326");
> > > 
> > > without error.  I now get the following error:
> > > 
> > > (Error) GDAL failure (1) SetCompoundCS() fails, vertical component is
> > > not
> > > VERT_CS.
> > > 
> > > Was this a failure to detect a problem in older GDAL versions
> > 
> > Yes. EPSG:4326+4326 doesn't make any sense from a geodesic point of view.
> > If
> > you need WGS84 as a Geographic 3D CRS, you need to use EPSG:4979
> 
> So is the syntax "EPSG:<horizontal crs>+<vertical datum>" supported?  

Yes

> I've
> tried, for example, "EPSG:4326+5103" and also gotten a failure.

Doesn't work either in GDAL 2.4. EPSG:5103 doesn't exist. Perhaps you meant 
EPSG:5703 / NAVD88 height.

Then it works:

$ gdalsrsinfo EPSG:4326+5703

PROJ.4 : +proj=longlat +datum=WGS84 +vunits=m +no_defs

OGC WKT2:2018 :
COMPOUNDCRS["WGS 84 + NAVD88 height",
    GEOGCRS["WGS 84",
        DATUM["World Geodetic System 1984",
            ELLIPSOID["WGS 84",6378137,298.257223563,
                LENGTHUNIT["metre",1]]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433]],
        CS[ellipsoidal,2],
            AXIS["geodetic latitude (Lat)",north,
                ORDER[1],
                ANGLEUNIT["degree",0.0174532925199433]],
            AXIS["geodetic longitude (Lon)",east,
                ORDER[2],
                ANGLEUNIT["degree",0.0174532925199433]],
        USAGE[
            SCOPE["unknown"],
            AREA["World"],
            BBOX[-90,-180,90,180]],
        ID["EPSG",4326]],
    VERTCRS["NAVD88 height",
        VDATUM["North American Vertical Datum 1988"],
        CS[vertical,1],
            AXIS["gravity-related height (H)",up,
                LENGTHUNIT["metre",1]],
        USAGE[
            SCOPE["unknown"],
            AREA["North America - Mexico and USA - onshore"],
            BBOX[14.51,172.42,71.4,-66.91]],
        ID["EPSG",5703]]]


-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list