diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2019-10-12 09:01:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-12 09:01:36 +0200 |
| commit | 3cae496c2511f76ac97250282c3faa383dbb72ab (patch) | |
| tree | fc996f819361f877f4a0b05aa32133aca7557024 /src | |
| parent | a6dccb3b8fbc86bef82e389f7d9ef41a5127ca66 (diff) | |
| parent | 25e1f6ee789d9db8756e05423f9a454885db4b9f (diff) | |
| download | PROJ-3cae496c2511f76ac97250282c3faa383dbb72ab.tar.gz PROJ-3cae496c2511f76ac97250282c3faa383dbb72ab.zip | |
Merge pull request #1665 from rouault/fix_custom_compound_crs_with_NAD83_2011_and_geoidgrid_to_WGS84_G1762
proj_create_crs_to_crs(): remove elimination of Ballpark operations that caused transformation failures in some cases
Diffstat (limited to 'src')
| -rw-r--r-- | src/4D_api.cpp | 23 | ||||
| -rw-r--r-- | src/iso19111/coordinateoperation.cpp | 4 |
2 files changed, 2 insertions, 25 deletions
diff --git a/src/4D_api.cpp b/src/4D_api.cpp index 4b47c4e9..c182b3bf 100644 --- a/src/4D_api.cpp +++ b/src/4D_api.cpp @@ -1137,8 +1137,6 @@ PJ *proj_create_crs_to_crs_from_pj (PJ_CONTEXT *ctx, const PJ *source_crs, cons try { - bool skipDefaultTransforms = true; - // Iterate over source->target candidate transformations and reproject // their long-lat bounding box into the source CRS. for( int i = 0; i < op_count; i++ ) @@ -1150,26 +1148,7 @@ PJ *proj_create_crs_to_crs_from_pj (PJ_CONTEXT *ctx, const PJ *source_crs, cons double east_lon = 0.0; double north_lat = 0.0; - const char* name = proj_get_name(op); - bool canUseOp = true; - if( skipDefaultTransforms && - name && (strstr(name, "Ballpark geographic offset") || - strstr(name, "Ballpark geocentric translation")) ) - { - // Skip default transformations unless there is already one at - // the beginning (in which case all of them will have one) - if( i == 0 ) - { - skipDefaultTransforms = false; - } - else - { - canUseOp = false; - } - } - - if( canUseOp && - proj_get_area_of_use(ctx, op, + if( proj_get_area_of_use(ctx, op, &west_lon, &south_lat, &east_lon, &north_lat, nullptr) ) { if( west_lon <= east_lon ) diff --git a/src/iso19111/coordinateoperation.cpp b/src/iso19111/coordinateoperation.cpp index 6e6d4cec..6a05bbe8 100644 --- a/src/iso19111/coordinateoperation.cpp +++ b/src/iso19111/coordinateoperation.cpp @@ -12937,9 +12937,7 @@ CoordinateOperationFactory::Private::createOperations( auto vertCRSOfBaseOfBoundSrc = dynamic_cast<const crs::VerticalCRS *>(boundSrc->baseCRS().get()); - if (vertCRSOfBaseOfBoundSrc && hubSrcGeog && - hubSrcGeog->coordinateSystem()->axisList().size() == 3 && - geogDst->coordinateSystem()->axisList().size() == 3) { + if (vertCRSOfBaseOfBoundSrc && hubSrcGeog) { auto opsFirst = createOperations(sourceCRS, hubSrc, context); if (context.skipHorizontalTransformation) { if (!opsFirst.empty()) |
