From cf855b24d2b901054bee90309cdc5df00dfb3085 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 28 Nov 2018 14:52:56 +0100 Subject: C API extensions and renaming - proj_obj_create_projected_XXXXX() are renamed to proj_obj_create_conversion_snake_case() and just instanciate a Conversion object - Advanced manipulation functions are moved to a dedicated section at bottom of proj.h - New C API needed for GDAL OGRSpatialReference --- include/proj/coordinateoperation.hpp | 3 +++ include/proj/coordinatesystem.hpp | 29 +++++++++++++++++++++++++++++ include/proj/crs.hpp | 11 +++++++++++ 3 files changed, 43 insertions(+) (limited to 'include/proj') diff --git a/include/proj/coordinateoperation.hpp b/include/proj/coordinateoperation.hpp index 4005176a..4dd85e96 100644 --- a/include/proj/coordinateoperation.hpp +++ b/include/proj/coordinateoperation.hpp @@ -1286,6 +1286,9 @@ class PROJ_GCC_DLL Conversion : public SingleOperation { PROJ_INTERNAL ConversionNNPtr shallowClone() const; + PROJ_INTERNAL ConversionNNPtr alterParametersLinearUnit( + const common::UnitOfMeasure &unit, bool convertToNewUnit) const; + //! @endcond protected: diff --git a/include/proj/coordinatesystem.hpp b/include/proj/coordinatesystem.hpp index 89c2f99c..a301adab 100644 --- a/include/proj/coordinatesystem.hpp +++ b/include/proj/coordinatesystem.hpp @@ -208,6 +208,9 @@ class PROJ_GCC_DLL CoordinateSystemAxis final PROJ_INTERNAL static CoordinateSystemAxisNNPtr createLONG_EAST(const common::UnitOfMeasure &unit); + PROJ_INTERNAL CoordinateSystemAxisNNPtr + alterUnit(const common::UnitOfMeasure &newUnit) const; + //! @endcond private: @@ -372,6 +375,13 @@ class PROJ_GCC_DLL EllipsoidalCS final : public CoordinateSystem { }; PROJ_INTERNAL AxisOrder axisOrder() const; + + PROJ_INTERNAL EllipsoidalCSNNPtr + alterAngularUnit(const common::UnitOfMeasure &angularUnit) const; + + PROJ_INTERNAL EllipsoidalCSNNPtr + alterLinearUnit(const common::UnitOfMeasure &linearUnit) const; + //! @endcond protected: @@ -416,6 +426,13 @@ class PROJ_GCC_DLL VerticalCS final : public CoordinateSystem { PROJ_DLL static VerticalCSNNPtr createGravityRelatedHeight(const common::UnitOfMeasure &unit); + PROJ_PRIVATE : + //! @cond Doxygen_Suppress + PROJ_INTERNAL VerticalCSNNPtr + alterUnit(const common::UnitOfMeasure &unit) const; + + //! @endcond + protected: PROJ_INTERNAL explicit VerticalCS(const CoordinateSystemAxisNNPtr &axisIn); INLINED_MAKE_SHARED @@ -460,11 +477,23 @@ class PROJ_GCC_DLL CartesianCS final : public CoordinateSystem { const CoordinateSystemAxisNNPtr &axis1, const CoordinateSystemAxisNNPtr &axis2, const CoordinateSystemAxisNNPtr &axis3); + PROJ_DLL static CartesianCSNNPtr createEastingNorthing(const common::UnitOfMeasure &unit); + + PROJ_DLL static CartesianCSNNPtr + createNorthingEasting(const common::UnitOfMeasure &unit); + PROJ_DLL static CartesianCSNNPtr createGeocentric(const common::UnitOfMeasure &unit); + PROJ_PRIVATE : + //! @cond Doxygen_Suppress + PROJ_INTERNAL CartesianCSNNPtr + alterUnit(const common::UnitOfMeasure &unit) const; + + //! @endcond + protected: PROJ_INTERNAL explicit CartesianCS( const std::vector &axisIn); diff --git a/include/proj/crs.hpp b/include/proj/crs.hpp index 10e0a639..bdb36cd4 100644 --- a/include/proj/crs.hpp +++ b/include/proj/crs.hpp @@ -108,8 +108,16 @@ class PROJ_GCC_DLL CRS : public common::ObjectUsage { PROJ_FOR_TEST CRSNNPtr shallowClone() const; + PROJ_FOR_TEST CRSNNPtr alterName(const std::string &newName) const; + PROJ_INTERNAL const std::string &getExtensionProj4() const noexcept; + PROJ_FOR_TEST CRSNNPtr + alterGeodeticCRS(const GeodeticCRSNNPtr &newGeodCRS) const; + + PROJ_FOR_TEST CRSNNPtr + alterCSLinearUnit(const common::UnitOfMeasure &unit) const; + //! @endcond protected: @@ -557,6 +565,9 @@ class PROJ_GCC_DLL ProjectedCRS final : public DerivedCRS, PROJ_INTERNAL void _exportToWKT(io::WKTFormatter *formatter) const override; // throw(io::FormattingException) + PROJ_FOR_TEST ProjectedCRSNNPtr alterParametersLinearUnit( + const common::UnitOfMeasure &unit, bool convertToNewUnit) const; + //! @endcond protected: -- cgit v1.2.3