aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/apps/emess.h5
-rw-r--r--src/iso19111/c_api.cpp22
-rw-r--r--src/iso19111/coordinateoperation.cpp3
-rw-r--r--src/proj.h5
4 files changed, 29 insertions, 6 deletions
diff --git a/src/apps/emess.h b/src/apps/emess.h
index 4c6f6783..a0a009f1 100644
--- a/src/apps/emess.h
+++ b/src/apps/emess.h
@@ -13,11 +13,6 @@ struct EMESS {
/* for emess procedure */
struct EMESS emess_dat = { nullptr, nullptr, 0 };
-#ifdef sun /* Archaic SunOs 4.1.1, etc. */
-extern char *sys_errlist[];
-#define strerror(n) (sys_errlist[n])
-#endif
-
#else /* for for calling procedures */
extern struct EMESS emess_dat;
diff --git a/src/iso19111/c_api.cpp b/src/iso19111/c_api.cpp
index d27b8800..f40cf241 100644
--- a/src/iso19111/c_api.cpp
+++ b/src/iso19111/c_api.cpp
@@ -6644,6 +6644,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
diff --git a/src/iso19111/coordinateoperation.cpp b/src/iso19111/coordinateoperation.cpp
index 27a22b51..2dd77f1c 100644
--- a/src/iso19111/coordinateoperation.cpp
+++ b/src/iso19111/coordinateoperation.cpp
@@ -10445,7 +10445,8 @@ struct FilterResults {
// results
// ...
removeSyntheticNullTransforms();
- removeUninterestingOps();
+ if (context->getDiscardSuperseded())
+ removeUninterestingOps();
removeDuplicateOps();
removeSyntheticNullTransforms();
return *this;
diff --git a/src/proj.h b/src/proj.h
index 0cb3c1c5..4024ddfc 100644
--- a/src/proj.h
+++ b/src/proj.h
@@ -945,6 +945,11 @@ void PROJ_DLL proj_operation_factory_context_set_allowed_intermediate_crs(
PJ_OPERATION_FACTORY_CONTEXT *factory_ctx,
const char* const *list_of_auth_name_codes);
+void PROJ_DLL proj_operation_factory_context_set_discard_superseded(
+ PJ_CONTEXT *ctx,
+ PJ_OPERATION_FACTORY_CONTEXT *factory_ctx,
+ int discard);
+
/* ------------------------------------------------------------------------- */