aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-05-24 13:59:32 +0200
committerEven Rouault <even.rouault@spatialys.com>2021-05-24 13:59:32 +0200
commitc44a3008b0edb5197b0efa584d3f5f7e18d79b0b (patch)
treeb1217506d956988572c5d4efdc07221009554da7 /src
parente814dce2de1f67f9c92ddd0db4db4b13dda55240 (diff)
downloadPROJ-c44a3008b0edb5197b0efa584d3f5f7e18d79b0b.tar.gz
PROJ-c44a3008b0edb5197b0efa584d3f5f7e18d79b0b.zip
DatabaseContext::getTransformationsForGridName(): make it work properly when different EPSG grid names map to the same PROJ grid name
Diffstat (limited to 'src')
-rw-r--r--src/iso19111/factory.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/iso19111/factory.cpp b/src/iso19111/factory.cpp
index 5eb6d012..cea0759c 100644
--- a/src/iso19111/factory.cpp
+++ b/src/iso19111/factory.cpp
@@ -3252,9 +3252,9 @@ 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 = "
+ "WHERE grid_name = ? OR grid_name IN "
"(SELECT original_grid_name FROM grid_alternatives "
- "WHERE proj_grid_name = ?)",
+ "WHERE proj_grid_name = ?) ORDER BY auth_name, code",
{gridName, gridName});
std::vector<operation::CoordinateOperationNNPtr> res;
for (const auto &row : sqlRes) {