aboutsummaryrefslogtreecommitdiff
path: root/src/iso19111/factory.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-09-11 17:43:38 +0200
committerEven Rouault <even.rouault@spatialys.com>2019-09-15 13:20:43 +0200
commit3d082689d468828e62f101c9755c8d42202a0ea1 (patch)
tree4ad5a9fe529ca470ecad4c519640839239643091 /src/iso19111/factory.cpp
parenta377a0e1ac5d2809703e8e83b368f26d171e5f9b (diff)
downloadPROJ-3d082689d468828e62f101c9755c8d42202a0ea1.tar.gz
PROJ-3d082689d468828e62f101c9755c8d42202a0ea1.zip
DatabaseContext::lookForGridInfo(): avoid setting PROJ context errno. Fixes issue with test/gigs/5208.gie with previous commit when ntf_r93.gsb grid is not available
Diffstat (limited to 'src/iso19111/factory.cpp')
-rw-r--r--src/iso19111/factory.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/iso19111/factory.cpp b/src/iso19111/factory.cpp
index 3ed69ae9..9ecc0906 100644
--- a/src/iso19111/factory.cpp
+++ b/src/iso19111/factory.cpp
@@ -1000,9 +1000,11 @@ bool DatabaseContext::lookForGridInfo(const std::string &projFilename,
if (d->pjCtxt() == nullptr) {
d->setPjCtxt(pj_get_default_ctx());
}
+ int errno_before = proj_context_errno(d->pjCtxt());
gridAvailable =
pj_find_file(d->pjCtxt(), projFilename.c_str(), &fullFilename[0],
fullFilename.size() - 1) != 0;
+ proj_context_errno_set(d->pjCtxt(), errno_before);
fullFilename.resize(strlen(fullFilename.c_str()));
auto res =