diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-11-18 21:04:59 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-11-18 21:04:59 +0100 |
| commit | 2b9b65d0ffbe685fc33857df0f48a387d4611483 (patch) | |
| tree | 84961ed372c3d06ad9a04a0af14c3a1e5560039f /src/proj_internal.h | |
| parent | ee71b3412868a08c91d46066ddc39d30b08442d6 (diff) | |
| download | PROJ-2b9b65d0ffbe685fc33857df0f48a387d4611483.tar.gz PROJ-2b9b65d0ffbe685fc33857df0f48a387d4611483.zip | |
proj_trans(): tune selection of operation when there are several alternatives, to select the operation with best accuracy
Diffstat (limited to 'src/proj_internal.h')
| -rw-r--r-- | src/proj_internal.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/proj_internal.h b/src/proj_internal.h index 5289e1c9..3ca927a3 100644 --- a/src/proj_internal.h +++ b/src/proj_internal.h @@ -533,23 +533,31 @@ struct PJconsts { double maxyDst = 0.0; PJ* pj = nullptr; std::string name{}; + double accuracy = -1.0; + bool isOffshore = false; CoordOperation(double minxSrcIn, double minySrcIn, double maxxSrcIn, double maxySrcIn, double minxDstIn, double minyDstIn, double maxxDstIn, double maxyDstIn, - PJ* pjIn, const std::string& nameIn): + PJ* pjIn, const std::string& nameIn, double accuracyIn, bool isOffshoreIn): minxSrc(minxSrcIn), minySrc(minySrcIn), maxxSrc(maxxSrcIn), maxySrc(maxySrcIn), minxDst(minxDstIn), minyDst(minyDstIn), maxxDst(maxxDstIn), maxyDst(maxyDstIn), - pj(pjIn), name(nameIn) {} + pj(pjIn), name(nameIn), + accuracy(accuracyIn), + isOffshore(isOffshoreIn) + { + } CoordOperation(const CoordOperation&) = delete; CoordOperation(CoordOperation&& other): minxSrc(other.minxSrc), minySrc(other.minySrc), maxxSrc(other.maxxSrc), maxySrc(other.maxySrc), minxDst(other.minxDst), minyDst(other.minyDst), maxxDst(other.maxxDst), maxyDst(other.maxyDst), - name(std::move(other.name)) { - pj = other.pj; - other.pj = nullptr; - } + name(std::move(other.name)), + accuracy(other.accuracy), + isOffshore(other.isOffshore) { + pj = other.pj; + other.pj = nullptr; + } CoordOperation& operator=(const CoordOperation&) = delete; |
