aboutsummaryrefslogtreecommitdiff
path: root/src/iso19111/factory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/iso19111/factory.cpp')
-rw-r--r--src/iso19111/factory.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/iso19111/factory.cpp b/src/iso19111/factory.cpp
index 1f40f1f0..4bf5427d 100644
--- a/src/iso19111/factory.cpp
+++ b/src/iso19111/factory.cpp
@@ -4982,6 +4982,29 @@ AuthorityFactory::createCompoundCRSFromExisting(
// ---------------------------------------------------------------------------
//! @cond Doxygen_Suppress
+std::list<datum::GeodeticReferenceFrameNNPtr>
+AuthorityFactory::getPreferredHubGeodeticReferenceFrames(
+ const std::string &geodeticReferenceFrameCode) const {
+ std::list<datum::GeodeticReferenceFrameNNPtr> res;
+
+ const std::string sql("SELECT hub_auth_name, hub_code FROM "
+ "geodetic_datum_preferred_hub WHERE "
+ "src_auth_name = ? AND src_code = ?");
+ auto sqlRes = d->run(sql, {d->authority(), geodeticReferenceFrameCode});
+ for (const auto &row : sqlRes) {
+ const auto &auth_name = row[0];
+ const auto &code = row[1];
+ res.emplace_back(
+ d->createFactory(auth_name)->createGeodeticDatum(code));
+ }
+
+ return res;
+}
+//! @endcond
+
+// ---------------------------------------------------------------------------
+
+//! @cond Doxygen_Suppress
FactoryException::FactoryException(const char *message) : Exception(message) {}
// ---------------------------------------------------------------------------