aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJavier Jimenez Shaw <j1@jimenezshaw.com>2021-04-11 21:44:52 +0200
committerGitHub <noreply@github.com>2021-04-11 21:44:52 +0200
commit78792a7e42928565b06398f146a43d121160b8a2 (patch)
tree21cbfd26b8010feb67dc86e879282455ec5d9daa /test
parent6fffba7efa94fe989ec023294850aeca6b2cd5c6 (diff)
downloadPROJ-78792a7e42928565b06398f146a43d121160b8a2.tar.gz
PROJ-78792a7e42928565b06398f146a43d121160b8a2.zip
projinfo: add option --list-crs (#2663)
Diffstat (limited to 'test')
-rwxr-xr-xtest/cli/testprojinfo52
-rw-r--r--test/cli/testprojinfo_out.dist54
2 files changed, 106 insertions, 0 deletions
diff --git a/test/cli/testprojinfo b/test/cli/testprojinfo
index fb4fef1f..0ee256a2 100755
--- a/test/cli/testprojinfo
+++ b/test/cli/testprojinfo
@@ -310,6 +310,58 @@ echo 'Checks that ED50 to ETRS89 (12) is in the output (superseded transformatio
$EXE -s EPSG:23030 -t EPSG:25830 --bbox -6,40,-5,41 --grid-check known_available --hide-ballpark --summary >>${OUT} 2>&1
echo "" >>${OUT}
+echo 'Testing --list-crs | grep "EPSG:32632\|ESRI:103668\|OGC" | sort' >> ${OUT}
+$EXE --list-crs | grep "EPSG:32632\|ESRI:103668\|OGC" | sort >> ${OUT}
+echo "" >>${OUT}
+
+echo 'Testing --list-crs --authority OGC,EPSG | grep "EPSG:4326\|OGC" | sort' >> ${OUT}
+$EXE --list-crs --authority OGC,EPSG | grep "EPSG:4326\|OGC" | sort >> ${OUT}
+echo "" >>${OUT}
+
+echo 'Testing --list-crs | grep deprecated | sort' >> ${OUT}
+$EXE --list-crs | grep deprecated | sort >> ${OUT}
+echo "" >>${OUT}
+
+echo 'Testing --list-crs vertical --bbox 0,40,1,41 --spatial-test intersects | grep "Alicante\|NAVD88" | sort' >> ${OUT}
+$EXE --list-crs vertical --bbox 0,40,1,41 --spatial-test intersects | grep "Alicante\|NAVD88" | sort >> ${OUT}
+echo "" >>${OUT}
+
+echo 'Testing --list-crs vertical --bbox -10,35,5,45 --spatial-test contains | grep "Alicante\|NAVD88" | sort' >> ${OUT}
+$EXE --list-crs vertical --bbox -10,35,5,45 --spatial-test contains | grep "Alicante\|NAVD88" | sort >> ${OUT}
+echo "" >>${OUT}
+
+echo 'Testing --list-crs --area Spain --spatial-test intersects | grep "EPSG:9505\|EPSG:9398\|EPSG:4258\|EPSG:5703" | sort' >> ${OUT}
+$EXE --list-crs --area Spain --spatial-test intersects | grep "EPSG:9505\|EPSG:9398\|EPSG:4258\|EPSG:5703" | sort >> ${OUT}
+echo "" >>${OUT}
+
+echo 'Testing --list-crs --area Spain --spatial-test contains | grep "EPSG:9505\|EPSG:9398\|EPSG:4258\|EPSG:5703" | sort' >> ${OUT}
+$EXE --list-crs --area Spain --spatial-test contains | grep "EPSG:9505\|EPSG:9398\|EPSG:4258\|EPSG:5703" | sort >> ${OUT}
+echo "" >>${OUT}
+
+echo 'Testing --list-crs --area Spain | grep "EPSG:9505\|EPSG:9398\|EPSG:4258\|EPSG:5703" | sort' >> ${OUT}
+$EXE --list-crs --area Spain | grep "EPSG:9505\|EPSG:9398\|EPSG:4258\|EPSG:5703" | sort >> ${OUT}
+echo "" >>${OUT}
+
+echo 'Testing --list-crs geodetic | grep "EPSG:4326\|EPSG:4979\|EPSG:4978" | sort' >> ${OUT}
+$EXE --list-crs geodetic | grep "EPSG:4326\|EPSG:4979\|EPSG:4978" | sort >> ${OUT}
+echo "" >>${OUT}
+
+echo 'Testing --list-crs geographic | grep "EPSG:4326\|EPSG:4979\|EPSG:4978" | sort' >> ${OUT}
+$EXE --list-crs geographic | grep "EPSG:4326\|EPSG:4979\|EPSG:4978" | sort >> ${OUT}
+echo "" >>${OUT}
+
+echo 'Testing --list-crs geocentric,geographic_3d | grep "EPSG:4326\|EPSG:4979\|EPSG:4978" | sort' >> ${OUT}
+$EXE --list-crs geocentric,geographic_3d | grep "EPSG:4326\|EPSG:4979\|EPSG:4978" | sort >> ${OUT}
+echo "" >>${OUT}
+
+echo 'Testing --list-crs geographic_2d,allow_deprecated --bbox -100,40,-90,41 --spatial-test intersects | grep deprecated | grep "NAD83(FBN)\|GCS_IGS08" | sort' >> ${OUT}
+$EXE --list-crs geographic_2d,allow_deprecated --bbox -100,40,-90,41 --spatial-test intersects | grep deprecated | grep "NAD83(FBN)\|GCS_IGS08" | sort >> ${OUT}
+echo "" >>${OUT}
+
+echo 'Testing --list-crs projected --bbox -100,40,-90,41 --spatial-test intersects | grep "(2011).*Missouri East\|York" | sort' >> ${OUT}
+$EXE --list-crs projected --bbox -100,40,-90,41 --spatial-test intersects | grep "(2011).*Missouri East\|York" | sort >> ${OUT}
+echo "" >>${OUT}
+
# do 'diff' with distribution results
echo "diff ${OUT} with testprojinfo_out.dist"
diff -u ${OUT} ${TEST_CLI_DIR}/testprojinfo_out.dist
diff --git a/test/cli/testprojinfo_out.dist b/test/cli/testprojinfo_out.dist
index ccb9e070..3f549fd9 100644
--- a/test/cli/testprojinfo_out.dist
+++ b/test/cli/testprojinfo_out.dist
@@ -1600,3 +1600,57 @@ Candidate operations found: 2
unknown id, Inverse of UTM zone 30N + ED50 to ETRS89 (12) + UTM zone 30N, 0.2 m, Spain - mainland, Balearic Islands, Ceuta and Melila - onshore.
unknown id, Inverse of UTM zone 30N + ED50 to ETRS89 (7) + UTM zone 30N, 1.5 m, Spain - onshore mainland except northwest (north of 41°30'N and west of 4°30'W).
+Testing --list-crs | grep "EPSG:32632\|ESRI:103668\|OGC" | sort
+EPSG:32632 "WGS 84 / UTM zone 32N"
+ESRI:103668 "NAD_1983_HARN_Adj_MN_Ramsey_Meters"
+OGC:CRS27 "NAD27 (CRS27)"
+OGC:CRS83 "NAD83 (CRS83)"
+OGC:CRS84 "WGS 84 (CRS84)"
+
+Testing --list-crs --authority OGC,EPSG | grep "EPSG:4326\|OGC" | sort
+EPSG:4326 "WGS 84"
+OGC:CRS27 "NAD27 (CRS27)"
+OGC:CRS83 "NAD83 (CRS83)"
+OGC:CRS84 "WGS 84 (CRS84)"
+
+Testing --list-crs | grep deprecated | sort
+
+Testing --list-crs vertical --bbox 0,40,1,41 --spatial-test intersects | grep "Alicante\|NAVD88" | sort
+EPSG:5782 "Alicante height"
+
+Testing --list-crs vertical --bbox -10,35,5,45 --spatial-test contains | grep "Alicante\|NAVD88" | sort
+EPSG:5782 "Alicante height"
+
+Testing --list-crs --area Spain --spatial-test intersects | grep "EPSG:9505\|EPSG:9398\|EPSG:4258\|EPSG:5703" | sort
+EPSG:4258 "ETRS89"
+EPSG:9398 "Tenerife height"
+EPSG:9505 "ETRS89 + Alicante height"
+
+Testing --list-crs --area Spain --spatial-test contains | grep "EPSG:9505\|EPSG:9398\|EPSG:4258\|EPSG:5703" | sort
+EPSG:9398 "Tenerife height"
+EPSG:9505 "ETRS89 + Alicante height"
+
+Testing --list-crs --area Spain | grep "EPSG:9505\|EPSG:9398\|EPSG:4258\|EPSG:5703" | sort
+EPSG:9398 "Tenerife height"
+EPSG:9505 "ETRS89 + Alicante height"
+
+Testing --list-crs geodetic | grep "EPSG:4326\|EPSG:4979\|EPSG:4978" | sort
+EPSG:4326 "WGS 84"
+EPSG:4978 "WGS 84"
+EPSG:4979 "WGS 84"
+
+Testing --list-crs geographic | grep "EPSG:4326\|EPSG:4979\|EPSG:4978" | sort
+EPSG:4326 "WGS 84"
+EPSG:4979 "WGS 84"
+
+Testing --list-crs geocentric,geographic_3d | grep "EPSG:4326\|EPSG:4979\|EPSG:4978" | sort
+EPSG:4978 "WGS 84"
+EPSG:4979 "WGS 84"
+
+Testing --list-crs geographic_2d,allow_deprecated --bbox -100,40,-90,41 --spatial-test intersects | grep deprecated | grep "NAD83(FBN)\|GCS_IGS08" | sort
+EPSG:8449 "NAD83(FBN)" [deprecated]
+ESRI:104010 "GCS_IGS08" [deprecated]
+
+Testing --list-crs projected --bbox -100,40,-90,41 --spatial-test intersects | grep "(2011).*Missouri East\|York" | sort
+EPSG:6512 "NAD83(2011) / Missouri East"
+