diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-09-04 15:46:13 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-09-08 11:11:03 +0200 |
| commit | 024f63731283c0026ad5b4dea4084bc48bbcc6f7 (patch) | |
| tree | 7264a3e7c9f5388a537d0d4dbb31bbeceea720b0 /include/proj | |
| parent | faf7ec2d7f5d489bfd187f1a3408f0f09f94282f (diff) | |
| download | PROJ-024f63731283c0026ad5b4dea4084bc48bbcc6f7.tar.gz PROJ-024f63731283c0026ad5b4dea4084bc48bbcc6f7.zip | |
Use in API and utilities WKT2_2019 instead of WKT2_2018 (fixes #1518)
- C API: PJ_GUESSED_WKT2_2019 is added, PJ_GUESSED_WKT2_2018 aliased to it
- C API: PJ_WKT2_2019[_SIMPLIFIED] is added, PJ_WKT2_2018[_SIMPLIFIED] alias to it
- C++ API: similarly for WKTFormatter::Convention::WKT2_2019[_SIMPLIFIED]
Those above changes should be fully backward API and ABI compatible.
projinfo changes:
- accept WKT2_2019 as value for -o switch. WKT2_2018 is still accepted (undocumented)
- output now uses 'WKT2_2019 string:', so might break scripts that would rely on that.
Other internal code references to WKT2_2018 changes to WKT2_2019, included
in tests.
Diffstat (limited to 'include/proj')
| -rw-r--r-- | include/proj/coordinatesystem.hpp | 8 | ||||
| -rw-r--r-- | include/proj/crs.hpp | 6 | ||||
| -rw-r--r-- | include/proj/internal/io_internal.hpp | 36 | ||||
| -rw-r--r-- | include/proj/io.hpp | 26 |
4 files changed, 42 insertions, 34 deletions
diff --git a/include/proj/coordinatesystem.hpp b/include/proj/coordinatesystem.hpp index ffb908fc..573f18e2 100644 --- a/include/proj/coordinatesystem.hpp +++ b/include/proj/coordinatesystem.hpp @@ -623,7 +623,7 @@ class PROJ_GCC_DLL TemporalCS : public CoordinateSystem { INLINED_MAKE_SHARED PROJ_INTERNAL std::string - getWKT2Type(bool use2018Keywords) const override = 0; + getWKT2Type(bool use2019Keywords) const override = 0; private: TemporalCS(const TemporalCS &other) = delete; @@ -661,7 +661,7 @@ class PROJ_GCC_DLL DateTimeTemporalCS final : public TemporalCS { const CoordinateSystemAxisNNPtr &axis); INLINED_MAKE_SHARED - PROJ_INTERNAL std::string getWKT2Type(bool use2018Keywords) const override; + PROJ_INTERNAL std::string getWKT2Type(bool use2019Keywords) const override; private: DateTimeTemporalCS(const DateTimeTemporalCS &other) = delete; @@ -697,7 +697,7 @@ class PROJ_GCC_DLL TemporalCountCS final : public TemporalCS { const CoordinateSystemAxisNNPtr &axis); INLINED_MAKE_SHARED - PROJ_INTERNAL std::string getWKT2Type(bool use2018Keywords) const override; + PROJ_INTERNAL std::string getWKT2Type(bool use2019Keywords) const override; private: TemporalCountCS(const TemporalCountCS &other) = delete; @@ -733,7 +733,7 @@ class PROJ_GCC_DLL TemporalMeasureCS final : public TemporalCS { const CoordinateSystemAxisNNPtr &axis); INLINED_MAKE_SHARED - PROJ_INTERNAL std::string getWKT2Type(bool use2018Keywords) const override; + PROJ_INTERNAL std::string getWKT2Type(bool use2019Keywords) const override; private: TemporalMeasureCS(const TemporalMeasureCS &other) = delete; diff --git a/include/proj/crs.hpp b/include/proj/crs.hpp index b83e0a6b..7062885d 100644 --- a/include/proj/crs.hpp +++ b/include/proj/crs.hpp @@ -1352,7 +1352,7 @@ struct PROJ_GCC_DLL DerivedEngineeringCRSTraits { inline static const std::string &CRSName(); inline static const std::string &WKTKeyword(); inline static const std::string &WKTBaseKeyword(); - static const bool wkt2_2018_only = true; + static const bool wkt2_2019_only = true; }; //! @endcond @@ -1390,7 +1390,7 @@ struct PROJ_GCC_DLL DerivedParametricCRSTraits { inline static const std::string &CRSName(); inline static const std::string &WKTKeyword(); inline static const std::string &WKTBaseKeyword(); - static const bool wkt2_2018_only = false; + static const bool wkt2_2019_only = false; }; //! @endcond @@ -1427,7 +1427,7 @@ struct PROJ_GCC_DLL DerivedTemporalCRSTraits { inline static const std::string &CRSName(); inline static const std::string &WKTKeyword(); inline static const std::string &WKTBaseKeyword(); - static const bool wkt2_2018_only = false; + static const bool wkt2_2019_only = false; }; //! @endcond diff --git a/include/proj/internal/io_internal.hpp b/include/proj/internal/io_internal.hpp index bd6d441d..781dfa6c 100644 --- a/include/proj/internal/io_internal.hpp +++ b/include/proj/internal/io_internal.hpp @@ -87,8 +87,8 @@ class WKTConstants { static const std::string CONVERSION; static const std::string METHOD; static const std::string REMARK; - static const std::string GEOGCRS; // WKT2-2018 - static const std::string BASEGEOGCRS; // WKT2-2018 + static const std::string GEOGCRS; // WKT2-2019 + static const std::string BASEGEOGCRS; // WKT2-2019 static const std::string SCOPE; static const std::string AREA; static const std::string BBOX; @@ -103,27 +103,27 @@ class WKTConstants { static const std::string TARGETCRS; static const std::string INTERPOLATIONCRS; static const std::string OPERATIONACCURACY; - static const std::string CONCATENATEDOPERATION; // WKT2-2018 - static const std::string STEP; // WKT2-2018 + static const std::string CONCATENATEDOPERATION; // WKT2-2019 + static const std::string STEP; // WKT2-2019 static const std::string BOUNDCRS; static const std::string ABRIDGEDTRANSFORMATION; static const std::string DERIVINGCONVERSION; static const std::string TDATUM; - static const std::string CALENDAR; // WKT2-2018 + static const std::string CALENDAR; // WKT2-2019 static const std::string TIMEORIGIN; static const std::string TIMECRS; static const std::string VERTICALEXTENT; static const std::string TIMEEXTENT; - static const std::string USAGE; // WKT2-2018 - static const std::string DYNAMIC; // WKT2-2018 - static const std::string FRAMEEPOCH; // WKT2-2018 - static const std::string MODEL; // WKT2-2018 - static const std::string VELOCITYGRID; // WKT2-2018 - static const std::string ENSEMBLE; // WKT2-2018 - static const std::string MEMBER; // WKT2-2018 - static const std::string ENSEMBLEACCURACY; // WKT2-2018 - static const std::string DERIVEDPROJCRS; // WKT2-2018 - static const std::string BASEPROJCRS; // WKT2-2018 + static const std::string USAGE; // WKT2-2019 + static const std::string DYNAMIC; // WKT2-2019 + static const std::string FRAMEEPOCH; // WKT2-2019 + static const std::string MODEL; // WKT2-2019 + static const std::string VELOCITYGRID; // WKT2-2019 + static const std::string ENSEMBLE; // WKT2-2019 + static const std::string MEMBER; // WKT2-2019 + static const std::string ENSEMBLEACCURACY; // WKT2-2019 + static const std::string DERIVEDPROJCRS; // WKT2-2019 + static const std::string BASEPROJCRS; // WKT2-2019 static const std::string EDATUM; static const std::string ENGCRS; static const std::string PDATUM; @@ -140,11 +140,11 @@ class WKTConstants { static const std::string GEODETICDATUM; static const std::string PROJECTEDCRS; static const std::string PRIMEMERIDIAN; - static const std::string GEOGRAPHICCRS; // WKT2-2018 - static const std::string TRF; // WKT2-2018 + static const std::string GEOGRAPHICCRS; // WKT2-2019 + static const std::string TRF; // WKT2-2019 static const std::string VERTICALCRS; static const std::string VERTICALDATUM; - static const std::string VRF; // WKT2-2018 + static const std::string VRF; // WKT2-2019 static const std::string TIMEDATUM; static const std::string TEMPORALQUANTITY; static const std::string ENGINEERINGDATUM; diff --git a/include/proj/io.hpp b/include/proj/io.hpp index 5b1a8588..e439b9ef 100644 --- a/include/proj/io.hpp +++ b/include/proj/io.hpp @@ -182,18 +182,24 @@ class PROJ_GCC_DLL WKTFormatter { WKT2_SIMPLIFIED, WKT2_2015_SIMPLIFIED = WKT2_SIMPLIFIED, - /** Full WKT2 string, conforming to ISO 19162:2018 / OGC 18-010, with - * (\ref WKT2_2018) all possible nodes and new keyword names. + /** Full WKT2 string, conforming to ISO 19162:2019 / OGC 18-010, with + * (\ref WKT2_2019) all possible nodes and new keyword names. * Non-normative list of differences: * <ul> - * <li>WKT2_2018 uses GEOGCRS / BASEGEOGCRS keywords for + * <li>WKT2_2019 uses GEOGCRS / BASEGEOGCRS keywords for * GeographicCRS.</li> * </ul> */ - WKT2_2018, + WKT2_2019, - /** WKT2_2018 with the simplification rule of WKT2_SIMPLIFIED */ - WKT2_2018_SIMPLIFIED, + /** Deprecated alias for WKT2_2019 */ + WKT2_2018 = WKT2_2019, + + /** WKT2_2019 with the simplification rule of WKT2_SIMPLIFIED */ + WKT2_2019_SIMPLIFIED, + + /** Deprecated alias for WKT2_2019_SIMPLIFIED */ + WKT2_2018_SIMPLIFIED = WKT2_2019_SIMPLIFIED, /** WKT1 as traditionally output by GDAL, deriving from OGC 01-009. A notable departure from WKT1_GDAL with respect to OGC 01-009 is @@ -322,7 +328,7 @@ class PROJ_GCC_DLL WKTFormatter { }; PROJ_INTERNAL Version version() const; - PROJ_INTERNAL bool use2018Keywords() const; + PROJ_INTERNAL bool use2019Keywords() const; PROJ_INTERNAL bool useESRIDialect() const; PROJ_INTERNAL const DatabaseContextPtr &databaseContext() const; @@ -736,8 +742,10 @@ class PROJ_GCC_DLL WKTParser { /** Guessed WKT "dialect" */ enum class PROJ_MSVC_DLL WKTGuessedDialect { - /** \ref WKT2_2018 */ - WKT2_2018, + /** \ref WKT2_2019 */ + WKT2_2019, + /** Deprecated alias for WKT2_2019 */ + WKT2_2018 = WKT2_2019, /** \ref WKT2_2015 */ WKT2_2015, /** \ref WKT1 */ |
