aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/sql/grid_alternatives.sql17
-rw-r--r--data/sql/grid_transformation_custom.sql15
-rwxr-xr-xtest/cli/testprojinfo4
-rw-r--r--test/cli/testprojinfo_out.dist44
4 files changed, 80 insertions, 0 deletions
diff --git a/data/sql/grid_alternatives.sql b/data/sql/grid_alternatives.sql
index 99f20d0e..6cee2aca 100644
--- a/data/sql/grid_alternatives.sql
+++ b/data/sql/grid_alternatives.sql
@@ -286,6 +286,23 @@ INSERT INTO grid_alternatives(original_grid_name,
'proj-datumgrid-europe',
NULL, NULL, NULL, NULL);
+-- Sweden height models
+
+INSERT INTO grid_alternatives(original_grid_name,
+ proj_grid_name,
+ proj_grid_format,
+ proj_method,
+ inverse_direction,
+ package_name,
+ url, direct_download, open_license, directory)
+ VALUES ('SWEN17_RH2000.gtx',
+ 'SWEN17_RH2000.gtx', -- no change. Just document the package
+ 'GTX',
+ 'vgridshift',
+ 0, -- do not reverse here as grid_transformation_custom does reference from VerticalCRS height to Geographic height
+ 'proj-datumgrid-europe',
+ NULL, NULL, NULL, NULL);
+
----------------------------
-- US GEOID12B height models
----------------------------
diff --git a/data/sql/grid_transformation_custom.sql b/data/sql/grid_transformation_custom.sql
index a43312fe..89234ef7 100644
--- a/data/sql/grid_transformation_custom.sql
+++ b/data/sql/grid_transformation_custom.sql
@@ -1,5 +1,7 @@
-- This file is hand generated.
+-- Denmark
+
INSERT INTO "grid_transformation" VALUES(
'PROJ','EPSG_5799_TO_EPSG_4937','DVR90 height to ETRS89',
NULL,NULL,
@@ -21,3 +23,16 @@ INSERT INTO "grid_transformation" VALUES(
NULL,
'EPSG','8666','Geoid (height correction) model file','dnn.gtx',
NULL,NULL,NULL,NULL,NULL,NULL,0);
+
+-- Sweden
+
+INSERT INTO "grid_transformation" VALUES(
+ 'PROJ','EPSG_5613_TO_EPSG_4377','RH2000 height to SWEREF99',
+ NULL,NULL,
+ 'PROJ','HEIGHT_TO_GEOGRAPHIC3D','GravityRelatedHeight to Geographic3D',
+ 'EPSG','5613', -- source CRS (RH2000 height)
+ 'EPSG','4377', -- target CRS (SWEREF99)
+ 'EPSG','3313', -- area of use: Sweden onshore
+ NULL,
+ 'EPSG','8666','Geoid (height correction) model file','SWEN17_RH2000.gtx',
+ NULL,NULL,NULL,NULL,NULL,NULL,0);
diff --git a/test/cli/testprojinfo b/test/cli/testprojinfo
index 24a1fdd5..e39e2193 100755
--- a/test/cli/testprojinfo
+++ b/test/cli/testprojinfo
@@ -102,6 +102,10 @@ echo "Testing CRS with towgs84: projinfo -o PROJ EPSG:25832" >> ${OUT}
$EXE -o PROJ EPSG:25832 >>${OUT} 2>&1
echo "" >>${OUT}
+echo "Testing RH2000 height to SWEREF99: projinfo -s EPSG:5613 -t EPSG:4377" >> ${OUT}
+$EXE -s EPSG:5613 -t EPSG:4377 >>${OUT} 2>&1
+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 674e9631..e7c424b8 100644
--- a/test/cli/testprojinfo_out.dist
+++ b/test/cli/testprojinfo_out.dist
@@ -694,3 +694,47 @@ Testing CRS with towgs84: projinfo -o PROJ EPSG:25832
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:4377
+Candidate operations found: 1
+-------------------------------------
+Operation n°1:
+
+PROJ:EPSG_5613_TO_EPSG_4377, RH2000 height to SWEREF99, unknown accuracy, Sweden - onshore
+
+PROJ string:
++proj=vgridshift +grids=SWEN17_RH2000.gtx +multiplier=1
+
+WKT2_2018 string:
+COORDINATEOPERATION["RH2000 height to SWEREF99",
+ SOURCECRS[
+ VERTCRS["RH2000 height",
+ VDATUM["Rikets hojdsystem 2000"],
+ CS[vertical,1],
+ AXIS["gravity-related height (H)",up,
+ LENGTHUNIT["metre",1]]]],
+ TARGETCRS[
+ GEOGCRS["SWEREF99 (3D)",
+ 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 minute second hemisphere",0.0174532925199433]],
+ AXIS["geodetic longitude (Long)",east,
+ ORDER[2],
+ ANGLEUNIT["degree minute second hemisphere",0.0174532925199433]],
+ AXIS["ellipsoidal height (h)",up,
+ ORDER[3],
+ LENGTHUNIT["metre",1]]]],
+ METHOD["GravityRelatedHeight to Geographic3D",
+ ID["PROJ","HEIGHT_TO_GEOGRAPHIC3D"]],
+ PARAMETERFILE["Geoid (height correction) model file","SWEN17_RH2000.gtx"],
+ USAGE[
+ SCOPE["unknown"],
+ AREA["Sweden - onshore"],
+ BBOX[55.28,10.93,69.07,24.17]],
+ ID["PROJ","EPSG_5613_TO_EPSG_4377"]]
+