From acbd924b4c93911de43447bbfab7a0c34ca81274 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 6 Sep 2023 10:23:29 +0200 Subject: [PATCH] SpatialReference::set(): store coordinate epoch from OGRSpatialReference built from SetFromUserInput() This is useful to get the epoch for a SpatialReference built from a string like 'urn:ogc:def:coordinateMetadata:AUTHORTIY::CODE code' (since https://github.com/OSGeo/gdal/pull/8340 and https://github.com/OSGeo/PROJ/pull/3884), which resolves to a CoordinateMetadata object with a CRS and potentially a coordinate epoch --- pdal/SpatialReference.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pdal/SpatialReference.cpp b/pdal/SpatialReference.cpp index 52239278d4..092f37a6b1 100644 --- a/pdal/SpatialReference.cpp +++ b/pdal/SpatialReference.cpp @@ -237,6 +237,8 @@ void SpatialReference::set(std::string v) throw pdal_error(oss.str()); } + m_epoch = srs.GetCoordinateEpoch(); + m_wkt = exportToWkt(&srs); }