aboutsummaryrefslogtreecommitdiff
path: root/src/iso19111
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-02-11 10:43:31 +0100
committerGitHub <noreply@github.com>2021-02-11 10:43:31 +0100
commit93d2571d56d63bd0d2904ad7d0c7c51dc702ca33 (patch)
treec998542c62922f7d067c8da2fd72dab107114ca5 /src/iso19111
parent755d6d396ec29fdfa72d26bad28a9b17d8e1b4c6 (diff)
parent4b44a55f6f2e60230e56f5431120dd3c3e07603f (diff)
downloadPROJ-93d2571d56d63bd0d2904ad7d0c7c51dc702ca33.tar.gz
PROJ-93d2571d56d63bd0d2904ad7d0c7c51dc702ca33.zip
Merge pull request #2521 from rouault/boundcrs_proj_based_method
Allow a BoundCRS to use a PROJ string transformation
Diffstat (limited to 'src/iso19111')
-rw-r--r--src/iso19111/operation/singleoperation.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/iso19111/operation/singleoperation.cpp b/src/iso19111/operation/singleoperation.cpp
index 0cd7b57a..b32b61cd 100644
--- a/src/iso19111/operation/singleoperation.cpp
+++ b/src/iso19111/operation/singleoperation.cpp
@@ -2144,6 +2144,18 @@ bool SingleOperation::exportToPROJStringGeneric(
return true;
}
+ const char *prefix = "PROJ-based operation method: ";
+ if (starts_with(method()->nameStr(), prefix)) {
+ auto projString = method()->nameStr().substr(strlen(prefix));
+ try {
+ formatter->ingestPROJString(projString);
+ return true;
+ } catch (const io::ParsingException &e) {
+ throw io::FormattingException(
+ std::string("ingestPROJString() failed: ") + e.what());
+ }
+ }
+
return false;
}