diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-04-15 00:00:11 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-04-15 00:00:11 +0200 |
| commit | 4be093e9d23b53915ed88a1c0da06f6833456a69 (patch) | |
| tree | 51ae2270de31cae1b39eb499298db94ff373e0bc /src | |
| parent | bc703787f16a3a1ec4cb337bd6ea532e9301e265 (diff) | |
| download | PROJ-4be093e9d23b53915ed88a1c0da06f6833456a69.tar.gz PROJ-4be093e9d23b53915ed88a1c0da06f6833456a69.zip | |
C API: add proj_operation_factory_context_set_allow_ballpark_transformations()
Diffstat (limited to 'src')
| -rw-r--r-- | src/iso19111/c_api.cpp | 21 | ||||
| -rw-r--r-- | src/proj.h | 5 |
2 files changed, 26 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 { @@ -1202,6 +1202,11 @@ void PROJ_DLL proj_operation_factory_context_set_discard_superseded( PJ_OPERATION_FACTORY_CONTEXT *factory_ctx, int discard); +void PROJ_DLL proj_operation_factory_context_set_allow_ballpark_transformations( + PJ_CONTEXT *ctx, + PJ_OPERATION_FACTORY_CONTEXT *factory_ctx, + int allow); + /* ------------------------------------------------------------------------- */ |
