aboutsummaryrefslogtreecommitdiff
path: root/src/iso19111/operation/coordinateoperationfactory.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-04-22 22:51:31 +0200
committerEven Rouault <even.rouault@spatialys.com>2021-04-23 01:07:04 +0200
commitf6abb7d75c647013dd83a82361b96c202e615d90 (patch)
tree6743cf5b5feab06004e85ff55f654cd1671a6dc9 /src/iso19111/operation/coordinateoperationfactory.cpp
parentc6dba3fffb80fe6394f51aae0762f7e5db6d9edf (diff)
downloadPROJ-f6abb7d75c647013dd83a82361b96c202e615d90.tar.gz
PROJ-f6abb7d75c647013dd83a82361b96c202e615d90.zip
Database: update to EPSG v10.019
Non-trivial updates: - some vertical CRS are now encoded as DerivedVerticalCRS. e.g EPSG:8228 "NAVD88 height (ft)", with base EPSG:5703 "NAVD88 height". As we don't have support in our PROJ db model for DerivedVerticalCRS, modify the import script to 'resolve' the derivation up to the original datum. - Method EPSG:1069 'Change of Vertical Unit' is no longer used. It is replaced by a generic-purpose EPSG:1104 method that doesn't take any conversion factor. And generic conversions EPSG:7812 and EPSG:7813 are now used in concatenated operations, which require code changes as well.
Diffstat (limited to 'src/iso19111/operation/coordinateoperationfactory.cpp')
-rw-r--r--src/iso19111/operation/coordinateoperationfactory.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/iso19111/operation/coordinateoperationfactory.cpp b/src/iso19111/operation/coordinateoperationfactory.cpp
index eb560cc9..13d245bb 100644
--- a/src/iso19111/operation/coordinateoperationfactory.cpp
+++ b/src/iso19111/operation/coordinateoperationfactory.cpp
@@ -2097,6 +2097,17 @@ static std::string buildTransfName(const std::string &srcName,
// ---------------------------------------------------------------------------
+static std::string buildConvName(const std::string &srcName,
+ const std::string &targetName) {
+ std::string name("Conversion from ");
+ name += srcName;
+ name += " to ";
+ name += targetName;
+ return name;
+}
+
+// ---------------------------------------------------------------------------
+
static SingleOperationNNPtr createPROJBased(
const util::PropertyMap &properties,
const io::IPROJStringExportableNNPtr &projExportable,
@@ -4273,8 +4284,8 @@ void CoordinateOperationFactory::Private::createOperationsVertToVert(
((srcIsUp && dstIsDown) || (srcIsDown && dstIsUp));
const double factor = convSrc / convDst;
- auto name = buildTransfName(sourceCRS->nameStr(), targetCRS->nameStr());
if (!equivalentVDatum) {
+ auto name = buildTransfName(sourceCRS->nameStr(), targetCRS->nameStr());
name += BALLPARK_VERTICAL_TRANSFORMATION;
auto conv = Transformation::createChangeVerticalUnit(
util::PropertyMap().set(common::IdentifiedObject::NAME_KEY, name),
@@ -4285,6 +4296,7 @@ void CoordinateOperationFactory::Private::createOperationsVertToVert(
conv->setHasBallparkTransformation(true);
res.push_back(conv);
} else if (convSrc != convDst || !heightDepthReversal) {
+ auto name = buildConvName(sourceCRS->nameStr(), targetCRS->nameStr());
auto conv = Conversion::createChangeVerticalUnit(
util::PropertyMap().set(common::IdentifiedObject::NAME_KEY, name),
// In case of a height depth reversal, we should probably have
@@ -4293,6 +4305,7 @@ void CoordinateOperationFactory::Private::createOperationsVertToVert(
conv->setCRSs(sourceCRS, targetCRS, nullptr);
res.push_back(conv);
} else {
+ auto name = buildConvName(sourceCRS->nameStr(), targetCRS->nameStr());
auto conv = Conversion::createHeightDepthReversal(
util::PropertyMap().set(common::IdentifiedObject::NAME_KEY, name));
conv->setCRSs(sourceCRS, targetCRS, nullptr);