From 10d8e9af8d3b4b5219d37552fc253ba716436f4a Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 29 May 2020 16:48:36 +0200 Subject: Database: register NZGD2000 -> ITRF96 transformation for NZGD2000 database Related to https://github.com/OSGeo/PROJ-data/pull/22 An entry is added in the ``other_transformation`` table, using a raw PROJ string. Later, once the deformation model has been registered in EPSG, we'll have to add code to map the EPSG transformation method and parameters to +proj=defmodel In the meantime, this works pretty well: ``` $ src/projinfo -s EPSG:4959 -t EPSG:7907 Candidate operations found: 1 ------------------------------------- Operation No. 1: PROJ:NZGD2000-20180701, NZGD2000 to ITRF96 deformation model, unknown accuracy, New Zealand PROJ string: +proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=axisswap +order=2,1 +step +proj=defmodel +model=nz_linz_nzgd2000-20180701.json +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=rad +xy_out=deg WKT2:2019 string: COORDINATEOPERATION["NZGD2000 to ITRF96 deformation model", VERSION["20180701"], SOURCECRS[ GEOGCRS["NZGD2000", DATUM["New Zealand Geodetic Datum 2000", 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",4959]]], TARGETCRS[ GEOGCRS["ITRF96", DATUM["International Terrestrial Reference Frame 1996", 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",7907]]], METHOD["PROJ-based operation method: +proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=axisswap +order=2,1 +step +proj=defmodel +model=nz_linz_nzgd2000-20180701.json +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=rad +xy_out=deg"], USAGE[ SCOPE["unknown"], AREA["New Zealand"], BBOX[-55.95,160.6,-25.88,-171.2]], ID["PROJ","NZGD2000-20180701"], REMARK["New Zealand Deformation Model. Defines the secular model (National Deformation Model) and patches for significant deformation events since 2000"]] ``` ``` $ echo "-41 173 0 2016.5" | PROJ_NETWORK=ON src/cct -d 8 +proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=axisswap +order=2,1 +step +proj=defmodel +model=nz_linz_nzgd2000-20180701.json +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=rad +xy_out=deg -40.99999402 172.99999938 0.00130333 2016.5000 ``` ``` $ echo "-41 173 0 2016.5" | PROJ_NETWORK=ON src/cs2cs -f "%.8f" EPSG:4959 EPSG:7907 -40.99999402 172.99999938 0.00130333 2016.5 ``` --- data/sql/customizations.sql | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'data/sql') diff --git a/data/sql/customizations.sql b/data/sql/customizations.sql index efb0a4bc..1556bf62 100644 --- a/data/sql/customizations.sql +++ b/data/sql/customizations.sql @@ -25,6 +25,31 @@ INSERT INTO "geodetic_crs" VALUES('OGC','CRS84','WGS 84 (CRS84)',NULL,NULL,'geog INSERT INTO "other_transformation" VALUES('PROJ','CRS84_TO_EPSG_4326','OGC:CRS84 to WGS 84',NULL,NULL,'EPSG','9843','Axis Order Reversal (2D)','OGC','CRS84','EPSG','4326','EPSG','1262',0.0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0); +-- Temporary entry for NZGD2000 deformation model +INSERT INTO other_transformation VALUES( + 'PROJ','NZGD2000-20180701','NZGD2000 to ITRF96', + 'New Zealand Deformation Model. Defines the secular model (National Deformation Model) and patches for significant deformation events since 2000', NULL, + 'PROJ', 'PROJString', + '+proj=pipeline ' || + '+step +proj=unitconvert +xy_in=deg +xy_out=rad ' || + '+step +proj=axisswap +order=2,1 ' || + '+step +proj=defmodel +model=nz_linz_nzgd2000-20180701.json ' || + '+step +proj=axisswap +order=2,1 ' || + '+step +proj=unitconvert +xy_in=rad +xy_out=deg', + 'EPSG','4959', + 'EPSG','7907', + 'EPSG','1175', + NULL, --accuracy + NULL,NULL,NULL,NULL,NULL,NULL, -- param1 + NULL,NULL,NULL,NULL,NULL,NULL, -- param2 + NULL,NULL,NULL,NULL,NULL,NULL, -- param3 + NULL,NULL,NULL,NULL,NULL,NULL, -- param4 + NULL,NULL,NULL,NULL,NULL,NULL, -- param5 + NULL,NULL,NULL,NULL,NULL,NULL, -- param6 + NULL,NULL,NULL,NULL,NULL,NULL, -- param7 + '20180701', -- operation version + 0); + -- alias of EPSG:3857 INSERT INTO "projected_crs" VALUES('EPSG','900913','Google Maps Global Mercator',NULL,NULL,'EPSG','4499','EPSG','4326','EPSG','3856','EPSG','3544',NULL,1); -- cgit v1.2.3 From ad9efb19d37be616d69676e732abe44e78a8305b Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 29 May 2020 22:53:58 +0200 Subject: Database: add concatenated operations for NZGD2000 -> ITRF97/2000/2005/2008/2014 --- data/sql/customizations.sql | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'data/sql') diff --git a/data/sql/customizations.sql b/data/sql/customizations.sql index 1556bf62..86baf691 100644 --- a/data/sql/customizations.sql +++ b/data/sql/customizations.sql @@ -50,6 +50,26 @@ INSERT INTO other_transformation VALUES( '20180701', -- operation version 0); +INSERT INTO "concatenated_operation" VALUES('PROJ','NZGD2000_TO_ITRF97','NZGD2000 to ITRF97','Concatenation of PROJ:NZGD2000-20180701 and 9079','','EPSG','4959','EPSG','7908','EPSG','1175',NULL,NULL,0); +INSERT INTO "concatenated_operation_step" VALUES('PROJ','NZGD2000_TO_ITRF97',1,'PROJ','NZGD2000-20180701'); +INSERT INTO "concatenated_operation_step" VALUES('PROJ','NZGD2000_TO_ITRF97',2,'EPSG','9079'); + +INSERT INTO "concatenated_operation" VALUES('PROJ','NZGD2000_TO_ITRF2000','NZGD2000 to ITRF2000','Concatenation of PROJ:NZGD2000-20180701 and 9080','','EPSG','4959','EPSG','7909','EPSG','1175',NULL,NULL,0); +INSERT INTO "concatenated_operation_step" VALUES('PROJ','NZGD2000_TO_ITRF2000',1,'PROJ','NZGD2000-20180701'); +INSERT INTO "concatenated_operation_step" VALUES('PROJ','NZGD2000_TO_ITRF2000',2,'EPSG','9080'); + +INSERT INTO "concatenated_operation" VALUES('PROJ','NZGD2000_TO_ITRF2005','NZGD2000 to ITRF2005','Concatenation of PROJ:NZGD2000-20180701 and 9081','','EPSG','4959','EPSG','7910','EPSG','1175',NULL,NULL,0); +INSERT INTO "concatenated_operation_step" VALUES('PROJ','NZGD2000_TO_ITRF2005',1,'PROJ','NZGD2000-20180701'); +INSERT INTO "concatenated_operation_step" VALUES('PROJ','NZGD2000_TO_ITRF2005',2,'EPSG','9081'); + +INSERT INTO "concatenated_operation" VALUES('PROJ','NZGD2000_TO_ITRF2008','NZGD2000 to ITRF2008','Concatenation of PROJ:NZGD2000-20180701 and EPSG:9082','','EPSG','4959','EPSG','7911','EPSG','1175',NULL,NULL,0); +INSERT INTO "concatenated_operation_step" VALUES('PROJ','NZGD2000_TO_ITRF2008',1,'PROJ','NZGD2000-20180701'); +INSERT INTO "concatenated_operation_step" VALUES('PROJ','NZGD2000_TO_ITRF2008',2,'EPSG','9082'); + +INSERT INTO "concatenated_operation" VALUES('PROJ','NZGD2000_TO_ITRF2014','NZGD2000 to ITRF2014','Concatenation of PROJ:NZGD2000-20180701 and EPSG:9083','','EPSG','4959','EPSG','7912','EPSG','1175',NULL,NULL,0); +INSERT INTO "concatenated_operation_step" VALUES('PROJ','NZGD2000_TO_ITRF2014',1,'PROJ','NZGD2000-20180701'); +INSERT INTO "concatenated_operation_step" VALUES('PROJ','NZGD2000_TO_ITRF2014',2,'EPSG','9083'); + -- alias of EPSG:3857 INSERT INTO "projected_crs" VALUES('EPSG','900913','Google Maps Global Mercator',NULL,NULL,'EPSG','4499','EPSG','4326','EPSG','3856','EPSG','3544',NULL,1); -- cgit v1.2.3