aboutsummaryrefslogtreecommitdiff
path: root/src/iso19111/c_api.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-04-16 00:44:39 +0200
committerGitHub <noreply@github.com>2020-04-16 00:44:39 +0200
commit000fa21d070e64200bc877b9d14444262e1a14b5 (patch)
tree6d5dd2c3841bb87ec0816e6c9e9593b5091731a3 /src/iso19111/c_api.cpp
parentc91966953d9ad327cbb3b9d80842cc0d3957df42 (diff)
parent4be093e9d23b53915ed88a1c0da06f6833456a69 (diff)
downloadPROJ-000fa21d070e64200bc877b9d14444262e1a14b5.tar.gz
PROJ-000fa21d070e64200bc877b9d14444262e1a14b5.zip
Merge pull request #2155 from rouault/fix_2143
createOperations(): do not remove ballpark transformation if there are only grid based operations, even if they cover the whole area of use (fixes #2143)
Diffstat (limited to 'src/iso19111/c_api.cpp')
-rw-r--r--src/iso19111/c_api.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/iso19111/c_api.cpp b/src/iso19111/c_api.cpp
index 5a3f0374..6b726f34 100644
--- a/src/iso19111/c_api.cpp
+++ b/src/iso19111/c_api.cpp
@@ -7518,6 +7518,27 @@ void PROJ_DLL proj_operation_factory_context_set_discard_superseded(
// ---------------------------------------------------------------------------
+/** \brief Set whether ballpark transformations are allowed.
+ *
+ * @param ctx PROJ context, or NULL for default context
+ * @param factory_ctx Operation factory context. must not be NULL
+ * @param allow set to TRUE to allow ballpark transformations.
+ * @since 7.1
+ */
+void PROJ_DLL proj_operation_factory_context_set_allow_ballpark_transformations(
+ PJ_CONTEXT *ctx, PJ_OPERATION_FACTORY_CONTEXT *factory_ctx, int allow) {
+ SANITIZE_CTX(ctx);
+ assert(factory_ctx);
+ try {
+ factory_ctx->operationContext->setAllowBallparkTransformations(allow !=
+ 0);
+ } catch (const std::exception &e) {
+ proj_log_error(ctx, __FUNCTION__, e.what());
+ }
+}
+
+// ---------------------------------------------------------------------------
+
//! @cond Doxygen_Suppress
/** \brief Opaque object representing a set of operation results. */
struct PJ_OPERATION_LIST : PJ_OBJ_LIST {