diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2021-02-10 17:51:13 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2021-02-10 17:51:13 +0100 |
| commit | 836af9dcf12c3870e8a412c97f6968b69c4b3bad (patch) | |
| tree | 9365b058b3a1a3ac0148b13a9623460a9beff6ad /src/iso19111/io.cpp | |
| parent | a7f6b407446b35a50b5601650aed993c706fe8ee (diff) | |
| download | PROJ-836af9dcf12c3870e8a412c97f6968b69c4b3bad.tar.gz PROJ-836af9dcf12c3870e8a412c97f6968b69c4b3bad.zip | |
Fix handling of +proj=ob_tran +o_proj=longlat combined with +over (fixes #2510)
Diffstat (limited to 'src/iso19111/io.cpp')
| -rw-r--r-- | src/iso19111/io.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/iso19111/io.cpp b/src/iso19111/io.cpp index c0844608..6ea6316c 100644 --- a/src/iso19111/io.cpp +++ b/src/iso19111/io.cpp @@ -9674,14 +9674,15 @@ CRSNNPtr PROJStringParser::Private::buildProjectedCRS( parameters, values) .as_nullable(); - if (is_in_stringlist(methodName, "PROJ ob_tran o_proj=longlat," - "PROJ ob_tran o_proj=lonlat," - "PROJ ob_tran o_proj=latlon," - "PROJ ob_tran o_proj=latlong")) { - return DerivedGeographicCRS::create( - PropertyMap().set(IdentifiedObject::NAME_KEY, "unnamed"), - geogCRS, NN_NO_CHECK(conv), - buildEllipsoidalCS(iStep, iUnitConvert, iAxisSwap, false)); + for (const char *substr : + {"PROJ ob_tran o_proj=longlat", "PROJ ob_tran o_proj=lonlat", + "PROJ ob_tran o_proj=latlon", "PROJ ob_tran o_proj=latlong"}) { + if (starts_with(methodName, substr)) { + return DerivedGeographicCRS::create( + PropertyMap().set(IdentifiedObject::NAME_KEY, "unnamed"), + geogCRS, NN_NO_CHECK(conv), + buildEllipsoidalCS(iStep, iUnitConvert, iAxisSwap, false)); + } } } |
