From 7492e65bfebadfcd44d3e2e4916a9d19e4bc6ae2 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 2 Nov 2019 18:48:20 +0100 Subject: Add a geoid_model name in database, use GEOIDMODEL for transformations, add a proj_create_vertical_crs_ex() --- src/iso19111/factory.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/iso19111/factory.cpp') diff --git a/src/iso19111/factory.cpp b/src/iso19111/factory.cpp index 307c3a07..d9917996 100644 --- a/src/iso19111/factory.cpp +++ b/src/iso19111/factory.cpp @@ -5379,6 +5379,28 @@ AuthorityFactory::getPreferredHubGeodeticReferenceFrames( // --------------------------------------------------------------------------- +//! @cond Doxygen_Suppress +std::vector +AuthorityFactory::getTransformationsForGeoid( + const std::string &geoidName, bool usePROJAlternativeGridNames) const { + std::vector res; + + const std::string sql("SELECT operation_auth_name, operation_code FROM " + "geoid_model WHERE name = ?"); + auto sqlRes = d->run(sql, {geoidName}); + for (const auto &row : sqlRes) { + const auto &auth_name = row[0]; + const auto &code = row[1]; + res.emplace_back(d->createFactory(auth_name)->createCoordinateOperation( + code, usePROJAlternativeGridNames)); + } + + return res; +} +//! @endcond + +// --------------------------------------------------------------------------- + //! @cond Doxygen_Suppress FactoryException::FactoryException(const char *message) : Exception(message) {} -- cgit v1.2.3