diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-09-11 15:43:38 +0000 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-09-15 11:20:43 +0000 |
| commit | e5a1ea29ca10c6f56de27cc68b76569f4ed416e0 (patch) | |
| tree | 0de1500dc6cc97f0843d5a870461a5de436d1dfd /src | |
| parent | 9e5807499c5a37d31f983cd58eb21c918daf1fef (diff) | |
| download | PROJ-e5a1ea29ca10c6f56de27cc68b76569f4ed416e0.tar.gz PROJ-e5a1ea29ca10c6f56de27cc68b76569f4ed416e0.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')
| -rw-r--r-- | src/iso19111/factory.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/iso19111/factory.cpp b/src/iso19111/factory.cpp index 0f6790c0..60083455 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 = |
