aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2019-12-11 08:35:05 +0100
committerGitHub <noreply@github.com>2019-12-11 08:35:05 +0100
commitd1f432ea6e933cf06ce3ecaedf0e978ed30ec6f6 (patch)
tree12dc1ad3a784056b8dc4984c70c7f5f8bfa72994 /src
parent29474bd7fdac013841a4795e93f714bba7791c56 (diff)
parent38de84f38bceed4030710648334729d96f7c2204 (diff)
downloadPROJ-d1f432ea6e933cf06ce3ecaedf0e978ed30ec6f6.tar.gz
PROJ-d1f432ea6e933cf06ce3ecaedf0e978ed30ec6f6.zip
Merge pull request #1785 from rouault/update_to_ignf_3_1_0
Database: update to IGNF v3.1.0
Diffstat (limited to 'src')
-rw-r--r--src/iso19111/coordinateoperation.cpp14
-rw-r--r--src/iso19111/factory.cpp1
2 files changed, 14 insertions, 1 deletions
diff --git a/src/iso19111/coordinateoperation.cpp b/src/iso19111/coordinateoperation.cpp
index 6120c768..791bdcb0 100644
--- a/src/iso19111/coordinateoperation.cpp
+++ b/src/iso19111/coordinateoperation.cpp
@@ -12572,6 +12572,18 @@ void CoordinateOperationFactory::Private::createOperationsWithDatumPivot(
// Start in priority with candidates that have exactly the same name as
// the sourcCRS and targetCRS. Typically for the case of init=IGNF:XXXX
+
+ // Transformation from IGNF:NTFP to IGNF:RGF93G,
+ // using
+ // NTF geographiques Paris (gr) vers NTF GEOGRAPHIQUES GREENWICH (DMS) +
+ // NOUVELLE TRIANGULATION DE LA FRANCE (NTF) vers RGF93 (ETRS89)
+ // that is using ntf_r93.gsb, is horribly dependent
+ // of IGNF:RGF93G being returned before IGNF:RGF93GEO in candidatesDstGeod.
+ // If RGF93GEO is returned before then we go through WGS84 and use
+ // instead a Helmert transformation.
+ // The below logic is thus quite fragile, and attempts at changing it
+ // result in degraded results for other use cases...
+
for (const auto &candidateSrcGeod : candidatesSrcGeod) {
if (candidateSrcGeod->nameStr() == sourceCRS->nameStr()) {
for (const auto &candidateDstGeod : candidatesDstGeod) {
@@ -12625,7 +12637,7 @@ void CoordinateOperationFactory::Private::createOperationsWithDatumPivot(
#endif
createTransformations(candidateSrcGeod, candidateDstGeod,
opsFirst[0], isNullFirst);
- if (!res.empty() && hasResultSetOnlyResultsWithPROJStep(res)) {
+ if (!res.empty() && !hasResultSetOnlyResultsWithPROJStep(res)) {
return;
}
}
diff --git a/src/iso19111/factory.cpp b/src/iso19111/factory.cpp
index 0ef07337..f0ad157e 100644
--- a/src/iso19111/factory.cpp
+++ b/src/iso19111/factory.cpp
@@ -5609,6 +5609,7 @@ std::list<crs::GeodeticCRSNNPtr> AuthorityFactory::createGeodeticCRSFromDatum(
sql += " AND type = ?";
params.emplace_back(geodetic_crs_type);
}
+ sql += " ORDER BY auth_name, code";
auto sqlRes = d->run(sql, params);
std::list<crs::GeodeticCRSNNPtr> res;
for (const auto &row : sqlRes) {