aboutsummaryrefslogtreecommitdiff
path: root/src/iso19111/datum.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/iso19111/datum.cpp')
-rw-r--r--src/iso19111/datum.cpp48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/iso19111/datum.cpp b/src/iso19111/datum.cpp
index ebef94a2..7c76061e 100644
--- a/src/iso19111/datum.cpp
+++ b/src/iso19111/datum.cpp
@@ -363,6 +363,18 @@ void PrimeMeridian::_exportToWKT(
aliasFound = true;
}
}
+ if (!aliasFound && dbContext) {
+ auto authFactory = io::AuthorityFactory::create(
+ NN_NO_CHECK(dbContext), "ESRI");
+ aliasFound =
+ authFactory
+ ->createObjectsFromName(
+ l_name,
+ {io::AuthorityFactory::ObjectType::PRIME_MERIDIAN},
+ false // approximateMatch
+ )
+ .size() == 1;
+ }
if (!aliasFound) {
l_name = io::WKTFormatter::morphNameToESRI(l_name);
}
@@ -820,6 +832,18 @@ void Ellipsoid::_exportToWKT(
aliasFound = true;
}
}
+ if (!aliasFound && dbContext) {
+ auto authFactory = io::AuthorityFactory::create(
+ NN_NO_CHECK(dbContext), "ESRI");
+ aliasFound = authFactory
+ ->createObjectsFromName(
+ l_name,
+ {io::AuthorityFactory::ObjectType::
+ ELLIPSOID},
+ false // approximateMatch
+ )
+ .size() == 1;
+ }
if (!aliasFound) {
l_name = io::WKTFormatter::morphNameToESRI(l_name);
}
@@ -1247,6 +1271,18 @@ void GeodeticReferenceFrame::_exportToWKT(
}
}
}
+ if (!aliasFound && dbContext) {
+ auto authFactory = io::AuthorityFactory::create(
+ NN_NO_CHECK(dbContext), "ESRI");
+ aliasFound = authFactory
+ ->createObjectsFromName(
+ l_name,
+ {io::AuthorityFactory::ObjectType::
+ GEODETIC_REFERENCE_FRAME},
+ false // approximateMatch
+ )
+ .size() == 1;
+ }
if (!aliasFound) {
l_name = io::WKTFormatter::morphNameToESRI(l_name);
if (!starts_with(l_name, "D_")) {
@@ -1985,6 +2021,18 @@ void VerticalReferenceFrame::_exportToWKT(
aliasFound = true;
}
}
+ if (!aliasFound && dbContext) {
+ auto authFactory = io::AuthorityFactory::create(
+ NN_NO_CHECK(dbContext), "ESRI");
+ aliasFound = authFactory
+ ->createObjectsFromName(
+ l_name,
+ {io::AuthorityFactory::ObjectType::
+ VERTICAL_REFERENCE_FRAME},
+ false // approximateMatch
+ )
+ .size() == 1;
+ }
if (!aliasFound) {
l_name = io::WKTFormatter::morphNameToESRI(l_name);
}