diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-08-26 20:10:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-26 20:10:22 +0200 |
| commit | ef48acb4ab6e3426ac66f37a6477521d7b7be6d3 (patch) | |
| tree | 3184c8908d7325ff2c69b59251810a00f6a18ae5 /src/iso19111/factory.cpp | |
| parent | 683d3097ff2cabd573a82757e8bef6d8f0447d37 (diff) | |
| parent | 138555c2491a70428d3c8c82fdf9bb778ad0ae62 (diff) | |
| download | PROJ-ef48acb4ab6e3426ac66f37a6477521d7b7be6d3.tar.gz PROJ-ef48acb4ab6e3426ac66f37a6477521d7b7be6d3.zip | |
Merge pull request #2342 from rouault/proj_create_vertical_crs_ex_accuracy
proj_create_vertical_crs_ex(): add a ACCURACY option to provide an explicit accuracy, or derive it from the grid name if it is known
Diffstat (limited to 'src/iso19111/factory.cpp')
| -rw-r--r-- | src/iso19111/factory.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/iso19111/factory.cpp b/src/iso19111/factory.cpp index a9d82268..a011f397 100644 --- a/src/iso19111/factory.cpp +++ b/src/iso19111/factory.cpp @@ -1256,6 +1256,25 @@ DatabaseContext::getNonDeprecated(const std::string &tableName, return res; } +// --------------------------------------------------------------------------- + +std::vector<operation::CoordinateOperationNNPtr> +DatabaseContext::getTransformationsForGridName( + const DatabaseContextNNPtr &databaseContext, const std::string &gridName) { + auto sqlRes = databaseContext->d->run( + "SELECT auth_name, code FROM grid_transformation " + "WHERE grid_name = ? OR grid_name = " + "(SELECT original_grid_name FROM grid_alternatives " + "WHERE proj_grid_name = ?)", + {gridName, gridName}); + std::vector<operation::CoordinateOperationNNPtr> res; + for (const auto &row : sqlRes) { + res.emplace_back(AuthorityFactory::create(databaseContext, row[0]) + ->createCoordinateOperation(row[1], true)); + } + return res; +} + //! @endcond // --------------------------------------------------------------------------- |
