aboutsummaryrefslogtreecommitdiff
path: root/src/iso19111/c_api.cpp
diff options
context:
space:
mode:
authorAlan D. Snow <alansnow21@gmail.com>2020-08-19 08:02:42 -0500
committerGitHub <noreply@github.com>2020-08-19 15:02:42 +0200
commit84713021edf688c9cf157562d34388583325aa45 (patch)
tree6a1694de8df49fb68a66e74c02e5f8750a0c0e78 /src/iso19111/c_api.cpp
parent62ad09fe02c4a67e727822134768e4ebe6c8cde4 (diff)
downloadPROJ-84713021edf688c9cf157562d34388583325aa45.tar.gz
PROJ-84713021edf688c9cf157562d34388583325aa45.zip
Clone projCppContext context when copying projCtx_t (#2324)
Diffstat (limited to 'src/iso19111/c_api.cpp')
-rw-r--r--src/iso19111/c_api.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/iso19111/c_api.cpp b/src/iso19111/c_api.cpp
index 9219f767..947be058 100644
--- a/src/iso19111/c_api.cpp
+++ b/src/iso19111/c_api.cpp
@@ -125,6 +125,18 @@ projCppContext::toVector(const char *const *auxDbPaths) {
// ---------------------------------------------------------------------------
+projCppContext* projCppContext::clone(PJ_CONTEXT *ctx) const {
+ projCppContext* newContext = new projCppContext(
+ ctx,
+ getDbPath().c_str(),
+ getAuxDbPaths()
+ );
+ newContext->setAutoCloseDb(getAutoCloseDb());
+ return newContext;
+}
+
+// ---------------------------------------------------------------------------
+
void projCppContext::closeDb() { databaseContext_ = nullptr; }
// ---------------------------------------------------------------------------