From 61cf8c5b29c82ab7e46b207bd125eaad49c03021 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 6 May 2019 19:45:27 +0200 Subject: createOperations(): for 'Amersfoort / RD New + NAP height' (EPSG:7415) to ETRS89 (EPSG:4937), make sure that the vgridshift is applied first (ie on Amersfoort datum) before the hgridshift --- src/iso19111/internal.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/iso19111/internal.cpp') diff --git a/src/iso19111/internal.cpp b/src/iso19111/internal.cpp index 240c98f4..4810202d 100644 --- a/src/iso19111/internal.cpp +++ b/src/iso19111/internal.cpp @@ -298,6 +298,21 @@ std::vector split(const std::string &str, char separator) { // --------------------------------------------------------------------------- +std::vector split(const std::string &str, + const std::string &separator) { + std::vector res; + size_t lastPos = 0; + size_t newPos = 0; + while ((newPos = str.find(separator, lastPos)) != std::string::npos) { + res.push_back(str.substr(lastPos, newPos - lastPos)); + lastPos = newPos + separator.size(); + } + res.push_back(str.substr(lastPos)); + return res; +} + +// --------------------------------------------------------------------------- + #ifdef _WIN32 // For some reason, sqlite3_snprintf() in the sqlite3 builds used on AppVeyor -- cgit v1.2.3