diff --git a/src/iso19111/c_api.cpp b/src/iso19111/c_api.cpp index 7c835c15ab..2f408cb2c1 100644 --- a/src/iso19111/c_api.cpp +++ b/src/iso19111/c_api.cpp @@ -521,10 +521,13 @@ PJ *proj_clone(PJ_CONTEXT *ctx, const PJ *obj) { if (newPj) { newPj->descr = "Set of coordinate operations"; newPj->ctx = ctx; + const int old_debug_level = ctx->debug_level; + ctx->debug_level = PJ_LOG_NONE; for (const auto &altOp : obj->alternativeCoordinateOperations) { newPj->alternativeCoordinateOperations.emplace_back( PJCoordOperation(ctx, altOp)); } + ctx->debug_level = old_debug_level; } return newPj; }