Skip to content

Commit

Permalink
Database: add transformations_czechia.sql with CR2005 geoid for ETRS8…
Browse files Browse the repository at this point in the history
…9 to Baltic 1957 height
  • Loading branch information
rouault committed Feb 19, 2024
1 parent b01d966 commit 5291147
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
3 changes: 3 additions & 0 deletions data/sql/grid_alternatives.sql
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ VALUES
('chgeo2004_ETRS.agr','ch_swisstopo_chgeo2004_ETRS89_LHN95.tif',NULL,'GTiff','geoid_like',0,NULL,'https://cdn.proj.org/ch_swisstopo_chgeo2004_ETRS89_LHN95.tif',1,1,NULL),
('chgeo2004_htrans_ETRS.agr','ch_swisstopo_chgeo2004_ETRS89_LN02.tif',NULL,'GTiff','geoid_like',0,NULL,'https://cdn.proj.org/ch_swisstopo_chgeo2004_ETRS89_LN02.tif',1,1,NULL),

-- cz_cuzk - ČÚZK
('cz_cuzk_CR-2005.tif','cz_cuzk_CR-2005.tif',NULL,'GTiff','geoid_like',0,NULL,'https://cdn.proj.org/cz_cuzk_CR-2005.tif',1,1,NULL),

-- de_adv - Arbeitsgemeinschaft der Vermessungsverwaltungender der Länder der Bundesrepublik Deutschland (AdV)
('BETA2007.gsb','de_adv_BETA2007.tif','BETA2007.gsb','GTiff','hgridshift',0,NULL,'https://cdn.proj.org/de_adv_BETA2007.tif',1,1,NULL),

Expand Down
24 changes: 24 additions & 0 deletions data/sql/transformations_czechia.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
-- This file is hand generated.

-- Czechia transformations

-- Geoid transformation

INSERT INTO "grid_transformation" VALUES(
'PROJ','ETRS89_TO_BALTIC_HEIGHT_CZECHIA','ETRS89 to Baltic 1957 height (Czechia)',
NULL,
'EPSG','9665','Geographic3D to GravityRelatedHeight (gtx)',
'EPSG','4937', -- source CRS (ETRS 89)
'EPSG','8357', -- target CRS (Baltic 1957 height)
0.05, -- guessed...
'EPSG','8666','Geoid (height correction) model file','cz_cuzk_CR-2005.tif',
NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);

INSERT INTO "usage" VALUES(
'PROJ',
'ETRS89_TO_BALTIC_HEIGHT_CZECHIA_USAGE',
'grid_transformation',
'PROJ',
'ETRS89_TO_BALTIC_HEIGHT_CZECHIA',
'EPSG','1079','EPSG','1189'
);
1 change: 1 addition & 0 deletions data/sql_filelist.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ set(SQL_FILES
"${SQL_DIR}/nkg.sql"
"${SQL_DIR}/iau.sql"
"${SQL_DIR}/nrcan.sql"
"${SQL_DIR}/transformations_czechia.sql"
"${SQL_DIR}/grid_alternatives.sql"
"${SQL_DIR}/grid_alternatives_generated_noaa.sql"
"${SQL_DIR}/nadcon5_concatenated_operations.sql"
Expand Down
12 changes: 11 additions & 1 deletion test/unit/test_operationfactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -813,13 +813,23 @@ TEST(operation, vertCRS_to_geogCRS_context) {
authFactory->createCoordinateReferenceSystem("8357"),
// ETRS89
authFactory->createCoordinateReferenceSystem("4937"), ctxt);
ASSERT_EQ(list.size(), 2U);
ASSERT_EQ(list.size(), 3U);
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=vgridshift "
"+grids=cz_cuzk_CR-2005.tif "
"+multiplier=1 "
"+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=vgridshift "
"+grids=sk_gku_Slovakia_ETRS89h_to_Baltic1957.tif "
"+multiplier=1 "
"+step +proj=unitconvert +xy_in=rad +xy_out=deg "
Expand Down

0 comments on commit 5291147

Please sign in to comment.