aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2018-03-11 12:40:33 +0100
committerKristian Evers <kristianevers@gmail.com>2018-03-11 19:34:43 +0100
commitf45f27ae6cdbfb18dfdf146c4afda1f7228f03e5 (patch)
treeea6b710d08e89f834481990bd72eab6bde63a2dc
parentac8452eea01b26e0fc263c1cf51cc7137dfda23c (diff)
downloadPROJ-f45f27ae6cdbfb18dfdf146c4afda1f7228f03e5.tar.gz
PROJ-f45f27ae6cdbfb18dfdf146c4afda1f7228f03e5.zip
Add Web Mercator test case
-rwxr-xr-xnad/testvarious10
-rw-r--r--nad/tv_out.dist3
-rw-r--r--test/gie/4D-API_cs2cs-style.gie14
3 files changed, 27 insertions, 0 deletions
diff --git a/nad/testvarious b/nad/testvarious
index 8b3c14ac..30d1402f 100755
--- a/nad/testvarious
+++ b/nad/testvarious
@@ -883,6 +883,16 @@ $EXE -f '%0.3f' \
15011335.76413978 -8729502.054111844
20015114.352186374 -11409566.822831295
EOF
+echo "##############################################################" >> ${OUT}
+echo "Test Web Mercator to avoid issue #834 in the future" >> ${OUT}
+#
+$EXE -f '%0.3f' \
+ +proj=utm +zone=15 +datum=NAD83 \
+ +to +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 \
+ +k=1.0 +units=m +nadgrids=@null \
+ -E >> ${OUT} <<EOF
+487147.594520173 4934316.46263998
+EOF
# Done!
diff --git a/nad/tv_out.dist b/nad/tv_out.dist
index 4dff3a63..743eeabe 100644
--- a/nad/tv_out.dist
+++ b/nad/tv_out.dist
@@ -433,3 +433,6 @@ Test patterson inverse projection
10007557.176093187 -5366413.421153781 90.000 -45.000 0.000
15011335.76413978 -8729502.054111844 135.000 -67.500 0.000
20015114.352186374 -11409566.822831295 180.000 -90.000 0.000
+##############################################################
+Test Web Mercator to avoid issue #834 in the future
+487147.594520173 4934316.46263998 -10370728.796 5552839.742 -0.000
diff --git a/test/gie/4D-API_cs2cs-style.gie b/test/gie/4D-API_cs2cs-style.gie
index 66da0633..4b0ecb60 100644
--- a/test/gie/4D-API_cs2cs-style.gie
+++ b/test/gie/4D-API_cs2cs-style.gie
@@ -186,4 +186,18 @@ tolerance 20 cm
accept 7.438632495 46.951082877
expect 2600000.0 1200000.0
-------------------------------------------------------------------------------
+
+-------------------------------------------------------------------------------
+Test that Google's Web Mercator works as intended (see #834 for details).
+-------------------------------------------------------------------------------
+operation proj=pipeline step init=epsg:26915 inv step init=epsg:3857
+-------------------------------------------------------------------------------
+tolerance 20 cm
+accept 487147.594520173 4934316.46263998
+expect -10370728.80 5552839.74
+
+accept 487147.594520173 4934316.46263998 0
+expect -10370728.80 5552839.74 0
+-------------------------------------------------------------------------------
+
</gie>