aboutsummaryrefslogtreecommitdiff
path: root/test/cli
diff options
context:
space:
mode:
Diffstat (limited to 'test/cli')
-rw-r--r--test/cli/Makefile.am6
-rw-r--r--test/cli/td_out.dist12
-rwxr-xr-xtest/cli/testcct127
-rw-r--r--test/cli/testcct_out.dist23
-rwxr-xr-xtest/cli/testdatumfile21
-rwxr-xr-xtest/cli/testprojinfo4
-rw-r--r--test/cli/testprojinfo_out.dist221
-rwxr-xr-xtest/cli/testvarious13
-rw-r--r--test/cli/tv_out.dist7
9 files changed, 410 insertions, 24 deletions
diff --git a/test/cli/Makefile.am b/test/cli/Makefile.am
index 4d11eaf3..46d9d36c 100644
--- a/test/cli/Makefile.am
+++ b/test/cli/Makefile.am
@@ -35,13 +35,13 @@ testprojinfo-check:
PROJ_SKIP_READ_USER_WRITABLE_DIRECTORY=YES PROJ_LIB=$(PROJ_LIB) $(TESTPROJINFO) $(PROJINFOEXE)
test27-check:
- $(TEST27) $(PROJEXE)
+ PROJ_LIB=$(PROJ_LIB) $(TEST27) $(PROJEXE)
test83-check:
- $(TEST83) $(PROJEXE)
+ PROJ_LIB=$(PROJ_LIB) $(TEST83) $(PROJEXE)
testproj-check:
- $(TESTPROJ) $(PROJEXE)
+ PROJ_LIB=$(PROJ_LIB) $(TESTPROJ) $(PROJEXE)
testvarious-check:
PROJ_SKIP_READ_USER_WRITABLE_DIRECTORY=YES PROJ_LIB=$(PROJ_LIB) $(TESTVARIOUS) $(CS2CSEXE)
diff --git a/test/cli/td_out.dist b/test/cli/td_out.dist
index ab0c0911..6bad8e57 100644
--- a/test/cli/td_out.dist
+++ b/test/cli/td_out.dist
@@ -7,6 +7,18 @@ 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 --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
+##############################################################
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
79d58'00.000"W 36d58'00.000"N 0.0 79d57'59.128"W 36d58'0.501"N 0.000
diff --git a/test/cli/testcct b/test/cli/testcct
index 3fb0dd95..686931ea 100755
--- a/test/cli/testcct
+++ b/test/cli/testcct
@@ -32,6 +32,133 @@ echo "Testing cct -d 8 +proj=merc +R=1" >> ${OUT}
echo "90 45" 0 | $EXE -d 8 +proj=merc +R=1 >>${OUT}
echo "" >>${OUT}
+# tests without specifying the number of decimals (by default: 10 for radians and degrees, 4 for meters)
+echo "Testing echo 0.5 2 | cct -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad" >> ${OUT}
+echo 0.5 2 | $EXE -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad >> ${OUT}
+
+echo "Testing echo 0.5 2 | cct -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=deg" >> ${OUT}
+echo 0.5 2 | $EXE -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=deg >> ${OUT}
+
+echo "Testing echo 0.5 2 | cct -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=m +xy_out=km" >> ${OUT}
+echo 0.5 2 | $EXE -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=m +xy_out=km >> ${OUT}
+echo "" >> ${OUT}
+
+# tests for which the number of decimals has been specified (-d 6)
+echo "Testing echo 0.5 2 | cct -d 6 -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad" >> ${OUT}
+echo 0.5 2 | $EXE -d 6 -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad >> ${OUT}
+
+echo "Testing echo 0.5 2 | cct -d 6 -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=deg" >> ${OUT}
+echo 0.5 2 | $EXE -d 6 -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=deg >> ${OUT}
+
+echo "Testing echo 0.5 2 | cct -d 6 -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=m +xy_out=km" >> ${OUT}
+echo 0.5 2 | $EXE -d 6 -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=m +xy_out=km >> ${OUT}
+echo "" >> ${OUT}
+
+echo "Test cct with object code initialization" >> ${OUT}
+echo "3541657.3778 948984.2343 5201383.5231 2020.5" | $EXE EPSG:8366 >>${OUT}
+
+echo "Test cct with object name initialization" >> ${OUT}
+echo "3541657.3778 948984.2343 5201383.5231 2020.5" | $EXE "ITRF2014 to ETRF2014 (1)" >>${OUT}
+
+echo "Test cct with object code initialization and file input" >> ${OUT}
+echo "3541657.3778 948984.2343 5201383.5231 2020.5" > a
+echo "3541658.0000 948985.0000 5201384.0000 2020.5" > b
+$EXE EPSG:8366 a b >>${OUT}
+/bin/rm a b
+
+cat > in.wkt <<EOF
+COORDINATEOPERATION["ITRF2014 to ETRF2014 (1)",
+ VERSION["EUREF-Eur"],
+ SOURCECRS[
+ GEODCRS["ITRF2014",
+ DYNAMIC[
+ FRAMEEPOCH[2010]],
+ DATUM["International Terrestrial Reference Frame 2014",
+ ELLIPSOID["GRS 1980",6378137,298.257222101,
+ LENGTHUNIT["metre",1]]],
+ PRIMEM["Greenwich",0,
+ ANGLEUNIT["degree",0.0174532925199433]],
+ CS[Cartesian,3],
+ AXIS["(X)",geocentricX,
+ ORDER[1],
+ LENGTHUNIT["metre",1]],
+ AXIS["(Y)",geocentricY,
+ ORDER[2],
+ LENGTHUNIT["metre",1]],
+ AXIS["(Z)",geocentricZ,
+ ORDER[3],
+ LENGTHUNIT["metre",1]],
+ ID["EPSG",7789]]],
+ TARGETCRS[
+ GEODCRS["ETRF2014",
+ DATUM["European Terrestrial Reference Frame 2014",
+ ELLIPSOID["GRS 1980",6378137,298.257222101,
+ LENGTHUNIT["metre",1]]],
+ PRIMEM["Greenwich",0,
+ ANGLEUNIT["degree",0.0174532925199433]],
+ CS[Cartesian,3],
+ AXIS["(X)",geocentricX,
+ ORDER[1],
+ LENGTHUNIT["metre",1]],
+ AXIS["(Y)",geocentricY,
+ ORDER[2],
+ LENGTHUNIT["metre",1]],
+ AXIS["(Z)",geocentricZ,
+ ORDER[3],
+ LENGTHUNIT["metre",1]],
+ ID["EPSG",8401]]],
+ METHOD["Time-dependent Position Vector tfm (geocentric)",
+ ID["EPSG",1053]],
+ PARAMETER["X-axis translation",0,
+ LENGTHUNIT["millimetre",0.001],
+ ID["EPSG",8605]],
+ PARAMETER["Y-axis translation",0,
+ LENGTHUNIT["millimetre",0.001],
+ ID["EPSG",8606]],
+ PARAMETER["Z-axis translation",0,
+ LENGTHUNIT["millimetre",0.001],
+ ID["EPSG",8607]],
+ PARAMETER["X-axis rotation",0,
+ ANGLEUNIT["milliarc-second",4.84813681109536E-09],
+ ID["EPSG",8608]],
+ PARAMETER["Y-axis rotation",0,
+ ANGLEUNIT["milliarc-second",4.84813681109536E-09],
+ ID["EPSG",8609]],
+ PARAMETER["Z-axis rotation",0,
+ ANGLEUNIT["milliarc-second",4.84813681109536E-09],
+ ID["EPSG",8610]],
+ PARAMETER["Scale difference",0,
+ SCALEUNIT["parts per billion",1E-09],
+ ID["EPSG",8611]],
+ PARAMETER["Rate of change of X-axis translation",0,
+ LENGTHUNIT["millimetres per year",3.16887651727315E-11],
+ ID["EPSG",1040]],
+ PARAMETER["Rate of change of Y-axis translation",0,
+ LENGTHUNIT["millimetres per year",3.16887651727315E-11],
+ ID["EPSG",1041]],
+ PARAMETER["Rate of change of Z-axis translation",0,
+ LENGTHUNIT["millimetres per year",3.16887651727315E-11],
+ ID["EPSG",1042]],
+ PARAMETER["Rate of change of X-axis rotation",0.085,
+ ANGLEUNIT["milliarc-seconds per year",1.53631468932076E-16],
+ ID["EPSG",1043]],
+ PARAMETER["Rate of change of Y-axis rotation",0.531,
+ ANGLEUNIT["milliarc-seconds per year",1.53631468932076E-16],
+ ID["EPSG",1044]],
+ PARAMETER["Rate of change of Z-axis rotation",-0.77,
+ ANGLEUNIT["milliarc-seconds per year",1.53631468932076E-16],
+ ID["EPSG",1045]],
+ PARAMETER["Rate of change of Scale difference",0,
+ SCALEUNIT["parts per billion per year",3.16887651727315E-17],
+ ID["EPSG",1046]],
+ PARAMETER["Parameter reference epoch",1989,
+ TIMEUNIT["year",31556925.445],
+ ID["EPSG",1047]]]
+EOF
+echo "Test cct with WKT in a file" >> ${OUT}
+echo "3541657.3778 948984.2343 5201383.5231 2020.5" | $EXE @in.wkt >>${OUT}
+rm in.wkt
+
# do 'diff' with distribution results
echo "diff ${OUT} with testcct_out.dist"
diff -u ${OUT} ${TEST_CLI_DIR}/testcct_out.dist
diff --git a/test/cli/testcct_out.dist b/test/cli/testcct_out.dist
index 44dd6964..7762ace7 100644
--- a/test/cli/testcct_out.dist
+++ b/test/cli/testcct_out.dist
@@ -1,3 +1,26 @@
Testing cct -d 8 +proj=merc +R=1
1.57079633 0.88137359 0.00000000 inf
+Testing echo 0.5 2 | cct -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad
+ 0.5000000000 2.0000000000 0.0000 0.0000
+Testing echo 0.5 2 | cct -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=deg
+ 0.5000000000 2.0000000000 0.0000 0.0000
+Testing echo 0.5 2 | cct -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=m +xy_out=km
+ 0.0005 0.0020 0.0000 0.0000
+
+Testing echo 0.5 2 | cct -d 6 -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad
+ 0.500000 2.000000 0.000000 0.0000
+Testing echo 0.5 2 | cct -d 6 -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=deg
+ 0.500000 2.000000 0.000000 0.0000
+Testing echo 0.5 2 | cct -d 6 -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=m +xy_out=km
+ 0.000500 0.002000 0.000000 0.0000
+
+Test cct with object code initialization
+ 3541657.9112 948983.7503 5201383.2482 2020.5000
+Test cct with object name initialization
+ 3541657.9112 948983.7503 5201383.2482 2020.5000
+Test cct with object code initialization and file input
+ 3541657.9112 948983.7503 5201383.2482 2020.5000
+ 3541658.5334 948984.5160 5201383.7251 2020.5000
+Test cct with WKT in a file
+ 3541657.9112 948983.7503 5201383.2482 2020.5000
diff --git a/test/cli/testdatumfile b/test/cli/testdatumfile
index 16e4bbc3..5a013f12 100755
--- a/test/cli/testdatumfile
+++ b/test/cli/testdatumfile
@@ -60,6 +60,27 @@ $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
+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
+EOF
+
+echo "##############################################################" >> ${OUT}
echo Test MD used where available >> ${OUT}
#
$EXE +proj=latlong +ellps=clrk66 +nadgrids=MD,conus \
diff --git a/test/cli/testprojinfo b/test/cli/testprojinfo
index 62713af5..c31cfef0 100755
--- a/test/cli/testprojinfo
+++ b/test/cli/testprojinfo
@@ -171,6 +171,10 @@ echo 'Testing -k datum EPSG:6326' >> ${OUT}
$EXE -k datum EPSG:6326 >>${OUT} 2>&1
echo "" >>${OUT}
+echo 'Testing -k ensemble WGS84' >> ${OUT}
+$EXE -k ensemble WGS84 >>${OUT} 2>&1
+echo "" >>${OUT}
+
echo 'Testing -k operation EPSG:8457 -o PROJ -q' >> ${OUT}
$EXE -k operation EPSG:8457 -o PROJ -q >>${OUT} 2>&1
echo "" >>${OUT}
diff --git a/test/cli/testprojinfo_out.dist b/test/cli/testprojinfo_out.dist
index 245bb258..8e8ef294 100644
--- a/test/cli/testprojinfo_out.dist
+++ b/test/cli/testprojinfo_out.dist
@@ -4,9 +4,16 @@ PROJ.4 string:
WKT2:2019 string:
GEOGCRS["WGS 84",
- DATUM["World Geodetic System 1984",
+ ENSEMBLE["World Geodetic System 1984 ensemble",
+ MEMBER["World Geodetic System 1984 (Transit)"],
+ MEMBER["World Geodetic System 1984 (G730)"],
+ MEMBER["World Geodetic System 1984 (G873)"],
+ MEMBER["World Geodetic System 1984 (G1150)"],
+ MEMBER["World Geodetic System 1984 (G1674)"],
+ MEMBER["World Geodetic System 1984 (G1762)"],
ELLIPSOID["WGS 84",6378137,298.257223563,
- LENGTHUNIT["metre",1]]],
+ LENGTHUNIT["metre",1]],
+ ENSEMBLEACCURACY[2.0]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
CS[ellipsoidal,2],
@@ -59,9 +66,16 @@ GEODCRS["WGS 84",
Testing projinfo -o WKT2_2019 EPSG:4326
WKT2:2019 string:
GEOGCRS["WGS 84",
- DATUM["World Geodetic System 1984",
+ ENSEMBLE["World Geodetic System 1984 ensemble",
+ MEMBER["World Geodetic System 1984 (Transit)"],
+ MEMBER["World Geodetic System 1984 (G730)"],
+ MEMBER["World Geodetic System 1984 (G873)"],
+ MEMBER["World Geodetic System 1984 (G1150)"],
+ MEMBER["World Geodetic System 1984 (G1674)"],
+ MEMBER["World Geodetic System 1984 (G1762)"],
ELLIPSOID["WGS 84",6378137,298.257223563,
- LENGTHUNIT["metre",1]]],
+ LENGTHUNIT["metre",1]],
+ ENSEMBLEACCURACY[2.0]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
CS[ellipsoidal,2],
@@ -102,9 +116,16 @@ GEODCRS["WGS 84",
WKT2:2019 string:
GEOGCRS["WGS 84",
- DATUM["World Geodetic System 1984",
+ ENSEMBLE["World Geodetic System 1984 ensemble",
+ MEMBER["World Geodetic System 1984 (Transit)"],
+ MEMBER["World Geodetic System 1984 (G730)"],
+ MEMBER["World Geodetic System 1984 (G873)"],
+ MEMBER["World Geodetic System 1984 (G1150)"],
+ MEMBER["World Geodetic System 1984 (G1674)"],
+ MEMBER["World Geodetic System 1984 (G1762)"],
ELLIPSOID["WGS 84",6378137,298.257223563,
- LENGTHUNIT["metre",1]]],
+ LENGTHUNIT["metre",1]],
+ ENSEMBLEACCURACY[2.0]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
CS[ellipsoidal,2],
@@ -142,13 +163,61 @@ PROJJSON:
"$schema": "https://proj.org/schemas/v0.2/projjson.schema.json",
"type": "GeographicCRS",
"name": "WGS 84",
- "datum": {
- "type": "GeodeticReferenceFrame",
- "name": "World Geodetic System 1984",
+ "datum_ensemble": {
+ "name": "World Geodetic System 1984 ensemble",
+ "members": [
+ {
+ "name": "World Geodetic System 1984 (Transit)",
+ "id": {
+ "authority": "EPSG",
+ "code": 1166
+ }
+ },
+ {
+ "name": "World Geodetic System 1984 (G730)",
+ "id": {
+ "authority": "EPSG",
+ "code": 1152
+ }
+ },
+ {
+ "name": "World Geodetic System 1984 (G873)",
+ "id": {
+ "authority": "EPSG",
+ "code": 1153
+ }
+ },
+ {
+ "name": "World Geodetic System 1984 (G1150)",
+ "id": {
+ "authority": "EPSG",
+ "code": 1154
+ }
+ },
+ {
+ "name": "World Geodetic System 1984 (G1674)",
+ "id": {
+ "authority": "EPSG",
+ "code": 1155
+ }
+ },
+ {
+ "name": "World Geodetic System 1984 (G1762)",
+ "id": {
+ "authority": "EPSG",
+ "code": 1156
+ }
+ }
+ ],
"ellipsoid": {
"name": "WGS 84",
"semi_major_axis": 6378137,
"inverse_flattening": 298.257223563
+ },
+ "accuracy": "2.0",
+ "id": {
+ "authority": "EPSG",
+ "code": 6326
}
},
"coordinate_system": {
@@ -317,7 +386,8 @@ COORDINATEOPERATION["NAD27 to NAD83 (3)",
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]]
+ 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. 2:
@@ -371,7 +441,8 @@ COORDINATEOPERATION["NAD27 to NAD83 (4)",
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]]
+ 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. 3:
@@ -425,7 +496,8 @@ COORDINATEOPERATION["NAD27 to NAD83 (1)",
SCOPE["Transformation of coordinates at 0.2m level of accuracy."],
AREA["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."],
BBOX[23.81,-129.17,49.38,-65.69]],
- ID["DERIVED_FROM(EPSG)",1241]]
+ ID["DERIVED_FROM(EPSG)",1241],
+ REMARK["Uses NADCON method which expects longitudes positive west; EPSG GeogCRS NAD27 (code 4267) and NAD83 (code 4269) have longitudes positive east."]]
-------------------------------------
Operation No. 4:
@@ -479,7 +551,8 @@ COORDINATEOPERATION["NAD27 to NAD83 (2)",
SCOPE["Geodesy."],
AREA["United States (USA) - Alaska including EEZ."],
BBOX[47.88,167.65,74.71,-129.99]],
- ID["DERIVED_FROM(EPSG)",1243]]
+ ID["DERIVED_FROM(EPSG)",1243],
+ REMARK["Uses NADCON method which expects longitudes positive west; EPSG GeogCRS NAD27 (code 4267) and NAD83 (code 4269) have longitudes positive east. May be used as transformation to WGS 84 - see NAD27 to WGS 84 (85) (code 15864)."]]
-------------------------------------
Operation No. 5:
@@ -533,7 +606,8 @@ COORDINATEOPERATION["NAD27 to NAD83 (6)",
SCOPE["Transformation of coordinates at 1m to 2m level of accuracy."],
AREA["Canada - Quebec."],
BBOX[44.99,-79.85,62.62,-57.1]],
- ID["DERIVED_FROM(EPSG)",1573]]
+ ID["DERIVED_FROM(EPSG)",1573],
+ REMARK["Also distributed with file name QUE27-83.gsb. Replaces NAD27 to NAD83 (5) (code 1462). Uses NT method which expects longitudes positive west; EPSG GeogCRSs NAD27 (code 4267) and NAD83 (code 4269) have longitudes positive east."]]
-------------------------------------
Operation No. 6:
@@ -916,7 +990,7 @@ PROJ.4 string:
+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +type=crs
Testing RH2000 height to SWEREF99: projinfo -s EPSG:5613 -t EPSG:4977
-Candidate operations found: 1
+Candidate operations found: 2
-------------------------------------
Operation No. 1:
@@ -968,8 +1042,55 @@ COORDINATEOPERATION["Inverse of SWEREF99 to RH2000 height",
BBOX[55.28,10.93,69.07,24.17]],
ID["INVERSE(DERIVED_FROM(PROJ))","EPSG_4977_TO_EPSG_5613"]]
+-------------------------------------
+Operation No. 2:
+
+unknown id, Transformation from RH2000 height to SWEREF99 (ballpark vertical transformation, without ellipsoid height to vertical height correction), unknown accuracy, World, has ballpark transformation
+
+PROJ string:
++proj=noop
+
+WKT2:2019 string:
+COORDINATEOPERATION["Transformation from RH2000 height to SWEREF99 (ballpark vertical transformation, without ellipsoid height to vertical height correction)",
+ SOURCECRS[
+ VERTCRS["RH2000 height",
+ DYNAMIC[
+ FRAMEEPOCH[2000]],
+ VDATUM["Rikets hojdsystem 2000"],
+ CS[vertical,1],
+ AXIS["gravity-related height (H)",up,
+ LENGTHUNIT["metre",1]],
+ ID["EPSG",5613]]],
+ TARGETCRS[
+ GEOGCRS["SWEREF99",
+ DATUM["SWEREF99",
+ ELLIPSOID["GRS 1980",6378137,298.257222101,
+ LENGTHUNIT["metre",1]]],
+ PRIMEM["Greenwich",0,
+ ANGLEUNIT["degree",0.0174532925199433]],
+ CS[ellipsoidal,3],
+ AXIS["geodetic latitude (Lat)",north,
+ ORDER[1],
+ ANGLEUNIT["degree",0.0174532925199433]],
+ AXIS["geodetic longitude (Lon)",east,
+ ORDER[2],
+ ANGLEUNIT["degree",0.0174532925199433]],
+ AXIS["ellipsoidal height (h)",up,
+ ORDER[3],
+ LENGTHUNIT["metre",1]],
+ ID["EPSG",4977]]],
+ METHOD["Change of Vertical Unit",
+ ID["EPSG",1069]],
+ PARAMETER["Unit conversion scalar",1,
+ SCALEUNIT["unity",1],
+ ID["EPSG",1051]],
+ USAGE[
+ SCOPE["unknown"],
+ AREA["World"],
+ BBOX[-90,-180,90,180]]]
+
Testing NAD83(2011) + NAVD88 height -> NAD83(2011) : projinfo -s EPSG:6349 -t EPSG:6319 --spatial-test intersects -o PROJ
-Candidate operations found: 2
+Candidate operations found: 3
-------------------------------------
Operation No. 1:
@@ -996,8 +1117,16 @@ PROJ string:
+step +proj=unitconvert +xy_in=rad +xy_out=deg
+step +proj=axisswap +order=2,1
+-------------------------------------
+Operation No. 3:
+
+unknown id, Transformation from NAVD88 height to NAD83(2011) (ballpark vertical transformation, without ellipsoid height to vertical height correction), unknown accuracy, World, has ballpark transformation
+
+PROJ string:
++proj=noop
+
Testing NGF IGN69 height to RGF93: projinfo -s EPSG:5720 -t EPSG:4965 -o PROJ
-Candidate operations found: 1
+Candidate operations found: 2
-------------------------------------
Operation No. 1:
@@ -1011,6 +1140,14 @@ PROJ string:
+step +proj=unitconvert +xy_in=rad +xy_out=deg
+step +proj=axisswap +order=2,1
+-------------------------------------
+Operation No. 2:
+
+unknown id, Transformation from NGF-IGN69 height to RGF93 (ballpark vertical transformation, without ellipsoid height to vertical height correction), unknown accuracy, World, has ballpark transformation
+
+PROJ string:
++proj=noop
+
Testing EPSG:32631 --3d
PROJ.4 string:
+proj=utm +zone=31 +datum=WGS84 +units=m +no_defs +type=crs
@@ -1018,9 +1155,16 @@ PROJ.4 string:
WKT2:2019 string:
PROJCRS["WGS 84 / UTM zone 31N",
BASEGEOGCRS["WGS 84",
- DATUM["World Geodetic System 1984",
+ ENSEMBLE["World Geodetic System 1984 ensemble",
+ MEMBER["World Geodetic System 1984 (Transit)"],
+ MEMBER["World Geodetic System 1984 (G730)"],
+ MEMBER["World Geodetic System 1984 (G873)"],
+ MEMBER["World Geodetic System 1984 (G1150)"],
+ MEMBER["World Geodetic System 1984 (G1674)"],
+ MEMBER["World Geodetic System 1984 (G1762)"],
ELLIPSOID["WGS 84",6378137,298.257223563,
- LENGTHUNIT["metre",1]]],
+ LENGTHUNIT["metre",1]],
+ ENSEMBLEACCURACY[2.0]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4979]],
@@ -1179,6 +1323,27 @@ DATUM["World Geodetic System 1984",
LENGTHUNIT["metre",1]],
ID["EPSG",6326]]
+Testing -k ensemble WGS84
+WKT2:2019 string:
+ENSEMBLE["World Geodetic System 1984 ensemble",
+ MEMBER["World Geodetic System 1984 (Transit)",
+ ID["EPSG",1166]],
+ MEMBER["World Geodetic System 1984 (G730)",
+ ID["EPSG",1152]],
+ MEMBER["World Geodetic System 1984 (G873)",
+ ID["EPSG",1153]],
+ MEMBER["World Geodetic System 1984 (G1150)",
+ ID["EPSG",1154]],
+ MEMBER["World Geodetic System 1984 (G1674)",
+ ID["EPSG",1155]],
+ MEMBER["World Geodetic System 1984 (G1762)",
+ ID["EPSG",1156]],
+ ELLIPSOID["WGS 84",6378137,298.257223563,
+ LENGTHUNIT["metre",1],
+ ID["EPSG",7030]],
+ ENSEMBLEACCURACY[2.0],
+ ID["EPSG",6326]]
+
Testing -k operation EPSG:8457 -o PROJ -q
+proj=pipeline
+step +proj=axisswap +order=2,1
@@ -1193,9 +1358,23 @@ Testing -k operation EPSG:8457 -o PROJ -q
Testing D_WGS_1984
WKT2:2019 string:
-DATUM["World Geodetic System 1984",
+ENSEMBLE["World Geodetic System 1984 ensemble",
+ MEMBER["World Geodetic System 1984 (Transit)",
+ ID["EPSG",1166]],
+ MEMBER["World Geodetic System 1984 (G730)",
+ ID["EPSG",1152]],
+ MEMBER["World Geodetic System 1984 (G873)",
+ ID["EPSG",1153]],
+ MEMBER["World Geodetic System 1984 (G1150)",
+ ID["EPSG",1154]],
+ MEMBER["World Geodetic System 1984 (G1674)",
+ ID["EPSG",1155]],
+ MEMBER["World Geodetic System 1984 (G1762)",
+ ID["EPSG",1156]],
ELLIPSOID["WGS 84",6378137,298.257223563,
- LENGTHUNIT["metre",1]],
+ LENGTHUNIT["metre",1],
+ ID["EPSG",7030]],
+ ENSEMBLEACCURACY[2.0],
ID["EPSG",6326]]
Testing -k datum D_WGS_1984
diff --git a/test/cli/testvarious b/test/cli/testvarious
index 292ee316..82be4992 100755
--- a/test/cli/testvarious
+++ b/test/cli/testvarious
@@ -1009,6 +1009,19 @@ $EXE -f %.3f EPSG:4686 EPSG:6247 -E >> ${OUT} <<EOF
4.8 -74.25
EOF
+echo "##############################################################" >> ${OUT}
+echo "Test effect of --authority (https://github.com/OSGeo/PROJ/issues/2442)" >> ${OUT}
+echo "This test might be a bit fragile if proj.db content changes" >> ${OUT}
+echo "The first result should use the 'WGS_1984_(ITRF08)_To_NAD_1983_2011' (ESRI:108363) operation" >> ${OUT}
+echo "and the second one a no-op" >> ${OUT}
+$EXE -E +proj=latlong +datum=WGS84 +no_defs +to +init=epsg:6342 >> ${OUT} <<EOF
+-105 40
+EOF
+$EXE --authority EPSG -E +proj=latlong +datum=WGS84 +no_defs +to +init=epsg:6342 >> ${OUT} <<EOF
+-105 40
+EOF
+
+
# Done!
# do 'diff' with distribution results
echo "diff ${OUT} with ${OUT}.dist"
diff --git a/test/cli/tv_out.dist b/test/cli/tv_out.dist
index 70b2ab6e..fe1aa452 100644
--- a/test/cli/tv_out.dist
+++ b/test/cli/tv_out.dist
@@ -485,3 +485,10 @@ Test EPSG:xxxx EPSG:yyyy filename
##############################################################
Test Colombia Urban
4.8 -74.25 122543.174 80859.033 0.000
+##############################################################
+Test effect of --authority (https://github.com/OSGeo/PROJ/issues/2442)
+This test might be a bit fragile if proj.db content changes
+The first result should use the 'WGS_1984_(ITRF08)_To_NAD_1983_2011' (ESRI:108363) operation
+and the second one a no-op
+-105 40 500000.86 4427756.50 0.00
+-105 40 500000.00 4427757.22 0.00