[gdal-dev] EPSG code with vertical datum

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] EPSG code with vertical datum

andrew.bell.ia@gmail.com

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 or is this a regression in version 3.0?

Thanks,

--
Andrew Bell
[hidden email]

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: EPSG code with vertical datum

Even Rouault-2
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

Even

--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: EPSG code with vertical datum

andrew.bell.ia@gmail.com


On Thu, May 30, 2019 at 5:06 AM Even Rouault <[hidden email]> 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?  I've tried, for example, "EPSG:4326+5103" and also gotten a failure.
 
--
Andrew Bell
[hidden email]

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: EPSG code with vertical datum

Even Rouault-2
On jeudi 30 mai 2019 10:17:35 CEST Andrew Bell wrote:

> On Thu, May 30, 2019 at 5:06 AM Even Rouault <[hidden email]>
>
> 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
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: EPSG code with vertical datum

Even Rouault-2
On jeudi 30 mai 2019 16:27:41 CEST Even Rouault wrote:

> On jeudi 30 mai 2019 10:17:35 CEST Andrew Bell wrote:
> > On Thu, May 30, 2019 at 5:06 AM Even Rouault <[hidden email]>
> >
> > 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.

More exacly, EPSG:5103 is not a vertical CRS, but a vertical datum.
EPSG:XXXX+YYYY requires XXXX to be a horizontal geographic/projected CRS and
YYYY to be a vertical CRS (not a vertical datum)

--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev