aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/cli/td_out.dist11
-rwxr-xr-xtest/cli/testdatumfile16
-rw-r--r--test/cli/testprojinfo_out.dist38
-rw-r--r--test/unit/test_c_api.cpp2
-rw-r--r--test/unit/test_operationfactory.cpp8
5 files changed, 31 insertions, 44 deletions
diff --git a/test/cli/td_out.dist b/test/cli/td_out.dist
index 6bad8e57..5c9b18d3 100644
--- a/test/cli/td_out.dist
+++ b/test/cli/td_out.dist
@@ -7,17 +7,12 @@ As above, but without ntv1 everything goes through conus file.
111d00'00.000"W 44d00'00.000"N 0.0 111d0'2.788"W 43d59'59.725"N 0.000
111d00'00.000"W 39d00'00.000"N 0.0 111d0'2.604"W 38d59'59.912"N 0.000
##############################################################
-Test --area Canada NAD27 NAD83 (using ntv1_can)
-43d59'59.732"N 111d0'3.208"W 0.000
-* * inf
-##############################################################
-Test --bbox -141.01,40.04,-47.74,86.46 NAD27 NAD83 (using ntv1_can)
-43d59'59.732"N 111d0'3.208"W 0.000
-* * inf
+Test --bbox -141.01,40.04,-47.74,83.17 NAD27 NAD83 (using NTv2)
+40d30'0.368"N 59d59'56.617"W 0.000
##############################################################
Test --area "USA - CONUS - onshore" NAD27 NAD83 (using conus)
43d59'59.725"N 111d0'2.788"W 0.000
-38d59'59.912"N 111d0'2.604"W 0.000
+* * inf
##############################################################
Test MD used where available
79d58'00.000"W 37d02'00.000"N 0.0 79d58'0.005"W 37d1'59.998"N 0.000
diff --git a/test/cli/testdatumfile b/test/cli/testdatumfile
index 5a013f12..e974d34c 100755
--- a/test/cli/testdatumfile
+++ b/test/cli/testdatumfile
@@ -60,24 +60,16 @@ $EXE +proj=latlong +ellps=clrk66 '+nadgrids="./dir with "" space/myconus"' \
EOF
echo "##############################################################" >> ${OUT}
-echo "Test --area Canada NAD27 NAD83 (using ntv1_can)" >> ${OUT}
-$EXE --area Canada NAD27 NAD83 >>${OUT} <<EOF
-44 -111
-39 -111
-EOF
-
-echo "##############################################################" >> ${OUT}
-echo "Test --bbox -141.01,40.04,-47.74,86.46 NAD27 NAD83 (using ntv1_can)" >> ${OUT}
-$EXE --bbox -141.01,40.04,-47.74,86.46 NAD27 NAD83 >>${OUT} <<EOF
-44 -111
-39 -111
+echo "Test --bbox -141.01,40.04,-47.74,83.17 NAD27 NAD83 (using NTv2)" >> ${OUT}
+$EXE --bbox -141.01,40.04,-47.74,83.17 NAD27 NAD83 >>${OUT} <<EOF
+40.5 -60
EOF
echo "##############################################################" >> ${OUT}
echo "Test --area \"USA - CONUS - onshore\" NAD27 NAD83 (using conus)" >> ${OUT}
$EXE --area "USA - CONUS - onshore" NAD27 NAD83 >>${OUT} <<EOF
44 -111
-39 -111
+40.5 -60
EOF
echo "##############################################################" >> ${OUT}
diff --git a/test/cli/testprojinfo_out.dist b/test/cli/testprojinfo_out.dist
index 829c914c..23a3e177 100644
--- a/test/cli/testprojinfo_out.dist
+++ b/test/cli/testprojinfo_out.dist
@@ -322,8 +322,8 @@ COORDINATEOPERATION["Ballpark geographic offset from NAD27 to NAD83",
Testing projinfo -s NAD27 -t NAD83 --grid-check none --spatial-test intersects --summary --hide-ballpark
Candidate operations found: 9
-DERIVED_FROM(EPSG):1312, NAD27 to NAD83 (3), 2.0 m, Canada - onshore and offshore - Alberta; British Columbia; Manitoba; New Brunswick; Newfoundland and Labrador; Northwest Territories; Nova Scotia; Nunavut; Ontario; Prince Edward Island; Quebec; Saskatchewan; Yukon.
DERIVED_FROM(EPSG):1313, NAD27 to NAD83 (4), 1.5 m, Canada - onshore - Alberta; British Columbia; Manitoba; New Brunswick; Newfoundland and Labrador; Northwest Territories; Nova Scotia; Nunavut; Ontario; Prince Edward Island; Quebec; Saskatchewan; Yukon; offshore east coast.
+DERIVED_FROM(EPSG):1312, NAD27 to NAD83 (3), 2.0 m, Canada - onshore - Alberta; British Columbia; Manitoba; New Brunswick; Newfoundland and Labrador; Northwest Territories; Nova Scotia; Nunavut; Ontario; Prince Edward Island; Quebec; Saskatchewan; Yukon; offshore east coast.
DERIVED_FROM(EPSG):1241, NAD27 to NAD83 (1), 0.15 m, United States (USA) - CONUS including EEZ -onshore and offshore - Alabama; Arizona; Arkansas; California; Colorado; Connecticut; Delaware; Florida; Georgia; Idaho; Illinois; Indiana; Iowa; Kansas; Kentucky; Louisiana; Maine; Maryland; Massachusetts; Michigan; Minnesota; Mississippi; Missouri; Montana; Nebraska; Nevada; New Hampshire; New Jersey; New Mexico; New York; North Carolina; North Dakota; Ohio; Oklahoma; Oregon; Pennsylvania; Rhode Island; South Carolina; South Dakota; Tennessee; Texas; Utah; Vermont; Virginia; Washington; West Virginia; Wisconsin; Wyoming. US Gulf of Mexico (GoM) OCS.
DERIVED_FROM(EPSG):1243, NAD27 to NAD83 (2), 0.5 m, United States (USA) - Alaska including EEZ.
DERIVED_FROM(EPSG):1573, NAD27 to NAD83 (6), 1.5 m, Canada - Quebec.
@@ -337,18 +337,18 @@ Candidate operations found: 10
-------------------------------------
Operation No. 1:
-DERIVED_FROM(EPSG):1312, NAD27 to NAD83 (3), 2.0 m, Canada - onshore and offshore - Alberta; British Columbia; Manitoba; New Brunswick; Newfoundland and Labrador; Northwest Territories; Nova Scotia; Nunavut; Ontario; Prince Edward Island; Quebec; Saskatchewan; Yukon.
+DERIVED_FROM(EPSG):1313, NAD27 to NAD83 (4), 1.5 m, Canada - onshore - Alberta; British Columbia; Manitoba; New Brunswick; Newfoundland and Labrador; Northwest Territories; Nova Scotia; Nunavut; Ontario; Prince Edward Island; Quebec; Saskatchewan; Yukon; offshore east coast.
PROJ string:
+proj=pipeline
+step +proj=axisswap +order=2,1
+step +proj=unitconvert +xy_in=deg +xy_out=rad
- +step +proj=hgridshift +grids=ca_nrc_ntv1_can.tif
+ +step +proj=hgridshift +grids=ca_nrc_ntv2_0.tif
+step +proj=unitconvert +xy_in=rad +xy_out=deg
+step +proj=axisswap +order=2,1
WKT2:2019 string:
-COORDINATEOPERATION["NAD27 to NAD83 (3)",
+COORDINATEOPERATION["NAD27 to NAD83 (4)",
SOURCECRS[
GEOGCRS["NAD27",
DATUM["North American Datum 1927",
@@ -380,30 +380,30 @@ COORDINATEOPERATION["NAD27 to NAD83 (3)",
ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4269]]],
METHOD["HORIZONTAL_SHIFT_GTIFF"],
- PARAMETERFILE["Latitude and longitude difference file","ca_nrc_ntv1_can.tif"],
- OPERATIONACCURACY[2.0],
+ PARAMETERFILE["Latitude and longitude difference file","ca_nrc_ntv2_0.tif"],
+ OPERATIONACCURACY[1.5],
USAGE[
- SCOPE["Historic record only - now superseded - see remarks."],
- AREA["Canada - onshore and offshore - Alberta; British Columbia; Manitoba; New Brunswick; Newfoundland and Labrador; Northwest Territories; Nova Scotia; Nunavut; Ontario; Prince Edward Island; Quebec; Saskatchewan; Yukon."],
- BBOX[40.04,-141.01,86.46,-47.74]],
- ID["DERIVED_FROM(EPSG)",1312],
- REMARK["Uses NTv1 method. Replaced in Quebec by code 1462 and elsewhere in 1997 by NTv2 (transformation code 1313). Input expects longitudes to be positive west; EPSG GeogCRS NAD27 (code 4267) and NAD83 (code 4269) have longitudes positive east."]]
+ SCOPE["Transformation of coordinates at 1m to 2m level of accuracy."],
+ AREA["Canada - onshore - Alberta; British Columbia; Manitoba; New Brunswick; Newfoundland and Labrador; Northwest Territories; Nova Scotia; Nunavut; Ontario; Prince Edward Island; Quebec; Saskatchewan; Yukon; offshore east coast."],
+ BBOX[40.04,-141.01,83.17,-47.74]],
+ ID["DERIVED_FROM(EPSG)",1313],
+ REMARK["Uses NTv2 data files. Replaces NTv1 (transformation code 1312) except in Quebec. Input expects longitudes to be positive west; EPSG GeogCRS NAD27 (code 4267) and (code 4269) have longitudes positive east. May be used as tfm to WGS 84 - see code 1693."]]
-------------------------------------
Operation No. 2:
-DERIVED_FROM(EPSG):1313, NAD27 to NAD83 (4), 1.5 m, Canada - onshore - Alberta; British Columbia; Manitoba; New Brunswick; Newfoundland and Labrador; Northwest Territories; Nova Scotia; Nunavut; Ontario; Prince Edward Island; Quebec; Saskatchewan; Yukon; offshore east coast.
+DERIVED_FROM(EPSG):1312, NAD27 to NAD83 (3), 2.0 m, Canada - onshore - Alberta; British Columbia; Manitoba; New Brunswick; Newfoundland and Labrador; Northwest Territories; Nova Scotia; Nunavut; Ontario; Prince Edward Island; Quebec; Saskatchewan; Yukon; offshore east coast.
PROJ string:
+proj=pipeline
+step +proj=axisswap +order=2,1
+step +proj=unitconvert +xy_in=deg +xy_out=rad
- +step +proj=hgridshift +grids=ca_nrc_ntv2_0.tif
+ +step +proj=hgridshift +grids=ca_nrc_ntv1_can.tif
+step +proj=unitconvert +xy_in=rad +xy_out=deg
+step +proj=axisswap +order=2,1
WKT2:2019 string:
-COORDINATEOPERATION["NAD27 to NAD83 (4)",
+COORDINATEOPERATION["NAD27 to NAD83 (3)",
SOURCECRS[
GEOGCRS["NAD27",
DATUM["North American Datum 1927",
@@ -435,14 +435,14 @@ COORDINATEOPERATION["NAD27 to NAD83 (4)",
ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4269]]],
METHOD["HORIZONTAL_SHIFT_GTIFF"],
- PARAMETERFILE["Latitude and longitude difference file","ca_nrc_ntv2_0.tif"],
- OPERATIONACCURACY[1.5],
+ PARAMETERFILE["Latitude and longitude difference file","ca_nrc_ntv1_can.tif"],
+ OPERATIONACCURACY[2.0],
USAGE[
- SCOPE["Transformation of coordinates at 1m to 2m level of accuracy."],
+ SCOPE["Historic record only - now superseded - see remarks."],
AREA["Canada - onshore - Alberta; British Columbia; Manitoba; New Brunswick; Newfoundland and Labrador; Northwest Territories; Nova Scotia; Nunavut; Ontario; Prince Edward Island; Quebec; Saskatchewan; Yukon; offshore east coast."],
BBOX[40.04,-141.01,83.17,-47.74]],
- ID["DERIVED_FROM(EPSG)",1313],
- REMARK["Uses NTv2 data files. Replaces NTv1 (transformation code 1312) except in Quebec. Input expects longitudes to be positive west; EPSG GeogCRS NAD27 (code 4267) and (code 4269) have longitudes positive east. May be used as tfm to WGS 84 - see code 1693."]]
+ ID["DERIVED_FROM(EPSG)",1312],
+ REMARK["Uses NTv1 method. Replaced in Quebec by code 1462 and elsewhere in 1997 by NTv2 (transformation code 1313). Input expects longitudes to be positive west; EPSG GeogCRS NAD27 (code 4267) and NAD83 (code 4269) have longitudes positive east."]]
-------------------------------------
Operation No. 3:
diff --git a/test/unit/test_c_api.cpp b/test/unit/test_c_api.cpp
index 60ad8f61..b67ff6d1 100644
--- a/test/unit/test_c_api.cpp
+++ b/test/unit/test_c_api.cpp
@@ -1440,7 +1440,7 @@ TEST_F(CApi, proj_create_operations) {
ObjectKeeper keeper_op(op);
EXPECT_FALSE(
proj_coordoperation_has_ballpark_transformation(m_ctxt, op));
- EXPECT_EQ(proj_get_name(op), std::string("NAD27 to NAD83 (3)"));
+ EXPECT_EQ(proj_get_name(op), std::string("NAD27 to NAD83 (4)"));
}
{
diff --git a/test/unit/test_operationfactory.cpp b/test/unit/test_operationfactory.cpp
index b71c3d66..15467a69 100644
--- a/test/unit/test_operationfactory.cpp
+++ b/test/unit/test_operationfactory.cpp
@@ -346,12 +346,12 @@ TEST(operation, geogCRS_to_geogCRS_context_ntv1_ntv2_ctable2) {
EXPECT_EQ(list[0]->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=pipeline +step +proj=axisswap +order=2,1 +step "
"+proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=hgridshift "
- "+grids=ca_nrc_ntv1_can.tif +step +proj=unitconvert +xy_in=rad "
+ "+grids=ca_nrc_ntv2_0.tif +step +proj=unitconvert +xy_in=rad "
"+xy_out=deg +step +proj=axisswap +order=2,1");
EXPECT_EQ(list[1]->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=pipeline +step +proj=axisswap +order=2,1 +step "
"+proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=hgridshift "
- "+grids=ca_nrc_ntv2_0.tif +step +proj=unitconvert +xy_in=rad "
+ "+grids=ca_nrc_ntv1_can.tif +step +proj=unitconvert +xy_in=rad "
"+xy_out=deg +step +proj=axisswap +order=2,1");
EXPECT_EQ(list[2]->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=pipeline +step +proj=axisswap +order=2,1 +step "
@@ -730,8 +730,8 @@ TEST(operation, vertCRS_to_geogCRS_context) {
{
// Test actually the database where we derive records using the more
// classic 'Geographic3D to GravityRelatedHeight' method from
- // records using EPSG:9635
- //'Geog3D to Geog2D+GravityRelatedHeight (US .gtx)' method
+ // records using EPSG:1088
+ //'Geog3D to Geog2D+GravityRelatedHeight (gtx)' method
auto ctxt = CoordinateOperationContext::create(
AuthorityFactory::create(DatabaseContext::create(), std::string()),
nullptr, 0.0);