aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-04-07 23:28:20 +0200
committerGitHub <noreply@github.com>2021-04-07 23:28:20 +0200
commit1918883532bb3ccf03d45be24e0d6fce09fe53a1 (patch)
tree31b9f067bc6b094f08db2376362fa515e16cf288
parentb5d3f2a250f84abb10cd9b21b5d367f1a162e50f (diff)
parent3a267909e4d3841eb90f48be95e428805574984e (diff)
downloadPROJ-1918883532bb3ccf03d45be24e0d6fce09fe53a1.tar.gz
PROJ-1918883532bb3ccf03d45be24e0d6fce09fe53a1.zip
Merge pull request #2654 from rouault/show_that_pr_2616_is_wrong
test: add datum shift related tests for transformations crossing antimeridian
-rw-r--r--src/4D_api.cpp2
-rwxr-xr-xtest/cli/testvarious14
-rw-r--r--test/cli/tv_out.dist8
3 files changed, 24 insertions, 0 deletions
diff --git a/src/4D_api.cpp b/src/4D_api.cpp
index c7725d3a..45f1f59e 100644
--- a/src/4D_api.cpp
+++ b/src/4D_api.cpp
@@ -346,6 +346,8 @@ similarly, but prefers the 2D resp. 3D interfaces if available.
if (proj_log_level(P->ctx, PJ_LOG_TELL) >= PJ_LOG_DEBUG) {
std::string msg("Using coordinate operation ");
msg += alt.name;
+ msg += " as a fallback due to lack of more "
+ "appropriate operations";
pj_log(P->ctx, PJ_LOG_DEBUG, msg.c_str());
}
P->iCurCoordOp = i;
diff --git a/test/cli/testvarious b/test/cli/testvarious
index a121393c..e88cf68b 100755
--- a/test/cli/testvarious
+++ b/test/cli/testvarious
@@ -1033,6 +1033,20 @@ $EXE -E --no-ballpark EPSG:4267 EPSG:4258 >> ${OUT} <<EOF
49 2
EOF
+echo "##############################################################" >> ${OUT}
+echo "Check that we can use a transformation spanning the antimeridian (should use Pulkovo 1942 to WGS 84 (20))" >> ${OUT}
+$EXE -E "Pulkovo 1942" "WGS 84" >> ${OUT} <<EOF
+50 179.999999999
+50 -179.999999999
+EOF
+
+echo "##############################################################" >> ${OUT}
+echo "Check that we can use a transformation spanning the antimeridian (should use Pulkovo 1942 to WGS 84 (20))" >> ${OUT}
+$EXE -E EPSG:2636 "WGS 84" >> ${OUT} <<EOF
+5540944.47 499999.999
+5540944.47 500000.001
+EOF
+
# Done!
# do 'diff' with distribution results
diff --git a/test/cli/tv_out.dist b/test/cli/tv_out.dist
index 59129d99..44926677 100644
--- a/test/cli/tv_out.dist
+++ b/test/cli/tv_out.dist
@@ -496,3 +496,11 @@ and the second one a no-op
Test effect of --accuracy
##############################################################
Test effect of --no-ballpark
+##############################################################
+Check that we can use a transformation spanning the antimeridian (should use Pulkovo 1942 to WGS 84 (20))
+50 179.999999999 49d59'59.36"N 179d59'52.133"W 0.000
+50 -179.999999999 49d59'59.36"N 179d59'52.133"W 0.000
+##############################################################
+Check that we can use a transformation spanning the antimeridian (should use Pulkovo 1942 to WGS 84 (20))
+5540944.47 499999.999 49d59'59.36"N 179d59'52.133"W 0.000
+5540944.47 500000.001 49d59'59.36"N 179d59'52.133"W 0.000