aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/cli/CMakeLists.txt6
-rw-r--r--test/cli/Makefile.am12
-rw-r--r--test/cli/ntv2_out.dist16
-rw-r--r--test/cli/td_out.dist2
-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
-rw-r--r--test/unit/test_c_api.cpp17
9 files changed, 56 insertions, 95 deletions
diff --git a/test/cli/CMakeLists.txt b/test/cli/CMakeLists.txt
index cf4192d7..0f86ca3d 100644
--- a/test/cli/CMakeLists.txt
+++ b/test/cli/CMakeLists.txt
@@ -10,9 +10,9 @@ proj_add_test_script_sh("test27" PROJ_BIN)
proj_add_test_script_sh("test83" PROJ_BIN)
proj_add_test_script_sh("testproj" PROJ_BIN)
proj_add_test_script_sh("testvarious" CS2CS_BIN)
-proj_add_test_script_sh("testdatumfile" CS2CS_BIN "connu")
-proj_add_test_script_sh("testIGNF" CS2CS_BIN "ntf_r93.gsb")
-proj_add_test_script_sh("testntv2" CS2CS_BIN "ntv2_0.gsb")
+proj_add_test_script_sh("testdatumfile" CS2CS_BIN)
+proj_add_test_script_sh("testIGNF" CS2CS_BIN)
+proj_add_test_script_sh("testntv2" CS2CS_BIN)
proj_add_test_script_sh("testprojinfo" PROJINFO_BIN)
proj_add_test_script_sh("testcct" CCT_BIN)
if(BUILD_PROJSYNC_DATA)
diff --git a/test/cli/Makefile.am b/test/cli/Makefile.am
index 7ff42016..4d11eaf3 100644
--- a/test/cli/Makefile.am
+++ b/test/cli/Makefile.am
@@ -47,19 +47,13 @@ testvarious-check:
PROJ_SKIP_READ_USER_WRITABLE_DIRECTORY=YES PROJ_LIB=$(PROJ_LIB) $(TESTVARIOUS) $(CS2CSEXE)
testdatumfile-check:
- @if [ -f $(PROJ_LIB)/conus -a -f $(PROJ_LIB)/ntv1_can.dat -a -f $(PROJ_LIB)/MD -a -f $(PROJ_LIB)/ntf_r93.gsb -a -f $(PROJ_LIB)/egm96_15.gtx ]; then \
- PROJ_SKIP_READ_USER_WRITABLE_DIRECTORY=YES PROJ_LIB=$(PROJ_LIB) $(TESTDATUMFILE) $(CS2CSEXE) ; \
- fi
+ PROJ_SKIP_READ_USER_WRITABLE_DIRECTORY=YES PROJ_LIB=$(PROJ_LIB) $(TESTDATUMFILE) $(CS2CSEXE)
testign-check:
- @if [ -f $(PROJ_LIB)/ntf_r93.gsb ] ; then \
- PROJ_SKIP_READ_USER_WRITABLE_DIRECTORY=YES PROJ_LIB=$(PROJ_LIB) $(TESTIGN) $(CS2CSEXE) ; \
- fi
+ PROJ_SKIP_READ_USER_WRITABLE_DIRECTORY=YES PROJ_LIB=$(PROJ_LIB) $(TESTIGN) $(CS2CSEXE)
testntv2-check:
- @if [ -f $(PROJ_LIB)/ntv2_0.gsb -a -f $(PROJ_LIB)/conus -a -f $(PROJ_LIB)/ntv1_can.dat ] ; then \
- PROJ_SKIP_READ_USER_WRITABLE_DIRECTORY=YES PROJ_LIB=$(PROJ_LIB) $(TESTNTV2) $(CS2CSEXE) ; \
- fi
+ PROJ_SKIP_READ_USER_WRITABLE_DIRECTORY=YES PROJ_LIB=$(PROJ_LIB) $(TESTNTV2) $(CS2CSEXE)
testcct-check:
PROJ_SKIP_READ_USER_WRITABLE_DIRECTORY=YES PROJ_LIB=$(PROJ_LIB) $(TESTCCT) $(CCTEXE)
diff --git a/test/cli/ntv2_out.dist b/test/cli/ntv2_out.dist
index d90fdc37..890a649b 100644
--- a/test/cli/ntv2_out.dist
+++ b/test/cli/ntv2_out.dist
@@ -3,27 +3,27 @@ Point in the ONwinsor subgrid.
82d00'00.000"W 42d00'00.000"N 0.0 81d59'59.6104"W 42d0'0.1602"N 0.000
82d00'01.000"W 42d00'00.000"N 0.0 82d0'0.6104"W 42d0'0.1602"N 0.000
82d00'02.000"W 42d00'00.000"N 0.0 82d0'1.6104"W 42d0'0.1602"N 0.000
-84d00'00.000"W 42d00'00.000"N 0.0 83d59'59.8593"W 42d0'0.18"N 0.000
+84d00'00.000"W 42d00'00.000"N 0.0 83d59'59.8623"W 42d0'0.1807"N 0.000
##############################################################
Try with NTv2 and NTv1 together ... falls back to NTv1
-99d00'00.000"W 65d00'00.000"N 0.0 99d0'1.5885"W 65d0'1.3482"N 0.000
+99d00'00.000"W 65d00'00.000"N 0.0 99d0'1.5926"W 65d0'1.3478"N 0.000
111d00'00.000"W 46d00'00.000"N 0.0 111d0'3.1897"W 45d59'59.7489"N 0.000
-111d00'00.000"W 47d30'00.000"N 0.0 111d0'2.7989"W 47d29'59.9896"N 0.000
+111d00'00.000"W 47d30'00.000"N 0.0 111d0'2.8054"W 47d29'59.9899"N 0.000
##############################################################
Switching between NTv2 subgrids
--112.5839956 49.4914451 0 -112.58307487 49.49145197 0.00000000
+-112.5839956 49.4914451 0 -112.58307621 49.49144267 0.00000000
##############################################################
Interpolating very close (and sometimes a bit outside) to the edges a NTv2 subgrid (#209)
-115.58333333 51.25000000 0 -115.58228512 51.24997866 0.00000000
-115.58333333 51.25000010 0 -115.58228512 51.24997876 0.00000000
-115.58333334 51.25000000 0 -115.58228513 51.24997866 0.00000000
--115.49166667 51.07500000 0 -115.49062909 51.07497666 0.00000000
--115.49166668 51.07500000 0 -115.49062910 51.07497666 0.00000000
--115.49166667 51.07499990 0 -115.49062909 51.07497656 0.00000000
+-115.49166667 51.07500000 0 -115.49063575 51.07497568 0.00000000
+-115.49166668 51.07500000 0 -115.49063576 51.07497568 0.00000000
+-115.49166667 51.07499990 0 -115.49063575 51.07497558 0.00000000
##############################################################
Attempt first with ntv2_0.gsb and then conus
-111.5 45.26 -111.50079772 45.25992835 0.00000000
##############################################################
NAD27 -> NAD83: 1st through ntv2, 2nd through conus
-55d00'00.000"N 111d00'00.000"W 0.0 55d0'0.366"N 111d0'3.251"W 0.000
+55d00'00.000"N 111d00'00.000"W 0.0 55d0'0.367"N 111d0'3.231"W 0.000
39d00'00.000"N 111d00'00.000"W 0.0 38d59'59.912"N 111d0'2.604"W 0.000
diff --git a/test/cli/td_out.dist b/test/cli/td_out.dist
index cf4b8d73..ab0c0911 100644
--- a/test/cli/td_out.dist
+++ b/test/cli/td_out.dist
@@ -29,4 +29,4 @@ NAD27 -> NAD83: 1st through ntv1 or ntv2, 2nd through conus
39d00'00.000"N 111d00'00.000"W 0.0 39.0000 -111.0007 0.0000
##############################################################
WGS84 -> WGS84+EGM96
-2dE 49dN 0 2.00 49.00 -44.64
+2dE 49dN 0 2.00 49.00 -45.06
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
-------------------------------------------------------------------------------
diff --git a/test/unit/test_c_api.cpp b/test/unit/test_c_api.cpp
index 12a48a65..0f1b906e 100644
--- a/test/unit/test_c_api.cpp
+++ b/test/unit/test_c_api.cpp
@@ -4144,10 +4144,7 @@ TEST_F(CApi, proj_create_crs_to_crs_with_only_ballpark_transformations) {
coord = proj_trans(Pnormalized, PJ_FWD, coord);
EXPECT_NEAR(coord.xyzt.x, 3.0, 1e-9);
EXPECT_NEAR(coord.xyzt.y, 40.65085651660555, 1e-9);
- if (coord.xyzt.z != 0) {
- // z will depend if the egm96_15.gtx grid is there or not
- EXPECT_NEAR(coord.xyzt.z, 47.04784081844435, 1e-3);
- }
+ EXPECT_NEAR(coord.xyzt.z, 47.72600023608570, 1e-3);
}
// ---------------------------------------------------------------------------
@@ -4156,10 +4153,6 @@ TEST_F(
CApi,
proj_create_crs_to_crs_from_custom_compound_crs_with_NAD83_2011_and_geoidgrid_ref_against_WGS84_to_WGS84_G1762) {
- if (strcmp(proj_grid_info("egm96_15.gtx").format, "missing") == 0) {
- return; // use GTEST_SKIP() if we upgrade gtest
- }
-
PJ *P;
PJ *inCrsH = proj_create_from_database(m_ctxt, "EPSG", "6340",
@@ -4214,7 +4207,7 @@ TEST_F(
EXPECT_NEAR(outcoord.xyzt.x, 35.09499307271, 1e-9);
EXPECT_NEAR(outcoord.xyzt.y, -118.64014868921, 1e-9);
- EXPECT_NEAR(outcoord.xyzt.z, 118.059, 1e-3);
+ EXPECT_NEAR(outcoord.xyzt.z, 117.655, 1e-3);
}
// ---------------------------------------------------------------------------
@@ -4223,10 +4216,6 @@ TEST_F(
CApi,
proj_create_crs_to_crs_from_custom_compound_crs_with_NAD83_2011_and_geoidgrid_ref_against_NAD83_2011_to_WGS84_G1762) {
- if (strcmp(proj_grid_info("egm96_15.gtx").format, "missing") == 0) {
- return; // use GTEST_SKIP() if we upgrade gtest
- }
-
PJ *P;
// NAD83(2011) 2D
@@ -4278,7 +4267,7 @@ TEST_F(
EXPECT_NEAR(outcoord.xyzt.x, 35.000003665064803, 1e-9);
EXPECT_NEAR(outcoord.xyzt.y, -118.00001414221214, 1e-9);
- EXPECT_NEAR(outcoord.xyzt.z, -32.5823, 1e-3);
+ EXPECT_NEAR(outcoord.xyzt.z, -32.8110, 1e-3);
}
// ---------------------------------------------------------------------------