diff options
| author | Even Rouault <even.rouault@mines-paris.org> | 2019-01-09 16:24:16 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-09 16:24:16 +0100 |
| commit | 5b75e5fdccc531f7b0e3dcd636fa1ff3500bb071 (patch) | |
| tree | c718433341207fa688e85e145cf83ac4149491ab /include | |
| parent | 11bc4783ca2c5fed8603d0c49f5aea102eca2432 (diff) | |
| parent | a6899c98a6455dc022bdd6785af3e528488422b8 (diff) | |
| download | PROJ-5b75e5fdccc531f7b0e3dcd636fa1ff3500bb071.tar.gz PROJ-5b75e5fdccc531f7b0e3dcd636fa1ff3500bb071.zip | |
Merge pull request #1217 from rouault/remove_proj_5_crs_export
ISO19111: remove PROJ.5 specific format for CRS (refs #1214)
Diffstat (limited to 'include')
| -rw-r--r-- | include/proj/crs.hpp | 31 | ||||
| -rw-r--r-- | include/proj/internal/coordinateoperation_constants.hpp | 2 | ||||
| -rw-r--r-- | include/proj/internal/esri_projection_mappings.hpp | 2 | ||||
| -rw-r--r-- | include/proj/io.hpp | 29 |
4 files changed, 26 insertions, 38 deletions
diff --git a/include/proj/crs.hpp b/include/proj/crs.hpp index cc9fdeb9..65414d7d 100644 --- a/include/proj/crs.hpp +++ b/include/proj/crs.hpp @@ -502,9 +502,6 @@ class PROJ_GCC_DLL DerivedCRS : virtual public SingleCRS { PROJ_INTERNAL void setDerivingConversionCRS(); - PROJ_INTERNAL void baseExportToPROJString( - io::PROJStringFormatter *formatter) const; // throw(FormattingException) - PROJ_INTERNAL void baseExportToWKT( io::WKTFormatter *&formatter, const std::string &keyword, const std::string &baseKeyword) const; // throw(FormattingException) @@ -977,9 +974,6 @@ class PROJ_GCC_DLL DerivedGeodeticCRS final : public GeodeticCRS, const cs::SphericalCSNNPtr &csIn); PROJ_INTERNAL DerivedGeodeticCRS(const DerivedGeodeticCRS &other); - PROJ_INTERNAL void _exportToPROJString(io::PROJStringFormatter *formatter) - const override; // throw(FormattingException) - PROJ_INTERNAL CRSNNPtr _shallowClone() const override; PROJ_INTERNAL bool @@ -990,6 +984,10 @@ class PROJ_GCC_DLL DerivedGeodeticCRS final : public GeodeticCRS, PROJ_INTERNAL std::list<std::pair<CRSNNPtr, int>> _identify(const io::AuthorityFactoryPtr &authorityFactory) const override; + // cppcheck-suppress functionStatic + PROJ_INTERNAL void _exportToPROJString(io::PROJStringFormatter *formatter) + const override; // throw(FormattingException) + INLINED_MAKE_SHARED private: @@ -1041,9 +1039,6 @@ class PROJ_GCC_DLL DerivedGeographicCRS final : public GeographicCRS, const cs::EllipsoidalCSNNPtr &csIn); PROJ_INTERNAL DerivedGeographicCRS(const DerivedGeographicCRS &other); - PROJ_INTERNAL void _exportToPROJString(io::PROJStringFormatter *formatter) - const override; // throw(FormattingException) - PROJ_INTERNAL CRSNNPtr _shallowClone() const override; PROJ_INTERNAL bool @@ -1054,6 +1049,10 @@ class PROJ_GCC_DLL DerivedGeographicCRS final : public GeographicCRS, PROJ_INTERNAL std::list<std::pair<CRSNNPtr, int>> _identify(const io::AuthorityFactoryPtr &authorityFactory) const override; + // cppcheck-suppress functionStatic + PROJ_INTERNAL void _exportToPROJString(io::PROJStringFormatter *formatter) + const override; // throw(FormattingException) + INLINED_MAKE_SHARED private: @@ -1078,9 +1077,7 @@ using DerivedProjectedCRSNNPtr = util::nn<DerivedProjectedCRSPtr>; * * \remark Implements DerivedProjectedCRS from \ref ISO_19111_2018 */ -class PROJ_GCC_DLL DerivedProjectedCRS final - : public DerivedCRS, - public io::IPROJStringExportable { +class PROJ_GCC_DLL DerivedProjectedCRS final : public DerivedCRS { public: //! @cond Doxygen_Suppress PROJ_DLL ~DerivedProjectedCRS() override; @@ -1106,9 +1103,6 @@ class PROJ_GCC_DLL DerivedProjectedCRS final const cs::CoordinateSystemNNPtr &csIn); PROJ_INTERNAL DerivedProjectedCRS(const DerivedProjectedCRS &other); - PROJ_INTERNAL void _exportToPROJString(io::PROJStringFormatter *formatter) - const override; // throw(FormattingException) - PROJ_INTERNAL CRSNNPtr _shallowClone() const override; PROJ_INTERNAL bool @@ -1164,9 +1158,6 @@ class PROJ_GCC_DLL DerivedVerticalCRS final : public VerticalCRS, const cs::VerticalCSNNPtr &csIn); PROJ_INTERNAL DerivedVerticalCRS(const DerivedVerticalCRS &other); - PROJ_INTERNAL void _exportToPROJString(io::PROJStringFormatter *formatter) - const override; // throw(FormattingException) - PROJ_INTERNAL CRSNNPtr _shallowClone() const override; PROJ_INTERNAL bool @@ -1177,6 +1168,10 @@ class PROJ_GCC_DLL DerivedVerticalCRS final : public VerticalCRS, PROJ_INTERNAL std::list<std::pair<CRSNNPtr, int>> _identify(const io::AuthorityFactoryPtr &authorityFactory) const override; + // cppcheck-suppress functionStatic + PROJ_INTERNAL void _exportToPROJString(io::PROJStringFormatter *formatter) + const override; // throw(FormattingException) + INLINED_MAKE_SHARED private: diff --git a/include/proj/internal/coordinateoperation_constants.hpp b/include/proj/internal/coordinateoperation_constants.hpp index 53a2622e..accb4a1e 100644 --- a/include/proj/internal/coordinateoperation_constants.hpp +++ b/include/proj/internal/coordinateoperation_constants.hpp @@ -1240,7 +1240,7 @@ static const MethodMapping otherMethodMappings[] = { }; // end of anonymous namespace -} +} // namespace // --------------------------------------------------------------------------- diff --git a/include/proj/internal/esri_projection_mappings.hpp b/include/proj/internal/esri_projection_mappings.hpp index 4ceeb300..423f28be 100644 --- a/include/proj/internal/esri_projection_mappings.hpp +++ b/include/proj/internal/esri_projection_mappings.hpp @@ -880,7 +880,7 @@ static const ESRIMethodMapping esriMappings[] = { // --------------------------------------------------------------------------- // end of anonymous namespace -} +} // namespace //! @endcond diff --git a/include/proj/io.hpp b/include/proj/io.hpp index ec3301f8..7f7639cd 100644 --- a/include/proj/io.hpp +++ b/include/proj/io.hpp @@ -373,7 +373,9 @@ class PROJ_GCC_DLL PROJStringFormatter { //! @cond Doxygen_Suppress PROJ_DLL void - startInversion(); + setCRSExport(bool b); + PROJ_INTERNAL bool getCRSExport() const; + PROJ_DLL void startInversion(); PROJ_DLL void stopInversion(); PROJ_INTERNAL bool isInverted() const; PROJ_INTERNAL bool getUseETMercForTMerc(bool &settingSetOut) const; @@ -510,24 +512,15 @@ class PROJ_GCC_DLL IPROJStringExportable { /** \brief Builds a PROJ string representation. * * <ul> - * <li>For PROJStringFormatter::Convention::PROJ_5 (the default), return - * strings that generally express PROJ.5 pipelines. + * <li>For PROJStringFormatter::Convention::PROJ_5 (the default), * <ul> - * <li>For a crs::GeographicCRS, returns a string expressing the - * transformation from geographic coordinates expressed in radian with - * longitude, latitude order, and with respect to the international - * reference meridian, into geographic coordinates expressed in the units - * and axis order of the CRS, taking into account its prime meridian.</li> - * <li>For a geocentric crs::GeodeticCRS, returns a string expressing the - * transformation from geographic coordinates expressed in radian with - * longitude, latitude order, and with respect to the international - * reference meridian, into geocentric coordinates.</li> - * <li>For a - * crs::ProjectedCRS / crs::DerivedGeographicCRS / crs::DerivedProjectedCRS, - * returns a string expressing the transformation from the base CRS to the - * CRS</li> - * <li>For a crs::BoundCRS, throws a FormattingException.</li> - * <li>For operation::CoordinateTransformations, returns a PROJ + * <li>For a crs::CRS, returns the same as + * PROJStringFormatter::Convention::PROJ_4. It should be noted that the + * export of a CRS as a PROJ string may cause loss of many important aspects + * of a CRS definition. Consequently it is discouraged to use it for + * interoperability in newer projects. The choice of a WKT representation + * will be a better option.</li> + * <li>For operation::CoordinateOperation, returns a PROJ * pipeline.</li> * </ul> * |
