diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-02-24 15:40:25 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-02-25 00:19:19 +0100 |
| commit | 1ce2cc80a4a0ff248cda778ae16de51946fa61b7 (patch) | |
| tree | 8d0bda34e07d8637f6bc6c29c86400b6ce81c08c /include | |
| parent | 254bead44a3fe11a24418bf71813298aa2b386f1 (diff) | |
| download | PROJ-1ce2cc80a4a0ff248cda778ae16de51946fa61b7.tar.gz PROJ-1ce2cc80a4a0ff248cda778ae16de51946fa61b7.zip | |
CompoundCRS::create(): reject combinations of components not allowed by ISO 19111
Diffstat (limited to 'include')
| -rw-r--r-- | include/proj/crs.hpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/include/proj/crs.hpp b/include/proj/crs.hpp index 3b760099..30134cb4 100644 --- a/include/proj/crs.hpp +++ b/include/proj/crs.hpp @@ -834,6 +834,22 @@ class PROJ_GCC_DLL ParametricCRS : virtual public SingleCRS { // --------------------------------------------------------------------------- +/** \brief Exception thrown when attempting to create an invalid compound CRS + */ +class PROJ_GCC_DLL InvalidCompoundCRSException : public util::Exception { + public: + //! @cond Doxygen_Suppress + PROJ_INTERNAL explicit InvalidCompoundCRSException(const char *message); + PROJ_INTERNAL explicit InvalidCompoundCRSException( + const std::string &message); + PROJ_DLL + InvalidCompoundCRSException(const InvalidCompoundCRSException &other); + PROJ_DLL ~InvalidCompoundCRSException() override; + //! @endcond +}; + +// --------------------------------------------------------------------------- + class CompoundCRS; /** Shared pointer of CompoundCRS */ using CompoundCRSPtr = std::shared_ptr<CompoundCRS>; @@ -873,7 +889,8 @@ class PROJ_GCC_DLL CompoundCRS final : public CRS, PROJ_DLL static CompoundCRSNNPtr create(const util::PropertyMap &properties, - const std::vector<CRSNNPtr> &components); + const std::vector<CRSNNPtr> + &components); // throw InvalidCompoundCRSException protected: // relaxed: standard say SingleCRSNNPtr |
