diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-01-16 17:17:54 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-01-16 17:18:30 +0100 |
| commit | 6d2af0904652baba69ec81261c914e9b68221dac (patch) | |
| tree | 289e2af7e0cb472d633e2357804e696714d1557b /src/iso19111/io.cpp | |
| parent | 15bbaa50ae6e5779462bb921a5f50126a2f2f252 (diff) | |
| download | PROJ-6d2af0904652baba69ec81261c914e9b68221dac.tar.gz PROJ-6d2af0904652baba69ec81261c914e9b68221dac.zip | |
PROJBasedOperation: write it as a conformant CONVERSION WKT, and make it parsed appropriately on the reading side
Diffstat (limited to 'src/iso19111/io.cpp')
| -rw-r--r-- | src/iso19111/io.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/iso19111/io.cpp b/src/iso19111/io.cpp index 13a8f236..5be02ffe 100644 --- a/src/iso19111/io.cpp +++ b/src/iso19111/io.cpp @@ -4252,8 +4252,20 @@ BaseObjectNNPtr WKTParser::Private::build(const WKTNodeNNPtr &node) { } if (ci_equal(name, WKTConstants::CONVERSION)) { - return util::nn_static_pointer_cast<BaseObject>( - buildConversion(node, UnitOfMeasure::METRE, UnitOfMeasure::DEGREE)); + auto conv = + buildConversion(node, UnitOfMeasure::METRE, UnitOfMeasure::DEGREE); + + if (conv->nameStr() == "PROJ-based coordinate operation" && + starts_with(conv->method()->nameStr(), + "PROJ-based operation method: ")) { + auto projString = conv->method()->nameStr().substr( + strlen("PROJ-based operation method: ")); + return util::nn_static_pointer_cast<BaseObject>( + PROJBasedOperation::create(PropertyMap(), projString, nullptr, + nullptr, {})); + } + + return util::nn_static_pointer_cast<BaseObject>(conv); } if (ci_equal(name, WKTConstants::CONCATENATEDOPERATION)) { |
