aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2019-02-18 09:45:18 +0100
committerGitHub <noreply@github.com>2019-02-18 09:45:18 +0100
commit4277e15cefae5bb1d49312498e0f626b652e7524 (patch)
tree189e5bc87ac99a73f515b3800c2e1898c732f7b3 /include
parent455cb889e8259d8799f4cc9cce6b06ebe076f363 (diff)
parente8b2e2a36324006146406fb1fc89ce6ed863807f (diff)
downloadPROJ-4277e15cefae5bb1d49312498e0f626b652e7524.tar.gz
PROJ-4277e15cefae5bb1d49312498e0f626b652e7524.zip
Merge pull request #1276 from rouault/intermediate_crs_use_only_if_no_direct_transformation
Modify the default strategy of researching intermediate CRS to do it only if there is no direct transformation
Diffstat (limited to 'include')
-rw-r--r--include/proj/coordinateoperation.hpp17
-rw-r--r--include/proj/crs.hpp7
2 files changed, 19 insertions, 5 deletions
diff --git a/include/proj/coordinateoperation.hpp b/include/proj/coordinateoperation.hpp
index 6b32e24d..92b655f9 100644
--- a/include/proj/coordinateoperation.hpp
+++ b/include/proj/coordinateoperation.hpp
@@ -1726,9 +1726,22 @@ class PROJ_GCC_DLL CoordinateOperationContext {
PROJ_DLL GridAvailabilityUse getGridAvailabilityUse() const;
- PROJ_DLL void setAllowUseIntermediateCRS(bool use);
+ /** Describe if and how intermediate CRS should be used */
+ enum class IntermediateCRSUse {
+ /** Always search for intermediate CRS. */
+ ALWAYS,
- PROJ_DLL bool getAllowUseIntermediateCRS() const;
+ /** Only attempt looking for intermediate CRS if there is no direct
+ * transformation available. */
+ IF_NO_DIRECT_TRANSFORMATION,
+
+ /* Do not attempt looking for intermediate CRS. */
+ NEVER,
+ };
+
+ PROJ_DLL void setAllowUseIntermediateCRS(IntermediateCRSUse use);
+
+ PROJ_DLL IntermediateCRSUse getAllowUseIntermediateCRS() const;
PROJ_DLL void
setIntermediateCRS(const std::vector<std::pair<std::string, std::string>>
diff --git a/include/proj/crs.hpp b/include/proj/crs.hpp
index 6a09ea78..fb34d3b7 100644
--- a/include/proj/crs.hpp
+++ b/include/proj/crs.hpp
@@ -92,9 +92,10 @@ class PROJ_GCC_DLL CRS : public common::ObjectUsage {
PROJ_DLL GeodeticCRSPtr extractGeodeticCRS() const;
PROJ_DLL GeographicCRSPtr extractGeographicCRS() const;
PROJ_DLL VerticalCRSPtr extractVerticalCRS() const;
- PROJ_DLL CRSNNPtr
- createBoundCRSToWGS84IfPossible(const io::DatabaseContextPtr &dbContext,
- bool allowIntermediateCRS) const;
+ PROJ_DLL CRSNNPtr createBoundCRSToWGS84IfPossible(
+ const io::DatabaseContextPtr &dbContext,
+ operation::CoordinateOperationContext::IntermediateCRSUse
+ allowIntermediateCRSUse) const;
PROJ_DLL CRSNNPtr stripVerticalComponent() const;
PROJ_DLL const BoundCRSPtr &canonicalBoundCRS() PROJ_PURE_DECL;