From 94578ea8ff38f4bc6b1f6f52b80ecf7359f5dfc2 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 20 Feb 2019 18:04:35 +0100 Subject: CoordinateOperation: add a hasBallparkTransformation() method that can be used to know if it includes a very approximative transformation term --- include/proj/internal/coordinateoperation_internal.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/proj/internal') diff --git a/include/proj/internal/coordinateoperation_internal.hpp b/include/proj/internal/coordinateoperation_internal.hpp index 8428b8bf..65b786b2 100644 --- a/include/proj/internal/coordinateoperation_internal.hpp +++ b/include/proj/internal/coordinateoperation_internal.hpp @@ -246,7 +246,8 @@ class PROJBasedOperation : public SingleOperation { create(const util::PropertyMap &properties, const io::IPROJStringExportableNNPtr &projExportable, bool inverse, const crs::CRSNNPtr &sourceCRS, const crs::CRSNNPtr &targetCRS, - const std::vector &accuracies); + const std::vector &accuracies, + bool hasRoughTransformation); std::set gridsNeeded(const io::DatabaseContextPtr &databaseContext) const override; -- cgit v1.2.3 From 2f8bd934860b135044c5122e3272f7cc41ba81e7 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 26 Feb 2019 20:30:08 +0100 Subject: Rename internal constant to avoid conflict with macro in Solaris system headers --- include/proj/internal/io_internal.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/proj/internal') diff --git a/include/proj/internal/io_internal.hpp b/include/proj/internal/io_internal.hpp index be6a11bd..3b0e7c0f 100644 --- a/include/proj/internal/io_internal.hpp +++ b/include/proj/internal/io_internal.hpp @@ -76,7 +76,8 @@ class WKTConstants { static const std::string SCALEUNIT; static const std::string TIMEUNIT; static const std::string ELLIPSOID; - static const std::string CS; + // underscore, since there is a CS macro in Solaris system headers + static const std::string CS_; static const std::string ID; static const std::string PROJCRS; static const std::string BASEGEODCRS; -- cgit v1.2.3 From 1a2513badd1406ef061fd044273268a1e0ab3eed Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 1 Mar 2019 14:53:22 +0100 Subject: Doc: rename to ISO-19111:2019 And publish link to corresponding promoted and public OGC doc: http://docs.opengeospatial.org/as/18-005r4/18-005r4.html --- include/proj/internal/coordinateoperation_constants.hpp | 2 +- include/proj/internal/coordinateoperation_internal.hpp | 2 +- include/proj/internal/coordinatesystem_internal.hpp | 2 +- include/proj/internal/internal.hpp | 2 +- include/proj/internal/io_internal.hpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'include/proj/internal') diff --git a/include/proj/internal/coordinateoperation_constants.hpp b/include/proj/internal/coordinateoperation_constants.hpp index accb4a1e..9d65dab8 100644 --- a/include/proj/internal/coordinateoperation_constants.hpp +++ b/include/proj/internal/coordinateoperation_constants.hpp @@ -1,7 +1,7 @@ /****************************************************************************** * * Project: PROJ - * Purpose: ISO19111:2018 implementation + * Purpose: ISO19111:2019 implementation * Author: Even Rouault * ****************************************************************************** diff --git a/include/proj/internal/coordinateoperation_internal.hpp b/include/proj/internal/coordinateoperation_internal.hpp index 65b786b2..3dbb8e0b 100644 --- a/include/proj/internal/coordinateoperation_internal.hpp +++ b/include/proj/internal/coordinateoperation_internal.hpp @@ -1,7 +1,7 @@ /****************************************************************************** * * Project: PROJ - * Purpose: ISO19111:2018 implementation + * Purpose: ISO19111:2019 implementation * Author: Even Rouault * ****************************************************************************** diff --git a/include/proj/internal/coordinatesystem_internal.hpp b/include/proj/internal/coordinatesystem_internal.hpp index 63c5f7af..ccef2e7d 100644 --- a/include/proj/internal/coordinatesystem_internal.hpp +++ b/include/proj/internal/coordinatesystem_internal.hpp @@ -1,7 +1,7 @@ /****************************************************************************** * * Project: PROJ - * Purpose: ISO19111:2018 implementation + * Purpose: ISO19111:2019 implementation * Author: Even Rouault * ****************************************************************************** diff --git a/include/proj/internal/internal.hpp b/include/proj/internal/internal.hpp index b16e12bc..84fc1c2b 100644 --- a/include/proj/internal/internal.hpp +++ b/include/proj/internal/internal.hpp @@ -1,7 +1,7 @@ /****************************************************************************** * * Project: PROJ - * Purpose: ISO19111:2018 implementation + * Purpose: ISO19111:2019 implementation * Author: Even Rouault * ****************************************************************************** diff --git a/include/proj/internal/io_internal.hpp b/include/proj/internal/io_internal.hpp index 3b0e7c0f..403698db 100644 --- a/include/proj/internal/io_internal.hpp +++ b/include/proj/internal/io_internal.hpp @@ -1,7 +1,7 @@ /****************************************************************************** * * Project: PROJ - * Purpose: ISO19111:2018 implementation + * Purpose: ISO19111:2019 implementation * Author: Even Rouault * ****************************************************************************** -- cgit v1.2.3 From e1350cac43d5a9854207af3fb318a74be7fcd12f Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sun, 17 Mar 2019 19:16:04 +0100 Subject: Fix some issues raised by latest cppcheck - coordinateoperation_internal.hpp: missing 'explicit' keyword - proj.cpp: unused 'generic' member in enumeration - init.cpp: useless assignment to a_orig and es_orig, because done again a few lines below. - crs.cpp: unused variable - datum.cpp: inefficient use of find() function - io.cpp: * missing 'static' qualifier for method * useles ternary test (left and right have same value) - aeqd.cpp: useless assignment of inv and fwd, snice done again a few lines below - isea.cpp: useless assignment of resolution and aperture since done again a few lines below, and with default values when params are absent - mod_ster.cpp: useless assignment of lp.lam, overriden in below code paths. - stere.cpp: false positive, but better not modify another variable than the iterator in a for() loop. --- include/proj/internal/coordinateoperation_internal.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/proj/internal') diff --git a/include/proj/internal/coordinateoperation_internal.hpp b/include/proj/internal/coordinateoperation_internal.hpp index 3dbb8e0b..680e805e 100644 --- a/include/proj/internal/coordinateoperation_internal.hpp +++ b/include/proj/internal/coordinateoperation_internal.hpp @@ -253,7 +253,7 @@ class PROJBasedOperation : public SingleOperation { gridsNeeded(const io::DatabaseContextPtr &databaseContext) const override; protected: - PROJBasedOperation(const OperationMethodNNPtr &methodIn); + explicit PROJBasedOperation(const OperationMethodNNPtr &methodIn); void _exportToPROJString(io::PROJStringFormatter *formatter) const override; // throw(FormattingException) -- cgit v1.2.3 From 8763ea7f01bd349df29c5c4ce3b4edd6252eff37 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sun, 24 Mar 2019 20:01:45 +0100 Subject: WKT2 parser: update to OGC 18-010r6 - Allow ID[] in base CRS of Derived CRS - Allow VERSION[] in non-conversion coordinate operations - Use VERSION[] to set operationVersion member of CoordinateOperation - Export operationVersion in WKT2:2018 --- include/proj/internal/io_internal.hpp | 1 + 1 file changed, 1 insertion(+) (limited to 'include/proj/internal') diff --git a/include/proj/internal/io_internal.hpp b/include/proj/internal/io_internal.hpp index 403698db..f614fc67 100644 --- a/include/proj/internal/io_internal.hpp +++ b/include/proj/internal/io_internal.hpp @@ -133,6 +133,7 @@ class WKTConstants { static const std::string BASEENGCRS; static const std::string BASEPARAMCRS; static const std::string BASETIMECRS; + static const std::string VERSION; // WKT2 alternate (longer or shorter) static const std::string GEODETICCRS; -- cgit v1.2.3 From 421653b9c61f253e800ca749e9b1a9ba0688d72a Mon Sep 17 00:00:00 2001 From: Mike Taves Date: Tue, 16 Apr 2019 09:38:51 +0000 Subject: CMake: better support for Intel compiler --- include/proj/internal/internal.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/proj/internal') diff --git a/include/proj/internal/internal.hpp b/include/proj/internal/internal.hpp index 84fc1c2b..220c137b 100644 --- a/include/proj/internal/internal.hpp +++ b/include/proj/internal/internal.hpp @@ -53,7 +53,7 @@ #if ((defined(__clang__) && \ (__clang_major__ > 3 || \ (__clang_major__ == 3 && __clang_minor__ >= 7))) || \ - __GNUC__ >= 7) + (__GNUC__ >= 7 && !__INTEL_COMPILER)) /** Macro for fallthrough in a switch case construct */ #define PROJ_FALLTHROUGH [[clang::fallthrough]]; #else -- cgit v1.2.3 From d9e2a15f2e17b6710ccffa3e271595e006ceadf2 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 16 Apr 2019 19:26:16 +0200 Subject: createOperations(): do not attempt using a unrelated datum intermediate when doing geog2D<-->geog3D conversions of same datum Seen when testing transformations between "CR 05" (EPSG:5365) and "CR-SIRGAS" (EPSG:8907) which require going through their corresponding 3D GeogCRS to find a Helmert transformation. --- include/proj/internal/coordinateoperation_internal.hpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'include/proj/internal') diff --git a/include/proj/internal/coordinateoperation_internal.hpp b/include/proj/internal/coordinateoperation_internal.hpp index 680e805e..207c20b4 100644 --- a/include/proj/internal/coordinateoperation_internal.hpp +++ b/include/proj/internal/coordinateoperation_internal.hpp @@ -109,8 +109,9 @@ using InverseCoordinateOperationNNPtr = util::nn; */ class InverseCoordinateOperation : virtual public CoordinateOperation { public: - InverseCoordinateOperation(const CoordinateOperationNNPtr &forwardOperation, - bool wktSupportsInversion); + InverseCoordinateOperation( + const CoordinateOperationNNPtr &forwardOperationIn, + bool wktSupportsInversion); ~InverseCoordinateOperation() override; @@ -124,6 +125,10 @@ class InverseCoordinateOperation : virtual public CoordinateOperation { CoordinateOperationNNPtr inverse() const override; + const CoordinateOperationNNPtr &forwardOperation() const { + return forwardOperation_; + } + protected: CoordinateOperationNNPtr forwardOperation_; bool wktSupportsInversion_; @@ -174,6 +179,8 @@ class InverseConversion : public Conversion, public InverseCoordinateOperation { #endif static CoordinateOperationNNPtr create(const ConversionNNPtr &forward); + + CoordinateOperationNNPtr _shallowClone() const override; }; // --------------------------------------------------------------------------- @@ -204,6 +211,8 @@ class InverseTransformation : public Transformation, return InverseCoordinateOperation::inverse(); } + TransformationNNPtr inverseAsTransformation() const; + #ifdef _MSC_VER // To avoid a warning C4250: // 'osgeo::proj::operation::InverseTransformation': inherits @@ -216,6 +225,8 @@ class InverseTransformation : public Transformation, #endif static TransformationNNPtr create(const TransformationNNPtr &forward); + + CoordinateOperationNNPtr _shallowClone() const override; }; // --------------------------------------------------------------------------- @@ -253,11 +264,14 @@ class PROJBasedOperation : public SingleOperation { gridsNeeded(const io::DatabaseContextPtr &databaseContext) const override; protected: + PROJBasedOperation(const PROJBasedOperation &) = default; explicit PROJBasedOperation(const OperationMethodNNPtr &methodIn); void _exportToPROJString(io::PROJStringFormatter *formatter) const override; // throw(FormattingException) + CoordinateOperationNNPtr _shallowClone() const override; + INLINED_MAKE_SHARED private: -- cgit v1.2.3 From 61cf8c5b29c82ab7e46b207bd125eaad49c03021 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 6 May 2019 19:45:27 +0200 Subject: createOperations(): for 'Amersfoort / RD New + NAP height' (EPSG:7415) to ETRS89 (EPSG:4937), make sure that the vgridshift is applied first (ie on Amersfoort datum) before the hgridshift --- include/proj/internal/internal.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/proj/internal') diff --git a/include/proj/internal/internal.hpp b/include/proj/internal/internal.hpp index 220c137b..2222a264 100644 --- a/include/proj/internal/internal.hpp +++ b/include/proj/internal/internal.hpp @@ -140,6 +140,9 @@ std::string toupper(const std::string &osStr); PROJ_FOR_TEST std::vector split(const std::string &osStr, char separator); +PROJ_FOR_TEST std::vector split(const std::string &osStr, + const std::string &separator); + bool ci_equal(const char *a, const char *b) noexcept; #ifdef SUPPORT_DELETED_FUNCTION -- cgit v1.2.3