aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-11-21 15:20:56 +0100
committerGitHub <noreply@github.com>2020-11-21 15:20:56 +0100
commit3f4058308bc328765dcf6ecdcb8fa7a644f3cc19 (patch)
treeb4d495b8c1b175c3c1c5594f8b7aed2941f897be /include
parent3b3ec2bd6ac45026b25681057a06c64905b18ec5 (diff)
parentc2edd467c591f936f4eb81dfadd62a20f6bff371 (diff)
downloadPROJ-3f4058308bc328765dcf6ecdcb8fa7a644f3cc19.tar.gz
PROJ-3f4058308bc328765dcf6ecdcb8fa7a644f3cc19.zip
Merge pull request #2441 from rouault/fix_obtran_towgs84
createOperation(): make it work properly when one of the CRS is a BoundCRS of a DerivedGeographicCRS (+proj=ob_tran +o_proj=lonlat +towgs84=....)
Diffstat (limited to 'include')
-rw-r--r--include/proj/crs.hpp5
-rw-r--r--include/proj/util.hpp8
2 files changed, 13 insertions, 0 deletions
diff --git a/include/proj/crs.hpp b/include/proj/crs.hpp
index ec755728..b921f4bb 100644
--- a/include/proj/crs.hpp
+++ b/include/proj/crs.hpp
@@ -340,6 +340,11 @@ class PROJ_GCC_DLL GeodeticCRS : virtual public SingleCRS,
PROJ_INTERNAL std::list<std::pair<CRSNNPtr, int>>
_identify(const io::AuthorityFactoryPtr &authorityFactory) const override;
+ PROJ_INTERNAL bool
+ _isEquivalentToNoTypeCheck(const util::IComparable *other,
+ util::IComparable::Criterion criterion,
+ const io::DatabaseContextPtr &dbContext) const;
+
INLINED_MAKE_SHARED
private:
diff --git a/include/proj/util.hpp b/include/proj/util.hpp
index 3d85e579..2ada4f79 100644
--- a/include/proj/util.hpp
+++ b/include/proj/util.hpp
@@ -213,6 +213,14 @@ template <typename T> using nn_shared_ptr = nn<std::shared_ptr<T>>;
// To avoid formatting differences between clang-format 3.8 and 7
#define PROJ_NOEXCEPT noexcept
+//! @cond Doxygen_Suppress
+// isOfExactType<MyType>(*p) checks that the type of *p is exactly MyType
+template <typename TemplateT, typename ObjectT>
+inline bool isOfExactType(const ObjectT &o) {
+ return typeid(TemplateT).hash_code() == typeid(o).hash_code();
+}
+//! @endcond
+
/** \brief Loose transposition of [std::optional]
* (https://en.cppreference.com/w/cpp/utility/optional) available from C++17. */
template <class T> class optional {