aboutsummaryrefslogtreecommitdiff
path: root/test/gie
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-02-26 20:36:33 +0100
committerKristian Evers <kristianevers@gmail.com>2020-02-27 13:19:13 +0100
commita9bc6e5fb000f618c9df6276f4ef79063ce4cdfc (patch)
treefc9f7df9d9d237f42c49137e863a501717f8718e /test/gie
parent8d665f20a743b136cb43943ff255ddadf1ead92d (diff)
downloadPROJ-a9bc6e5fb000f618c9df6276f4ef79063ce4cdfc.tar.gz
PROJ-a9bc6e5fb000f618c9df6276f4ef79063ce4cdfc.zip
Make tests independent of proj-datumgrid
Fixes #1984 - Copy BETA2007.gsb, MD, alaska, conus, ntf_r93.gsb, ntv1_can.dat grids from proj-datumgrid to data/tests. - Replace a couple uses of nzgd2kgrid0005.gsb in tests by ntf_r93.gsb - Add downsampled/subsetted versions of egm96_15.gtx as tests/egm96_15_downsampled.gtx and ntv2_0.gsb as tests/ntv2_0_downsampled.gsb This results in a few changes in expected results - Simpify travis/install.sh due to less configurations to test This results in a hopefully acceptable increase of the proj-X.Y.Z.tar.gz from 2.9 to 5.3 MB
Diffstat (limited to 'test/gie')
-rw-r--r--test/gie/4D-API_cs2cs-style.gie48
-rw-r--r--test/gie/DHDN_ETRS89.gie1
-rw-r--r--test/gie/deformation.gie10
-rw-r--r--test/gie/more_builtins.gie39
4 files changed, 38 insertions, 60 deletions
diff --git a/test/gie/4D-API_cs2cs-style.gie b/test/gie/4D-API_cs2cs-style.gie
index b8512162..1dd2ae54 100644
--- a/test/gie/4D-API_cs2cs-style.gie
+++ b/test/gie/4D-API_cs2cs-style.gie
@@ -55,17 +55,16 @@ expect 16.8210462130 55.1705688946 29.0317
-------------------------------------------------------------------------------
-operation proj=latlong nadgrids=nzgd2kgrid0005.gsb ellps=GRS80
+operation proj=latlong nadgrids=ntf_r93.gsb ellps=GRS80
-------------------------------------------------------------------------------
-This functionality is also tested in DHDN_ETRS89.gie
+This functionality is also tested in more_builtins.gie
-------------------------------------------------------------------------------
tolerance 1 mm
-ignore pjd_err_failed_to_load_grid
-accept 173 -45
-expect 172.999892181021551 -45.001620431954613
+accept 2.25 46.5
+expect 2.250704350387 46.500051597273
direction inverse
-accept 172.999892181021551 -45.001620431954613
-expect 173 -45
+accept 2.250704350387 46.500051597273
+expect 2.25 46.5
-------------------------------------------------------------------------------
@@ -74,24 +73,22 @@ expect 173 -45
operation proj=latlong geoidgrids=egm96_15.gtx ellps=GRS80
-------------------------------------------------------------------------------
tolerance 15 cm # lax tolerance due to widespread bad egm96 file
-ignore pjd_err_failed_to_load_grid
accept 12.5 55.5 0
-expect 12.5 55.5 -36.0213
+expect 12.5 55.5 -36.3941
direction inverse
-accept 12.5 55.5 -36.0213
+accept 12.5 55.5 -36.3941
expect 12.5 55.5 0
-------------------------------------------------------------------------------
operation proj=merc geoidgrids=egm96_15.gtx ellps=GRS80
-------------------------------------------------------------------------------
tolerance 0.1 mm
-ignore pjd_err_failed_to_load_grid
accept 12.5 55.5 0
-expect 1391493.63492 7424275.19462 -36.0213
+expect 1391493.63492 7424275.19462 -36.3941
direction inverse
-accept 1391493.63492 7424275.19462 -36.0213
+accept 1391493.63492 7424275.19462 -36.3941
expect 12.5 55.5 0
-------------------------------------------------------------------------------
@@ -107,32 +104,29 @@ with "unusual" axis orders
operation proj=latlong geoidgrids=egm96_15.gtx axis=neu ellps=GRS80
-------------------------------------------------------------------------------
tolerance 15 cm # lax tolerance due to widely distributed, bad egm96 file
-ignore pjd_err_failed_to_load_grid
# Broken test. FIXME
#accept 12.5 55.5 0
-#expect 55.5 12.5 -36.0213
+#expect 55.5 12.5 -36.3941
#direction inverse
-#accept 55.5 12.5 -36.0213
+#accept 55.5 12.5 -36.3941
#expect 12.5 55.5 0
-------------------------------------------------------------------------------
operation proj=latlong geoidgrids=egm96_15.gtx axis=dne ellps=GRS80
-------------------------------------------------------------------------------
tolerance 15 cm # lax tolerance due to widely distributed, bad egm96 file
-ignore pjd_err_failed_to_load_grid
# accept 12.5 55.5 0
-# expect 36.0213 55.5 12.5
+# expect 36.3941 55.5 12.5
# direction inverse
-# accept 36.0213 55.5 12.5
+# accept 36.3941 55.5 12.5
# expect 12.5 55.5 0
-------------------------------------------------------------------------------
operation proj=merc geoidgrids=egm96_15.gtx ellps=GRS80
-------------------------------------------------------------------------------
tolerance 0.1 mm
-ignore pjd_err_failed_to_load_grid
accept 12.5 55.5 0
-expect 1391493.63492 7424275.19462 -36.0213
+expect 1391493.63492 7424275.19462 -36.3941
direction inverse
-accept 1391493.63492 7424275.19462 -36.0213
+accept 1391493.63492 7424275.19462 -36.3941
expect 12.5 55.5 0
-------------------------------------------------------------------------------
@@ -143,22 +137,20 @@ Some more complex axis swapping.
operation proj=latlong geoidgrids=egm96_15.gtx axis=nue ellps=GRS80
-------------------------------------------------------------------------------
tolerance 15 cm # lax tolerance due to widely distributed, bad egm96 file
-ignore pjd_err_failed_to_load_grid
# Broken test. FIXME
#accept 12.5 55.5 0
-#expect 55.5 -36.0213 12.5
+#expect 55.5 -36.3941 12.5
# direction inverse
-# accept 55.5 -36.0213 12.5
+# accept 55.5 -36.3941 12.5
# expect 12.5 55.5 0
-------------------------------------------------------------------------------
operation proj=merc geoidgrids=egm96_15.gtx axis=sue ellps=GRS80
-------------------------------------------------------------------------------
tolerance 15 cm
-ignore pjd_err_failed_to_load_grid
accept 12.5 55.5 0
-expect -7424275.1946 -36.0213 1391493.6349 0.0000
+expect -7424275.1946 -36.3941 1391493.6349 0.0000
# direction inverse
-# accept -7424275.1946 -36.0213 1391493.6349 0.0000
+# accept -7424275.1946 -36.3941 1391493.6349 0.0000
# expect 12.5 55.5 0
-------------------------------------------------------------------------------
diff --git a/test/gie/DHDN_ETRS89.gie b/test/gie/DHDN_ETRS89.gie
index a1471a74..0ab577b8 100644
--- a/test/gie/DHDN_ETRS89.gie
+++ b/test/gie/DHDN_ETRS89.gie
@@ -6,7 +6,6 @@ operation proj=latlong datum=potsdam ellps=bessel
DE_DHDN (BeTA, 2007) to ETRS89 using NTv2 grid. epsg:15948
-------------------------------------------------------------------------------
-require_grid BETA2007.gsb
tolerance 1 mm
accept 7.482506019176 53.498461143331 # ETRS89_Lat-Lon
expect 7.483333333333 53.500000000000 # DE_DHDN_Lat-Lon
diff --git a/test/gie/deformation.gie b/test/gie/deformation.gie
index 848b9e89..b6616f52 100644
--- a/test/gie/deformation.gie
+++ b/test/gie/deformation.gie
@@ -49,7 +49,7 @@ operation +proj=deformation +xy_grids=alaska +z_grids=egm96_15.gtx
tolerance 0.1 mm
ignore pjd_err_failed_to_load_grid
accept -3004295.5882503074 -1093474.1690603832 5500477.1338251457
-expect -3004295.7025 -1093474.2106 5500477.3444
+expect -3004295.7000 -1093474.2097 5500477.3397
roundtrip 5
# Test that errors are reported for coordinates outside the grid.
@@ -70,7 +70,7 @@ tolerance 0.1 mm
direction inverse
ignore pjd_err_failed_to_load_grid
accept -3004295.5882503074 -1093474.1690603832 5500477.1338251457 2000.0
-expect -3004295.7025 -1093474.2106 5500477.3444 2000.0
+expect -3004295.7000 -1093474.2097 5500477.3397 2000.0
roundtrip 5
-------------------------------------------------------------------------------
@@ -100,7 +100,7 @@ tolerance 0.1 mm
ignore pjd_err_failed_to_load_grid
accept 12 56 0.0 2000.0
-expect 12 56 -36.5966 2000.0
+expect 12 56 -36.9960 2000.0
roundtrip 100
accept 12 56 0.0 2011.0
@@ -112,7 +112,7 @@ expect 12 56 0.0 2019.0
roundtrip 100
accept 12 56 0.0
-expect 12 56 -36.5966
+expect 12 56 -36.9960
roundtrip 100
@@ -123,7 +123,7 @@ tolerance 0.1 mm
ignore pjd_err_failed_to_load_grid
accept 12 56 0.0 2000.0
-expect 12 56 -36.5966 2000.0
+expect 12 56 -36.9960 2000.0
roundtrip 100
accept 12 56 0.0 2011.0
diff --git a/test/gie/more_builtins.gie b/test/gie/more_builtins.gie
index 78a504ff..a3e9d398 100644
--- a/test/gie/more_builtins.gie
+++ b/test/gie/more_builtins.gie
@@ -241,35 +241,27 @@ Some tests from PJ_vgridshift.c
-------------------------------------------------------------------------------
operation proj=vgridshift grids=egm96_15.gtx ellps=GRS80
-------------------------------------------------------------------------------
-Appears there is a difference between the egm96_15.gtx distributed by OSGeo4W,
-and the one from https://download.osgeo.org/proj/vdatum/egm96_15/egm96_15.gtx
-N(12.5, 55.5) = -36.021305084228515625 (download.osgeo.org)
-N(12.5, 55.5) = -35.880001068115234000 (OSGeo4W)
-This is annoying, but must be handled elsewhere. We jump through the hoop by
-setting a very lax tolerance.
--------------------------------------------------------------------------------
-tolerance 15 cm
-ignore pjd_err_failed_to_load_grid
+tolerance 1 cm
accept 12.5 55.5 0 0
-expect 12.5 55.5 -36.021305084228516 0
+expect 12.5 55.5 -36.394090697 0
accept -180.1 0 0
-expect -180.1 0 -21.2423
+expect -180.1 0 -20.835222268
accept 179.9 0 0
-expect 179.9 0 -21.2423
+expect 179.9 0 -20.835222268
accept 180 0 0
-expect 180 0 -21.1533
+expect 180 0 -20.756538510
accept 540 0 0
-expect 540 0 -21.1533
+expect 540 0 -20.756538510
accept -180 0 0
-expect -180 0 -21.1533
+expect -180 0 -20.756538510
accept -540 0 0
-expect -540 0 -21.1533
+expect -540 0 -20.756538510
roundtrip 100 1 nm
-------------------------------------------------------------------------------
@@ -285,25 +277,20 @@ expect failure errno failed_to_load_grid
-------------------------------------------------------------------------------
operation proj=vgridshift grids=egm96_15.gtx ellps=GRS80 multiplier=0.1
tolerance 15 cm
-ignore pjd_err_failed_to_load_grid
accept 12.5 55.5 0 0
expect 12.5 55.5 3.6021305084228516 0
-------------------------------------------------------------------------------
Some tests from PJ_hgridshift.c
-------------------------------------------------------------------------------
-operation proj=hgridshift +grids=nzgd2kgrid0005.gsb ellps=GRS80
--------------------------------------------------------------------------------
-Note: These data are home grown and suitable for regression testing only
-We need a set of authoritative test cases to test the nzgd2000 grid.
+operation proj=hgridshift +grids=ntf_r93.gsb ellps=GRS80
-------------------------------------------------------------------------------
tolerance 1 mm
-ignore pjd_err_failed_to_load_grid
-accept 172.999892181021551 -45.001620431954613
-expect 173 -45
+accept 2.250704350387 46.500051597273
+expect 2.25 46.5
direction inverse
-accept 173 -45
-expect 172.999892181021551 -45.001620431954613
+accept 2.25 46.5
+expect 2.250704350387 46.500051597273
-------------------------------------------------------------------------------