aboutsummaryrefslogtreecommitdiff
path: root/src/iso19111/c_api.cpp
diff options
context:
space:
mode:
authorMatt Littlemore <matthew520@live.com.au>2019-07-19 17:15:25 +0800
committerKristian Evers <kristianevers@gmail.com>2019-07-19 11:15:25 +0200
commit0fc4242ee5ae808fb998482e82da07c2b3b0b33e (patch)
treee18a8139fe030f991f8de6a05ac33dcbe2a57f25 /src/iso19111/c_api.cpp
parentf65c61a8fd268a7ff2536194881290ded61892a6 (diff)
downloadPROJ-0fc4242ee5ae808fb998482e82da07c2b3b0b33e.tar.gz
PROJ-0fc4242ee5ae808fb998482e82da07c2b3b0b33e.zip
Add set discard superseded method to api (#1534)
Closes #1519
Diffstat (limited to 'src/iso19111/c_api.cpp')
-rw-r--r--src/iso19111/c_api.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/iso19111/c_api.cpp b/src/iso19111/c_api.cpp
index 7a77ccfb..a125261a 100644
--- a/src/iso19111/c_api.cpp
+++ b/src/iso19111/c_api.cpp
@@ -6578,6 +6578,28 @@ void proj_operation_factory_context_set_allowed_intermediate_crs(
// ---------------------------------------------------------------------------
+/** \brief Set whether transformations that are superseded (but not deprecated)
+ * should be discarded.
+ *
+ * @param ctx PROJ context, or NULL for default context
+ * @param factory_ctx Operation factory context. must not be NULL
+ * @param discard superseded crs or not
+ */
+void PROJ_DLL proj_operation_factory_context_set_discard_superseded(
+ PJ_CONTEXT *ctx, PJ_OPERATION_FACTORY_CONTEXT *factory_ctx,
+ int discard) {
+ SANITIZE_CTX(ctx);
+ assert(factory_ctx);
+ try {
+ factory_ctx->operationContext->setDiscardSuperseded(discard != 0);
+ } catch (const std::exception &e) {
+ proj_log_error(ctx, __FUNCTION__, e.what());
+ }
+}
+
+
+// ---------------------------------------------------------------------------
+
/** \brief Find a list of CoordinateOperation from source_crs to target_crs.
*
* The operations are sorted with the most relevant ones first: by