Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for transformations involving coordinate epoch changes (PointMotionOperation), mostly for Canadian NAD83(CSRS) case #3884

Merged
merged 29 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3606ddb
PointMotionOperation: implement constructor, import/export WKT and PR…
rouault Aug 11, 2023
2ef8221
Add AuthorityFactory::createGeodeticCRSFromDatum() utility class, ada…
rouault Aug 17, 2023
e27c8a2
Add AuthorityFactory::getPointMotionOperationsFor() and allow a Coord…
rouault Aug 18, 2023
d683fcf
proj_crs_promote_to_3D(): make it work on CoordinateMetadata as well
rouault Aug 21, 2023
627d942
createFromUserInput(): allow 'EPSG:XXXX @ YYYY'
rouault Aug 18, 2023
419cf4d
Use single implementation of getRoundedEpochInDecimalYear()
rouault Sep 6, 2023
a53a5a1
createOperations(): use point motion operations for change of epoch b…
rouault Aug 18, 2023
26936c1
proj_create_operations(): allow CoordinateMetadata <--> CoordinateMet…
rouault Aug 18, 2023
a971656
projinfo: allow CoordinateMetadata <--> CoordinateMetadata transforma…
rouault Aug 18, 2023
284d15e
Database: add 'CGVD28 height to CGVD2013a(2010) height' with NAD83(CS…
rouault Aug 18, 2023
4ac2cfb
projinfo: add --s_epoch and --t_epoch
rouault Aug 18, 2023
9983c6e
cs2cs: add --s_epoch and --t_epoch
rouault Aug 18, 2023
4e76830
Database: add a 'coordinate_metadata' table and a AuthorityFactory::c…
rouault Aug 21, 2023
ded4ecc
WKT/PROJJSON importer: allow to build CoordinateMetadata with CRS lik…
rouault Aug 21, 2023
f471611
createFromUserInput(): make it recognize urn:ogc:def:coordinateMetada…
rouault Aug 21, 2023
cd0805e
createOperations(): take into account GEOIDMODEL[] referenced by ID
rouault Aug 21, 2023
9ef8318
Database: add a NRCAN authority with CoordinateMetadata records
rouault Aug 21, 2023
9bfb7cb
createOperations(): compoundToCompound: tune behaviour with point mot…
rouault Aug 21, 2023
6018751
CoordinateOperationFactory: make sure to preserve interpolation CRS w…
rouault Aug 29, 2023
502c99d
Implement 'Geographic3D Offset by velocity grid (NRCan byn)' transfor…
rouault Aug 29, 2023
d1b58d9
CoordinateOperationFactory::Private::createOperationsWithDatumPivot()…
rouault Aug 29, 2023
0ba3c09
createOperations(): compoundToCompound: tune behaviour when one of th…
rouault Aug 29, 2023
b50b522
createOperations(): pass coordinate epochs internally in a cleaner way
rouault Sep 5, 2023
0b48c6d
createOperations(): fix NAD83_CSRS_1997_MTMxx_HT2_1997 to NAD83_CSRS_…
rouault Sep 5, 2023
1b1f3c7
createOperations(): tune for 'NAD83_CSRS_1997_xxxx_HT2_1997 to NAD83_…
rouault Sep 5, 2023
e69c319
C API: add proj_crs_has_point_motion_operation()
rouault Sep 5, 2023
0c39032
createOperations(): fix 'ITRF2014 to NAD83(CSRS)v7' type of operation…
rouault Sep 6, 2023
b5d33ab
Vertical Offset by Grid Interpolation (NRCan byn) operations: reverse…
rouault Sep 13, 2023
bee4a90
Implement 'Vertical Offset by velocity grid (NRCan byn)' method
rouault Sep 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion data/sql/commit.sql
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ FOR EACH ROW BEGIN
AND g1.source_crs_code = g2.source_crs_code
AND g1.target_crs_auth_name = g2.target_crs_auth_name
AND g1.target_crs_code = g2.target_crs_code
WHERE g1.auth_name = 'PROJ' AND g1.code NOT LIKE '%_RESTRICTED_TO_VERTCRS%' AND g2.auth_name = 'EPSG' AND g2.deprecated = 0)
WHERE g1.auth_name = 'PROJ' AND g1.code NOT LIKE '%_RESTRICTED_TO_VERTCRS%' AND g2.auth_name = 'EPSG' AND g2.deprecated = 0 AND (
(g1.interpolation_crs_auth_name IS NULL AND g2.interpolation_crs_auth_name IS NULL) OR
(g1.interpolation_crs_auth_name IS NOT NULL AND g2.interpolation_crs_auth_name IS NOT NULL AND
g1.interpolation_crs_auth_name = g2.interpolation_crs_auth_name AND
g1.interpolation_crs_code = g2.interpolation_crs_code)))
OR EXISTS (SELECT 1 FROM grid_transformation g1
JOIN grid_transformation g2
ON g1.source_crs_auth_name = g2.target_crs_auth_name
Expand Down
13 changes: 13 additions & 0 deletions data/sql/customizations.sql
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,19 @@ INSERT INTO usage SELECT
scope_code
FROM usage WHERE object_table_name = 'grid_transformation' AND object_auth_name = 'EPSG' AND object_code = '9123';

-- Duplicate EPSG:10115, 10116, 10117 with NAD83(CSRS)v7 as interpolation CRS
INSERT INTO "grid_transformation" VALUES
('PROJ','EPSG_10115_WITH_NAD83CSRSV7_INTERPOLATION','CGVD28 height to CGVD2013a(2010) height (1)','Equivalent to HT2_2010v70 hybrid geoid model minus CGG2013a geoid model (i.e. CT code 9986 minus CT 9247 = CT 9987 minus CT 10109). Specifies NAD83(CSRS)v7 (code 8255) as interpolation CRS.','EPSG','1112','Vertical Offset by Grid Interpolation (NRCan byn)','EPSG','5713','EPSG','9245',0.05,'EPSG','8732','Vertical offset file','HT2_2010v70_CGG2013a.byn',NULL,NULL,NULL,NULL,'EPSG','8255','NR-Can HT2 2010',0);

INSERT INTO "usage" VALUES('PROJ','USAGE_EPSG_10115_WITH_NAD83CSRSV7_INTERPOLATION','grid_transformation','PROJ','EPSG_10115_WITH_NAD83CSRSV7_INTERPOLATION','EPSG','1061','EPSG','1133');

INSERT INTO "grid_transformation" VALUES('PROJ','EPSG_10116_WITH_NAD83CSRSV7_INTERPOLATION','CGVD2013a(2010) height to CGVD2013a(2002) height (1)',' Specifies NAD83(CSRS)v7 (code 8255) as interpolation CRS. Equivalent to CGVD28 to CGVD2013a(2002) minus CGVD28 to CGVD2013a(2010) (i.e. CT code 10114 minus CT 10115).','EPSG','1113','Vertical Offset by velocity grid (NRCan byn)','EPSG','9245','EPSG','20034',0.05,'EPSG','1050','Point motion velocity grid file','NAD83v70VG.gvb',NULL,NULL,NULL,NULL,'EPSG','8255','EPSG-Can',0);
INSERT INTO "usage" VALUES('PROJ','USAGE_EPSG_10116_WITH_NAD83CSRSV7_INTERPOLATION','grid_transformation','PROJ','EPSG_10116_WITH_NAD83CSRSV7_INTERPOLATION','EPSG','1061','EPSG','1026');

INSERT INTO "grid_transformation" VALUES('PROJ','EPSG_10117_WITH_NAD83CSRSV7_INTERPOLATION','CGVD2013a(2010) height to CGVD2013a(1997) height (1)','Specifies NAD83(CSRS)v7 (code 8255) as interpolation CRS. Equivalent to CGVD28 to CGVD2013a(1997) minus CGVD28 to CGVD2013a(2010) (i.e. CT code 10113 minus CT 10115).','EPSG','1113','Vertical Offset by velocity grid (NRCan byn)','EPSG','9245','EPSG','20035',0.05,'EPSG','1050','Point motion velocity grid file','NAD83v70VG.gvb',NULL,NULL,NULL,NULL,'EPSG','8255','EPSG-Can',0);
INSERT INTO "usage" VALUES('PROJ','USAGE_EPSG_10117_WITH_NAD83CSRSV7_INTERPOLATION','grid_transformation','PROJ','EPSG_10117_WITH_NAD83CSRSV7_INTERPOLATION','EPSG','1061','EPSG','1026');


-- Define the allowed authorities, and their precedence, when researching a
-- coordinate operation

Expand Down
28 changes: 28 additions & 0 deletions data/sql/grid_transformation.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1440,6 +1440,28 @@ INSERT INTO "grid_transformation" VALUES('EPSG','10114','CGVD28 height to CGVD20
INSERT INTO "usage" VALUES('EPSG','18322','grid_transformation','EPSG','10114','EPSG','1061','EPSG','1133');
INSERT INTO "grid_transformation" VALUES('EPSG','10115','CGVD28 height to CGVD2013a(2010) height (1)','Equivalent to HT2_2010v70 hybrid geoid model minus CGG2013a geoid model (i.e. CT code 9986 minus CT 9247 = CT 9987 minus CT 10109). Specifies NAD83(CSRS)v6 as interpolation CRS, but NAD83(CSRS)v7 (code 8255) may equally be used.','EPSG','1112','Vertical Offset by Grid Interpolation (NRCan byn)','EPSG','5713','EPSG','9245',0.05,'EPSG','8732','Vertical offset file','HT2_2010v70_CGG2013a.byn',NULL,NULL,NULL,NULL,'EPSG','8252','NR-Can HT2 2010',0);
INSERT INTO "usage" VALUES('EPSG','18323','grid_transformation','EPSG','10115','EPSG','1061','EPSG','1133');
INSERT INTO "grid_transformation" VALUES('EPSG','10116','CGVD2013a(2010) height to CGVD2013a(2002) height (1)','Interpolation CRS = NAD83(CSRS) 2010, i.e. may be any one of NAD83(CSRS)v6, v7 or v8 (CRS codes 8252, 8255 or 10414). Equivalent to CGVD28 to CGVD2013a(2002) minus CGVD28 to CGVD2013a(2010) (i.e. CT code 10114 minus CT 10115).','EPSG','1113','Vertical Offset by velocity grid (NRCan byn)','EPSG','9245','EPSG','20034',0.05,'EPSG','1050','Point motion velocity grid file','NAD83v70VG.gvb',NULL,NULL,NULL,NULL,'EPSG','8252','EPSG-Can',0);
INSERT INTO "usage" VALUES('EPSG','18325','grid_transformation','EPSG','10116','EPSG','1061','EPSG','1026');
INSERT INTO "grid_transformation" VALUES('EPSG','10117','CGVD2013a(2010) height to CGVD2013a(1997) height (1)','Interpolation CRS = NAD83(CSRS) 2010, i.e. may be any one of NAD83(CSRS)v6, v7 or v8 (CRS codes 8252, 8255 or 10414). Equivalent to CGVD28 to CGVD2013a(1997) minus CGVD28 to CGVD2013a(2010) (i.e. CT code 10113 minus CT 10115).','EPSG','1113','Vertical Offset by velocity grid (NRCan byn)','EPSG','9245','EPSG','20035',0.05,'EPSG','1050','Point motion velocity grid file','NAD83v70VG.gvb',NULL,NULL,NULL,NULL,'EPSG','8252','EPSG-Can',0);
INSERT INTO "usage" VALUES('EPSG','18352','grid_transformation','EPSG','10117','EPSG','1061','EPSG','1026');
INSERT INTO "grid_transformation" VALUES('EPSG','10118','CGVD2013a(2002) height to CGVD2013a(1997) height (1)','Equivalent to CGVD28 to CGVD2013a(1997) minus CGVD28 to CGVD2013a(2002) (i.e. CT code 10113 minus CT 10114).','EPSG','1113','Vertical Offset by velocity grid (NRCan byn)','EPSG','20034','EPSG','20035',0.05,'EPSG','1050','Point motion velocity grid file','NAD83v70VG.gvb',NULL,NULL,NULL,NULL,'EPSG','8246','EPSG-Can',0);
INSERT INTO "usage" VALUES('EPSG','18328','grid_transformation','EPSG','10118','EPSG','1061','EPSG','1026');
INSERT INTO "grid_transformation" VALUES('EPSG','10119','NAD83(CSRS)v4 to NAD83(CSRS)v2 (1)','','EPSG','1114','Geographic3D Offset by velocity grid (NRCan byn)','EPSG','8244','EPSG','8235',0.05,'EPSG','1050','Point motion velocity grid file','NAD83v70VG.gvb',NULL,NULL,NULL,NULL,'EPSG','8246','EPSG-Can cvg70',0);
INSERT INTO "usage" VALUES('EPSG','18201','grid_transformation','EPSG','10119','EPSG','1061','EPSG','1026');
INSERT INTO "grid_transformation" VALUES('EPSG','10120','NAD83(CSRS)v4 to NAD83(CSRS)v3 (1)','','EPSG','1114','Geographic3D Offset by velocity grid (NRCan byn)','EPSG','8244','EPSG','8239',0.05,'EPSG','1050','Point motion velocity grid file','NAD83v70VG.gvb',NULL,NULL,NULL,NULL,'EPSG','8246','EPSG-Can cvg70',0);
INSERT INTO "usage" VALUES('EPSG','18210','grid_transformation','EPSG','10120','EPSG','1061','EPSG','1274');
INSERT INTO "grid_transformation" VALUES('EPSG','10121','NAD83(CSRS)v6 to NAD83(CSRS)v2 (1)','','EPSG','1114','Geographic3D Offset by velocity grid (NRCan byn)','EPSG','8251','EPSG','8235',0.05,'EPSG','1050','Point motion velocity grid file','NAD83v70VG.gvb',NULL,NULL,NULL,NULL,'EPSG','8252','EPSG-Can cvg70',0);
INSERT INTO "usage" VALUES('EPSG','18203','grid_transformation','EPSG','10121','EPSG','1061','EPSG','1026');
INSERT INTO "grid_transformation" VALUES('EPSG','10122','NAD83(CSRS)v6 to NAD83(CSRS)v3 (1)','','EPSG','1114','Geographic3D Offset by velocity grid (NRCan byn)','EPSG','8251','EPSG','8239',0.05,'EPSG','1050','Point motion velocity grid file','NAD83v70VG.gvb',NULL,NULL,NULL,NULL,'EPSG','8252','EPSG-Can cvg70',0);
INSERT INTO "usage" VALUES('EPSG','18351','grid_transformation','EPSG','10122','EPSG','1061','EPSG','1026');
INSERT INTO "grid_transformation" VALUES('EPSG','10123','NAD83(CSRS)v6 to NAD83(CSRS)v4 (1)','','EPSG','1114','Geographic3D Offset by velocity grid (NRCan byn)','EPSG','8251','EPSG','8244',0.05,'EPSG','1050','Point motion velocity grid file','NAD83v70VG.gvb',NULL,NULL,NULL,NULL,'EPSG','8252','EPSG-Can cvg70',0);
INSERT INTO "usage" VALUES('EPSG','18259','grid_transformation','EPSG','10123','EPSG','1061','EPSG','1026');
INSERT INTO "grid_transformation" VALUES('EPSG','10124','NAD83(CSRS)v7 to NAD83(CSRS)v2 (1)','','EPSG','1114','Geographic3D Offset by velocity grid (NRCan byn)','EPSG','8254','EPSG','8235',0.05,'EPSG','1050','Point motion velocity grid file','NAD83v70VG.gvb',NULL,NULL,NULL,NULL,'EPSG','8255','EPSG-Can cvg70',0);
INSERT INTO "usage" VALUES('EPSG','18206','grid_transformation','EPSG','10124','EPSG','1061','EPSG','1026');
INSERT INTO "grid_transformation" VALUES('EPSG','10125','NAD83(CSRS)v7 to NAD83(CSRS)v3 (1)','','EPSG','1114','Geographic3D Offset by velocity grid (NRCan byn)','EPSG','8254','EPSG','8239',0.05,'EPSG','1050','Point motion velocity grid file','NAD83v70VG.gvb',NULL,NULL,NULL,NULL,'EPSG','8255','EPSG-Can cvg70',0);
INSERT INTO "usage" VALUES('EPSG','18207','grid_transformation','EPSG','10125','EPSG','1061','EPSG','1026');
INSERT INTO "grid_transformation" VALUES('EPSG','10126','NAD83(CSRS)v7 to NAD83(CSRS)v4 (1)','','EPSG','1114','Geographic3D Offset by velocity grid (NRCan byn)','EPSG','8254','EPSG','8244',0.05,'EPSG','1050','Point motion velocity grid file','NAD83v70VG.gvb',NULL,NULL,NULL,NULL,'EPSG','8255','EPSG-Can cvg70',0);
INSERT INTO "usage" VALUES('EPSG','18350','grid_transformation','EPSG','10126','EPSG','1061','EPSG','1026');
INSERT INTO "grid_transformation" VALUES('EPSG','10128','NAD83(CSRS)v4 to NAD83(CSRS)v4 + CGVD2013a(2002) height (1)','Reversible alternative to NAD83(CSRS)v4 to CGVD2013a(2002) height (1) (code 10110).','EPSG','1090','Geog3D to Geog2D+GravityRelatedHeight (NRCan byn)','EPSG','8244','EPSG','20037',0.05,'EPSG','8666','Geoid (height correction) model file','CGG2013an83.byn',NULL,NULL,NULL,NULL,'EPSG','8246','NR-Can CGG2013a 2002',0);
INSERT INTO "usage" VALUES('EPSG','18287','grid_transformation','EPSG','10128','EPSG','1061','EPSG','1270');
INSERT INTO "grid_transformation" VALUES('EPSG','10129','NAD83(CSRS)v3 to NAD83(CSRS)v3 + CGVD2013a(1997) height (1)','Reversible alternative to NAD83(CSRS)v3 to CGVD2013a(1997) height (1) (code 10111).','EPSG','1090','Geog3D to Geog2D+GravityRelatedHeight (NRCan byn)','EPSG','8239','EPSG','20038',0.05,'EPSG','8666','Geoid (height correction) model file','CGG2013an83.byn',NULL,NULL,NULL,NULL,'EPSG','8240','NR-Can CGG2013a 1997',0);
Expand Down Expand Up @@ -1546,6 +1568,12 @@ INSERT INTO "grid_transformation" VALUES('EPSG','10417','NAD83(CSRS)v8 to CGVD20
INSERT INTO "usage" VALUES('EPSG','20252','grid_transformation','EPSG','10417','EPSG','1061','EPSG','1133');
INSERT INTO "grid_transformation" VALUES('EPSG','10418','NAD83(CSRS)v8 to CGVD28 height (1)','Valid at epoch 2010.0. Hybrid geoid model, grid derived at epoch 1997.0 through NAD83(CSRS)v3 (CT code 9983) and then modified to include correction for propagation of height between 1997.0 and 2010.0 derived from the Canada velocity grid v7.0.','EPSG','1060','Geographic3D to GravityRelatedHeight (NRCan byn)','EPSG','10413','EPSG','5713',0.05,'EPSG','8666','Geoid (height correction) model file','HT2_2010v70.byn',NULL,NULL,NULL,NULL,NULL,NULL,'NRC-Can CGG2000 2010',0);
INSERT INTO "usage" VALUES('EPSG','20137','grid_transformation','EPSG','10418','EPSG','1289','EPSG','1133');
INSERT INTO "grid_transformation" VALUES('EPSG','10421','NAD83(CSRS)v8 to NAD83(CSRS)v2 (1)','','EPSG','1114','Geographic3D Offset by velocity grid (NRCan byn)','EPSG','10413','EPSG','8235',0.05,'EPSG','1050','Point motion velocity grid file','NAD83v70VG.gvb',NULL,NULL,NULL,NULL,'EPSG','10414','EPSG-Can cvg70',0);
INSERT INTO "usage" VALUES('EPSG','20188','grid_transformation','EPSG','10421','EPSG','1061','EPSG','1026');
INSERT INTO "grid_transformation" VALUES('EPSG','10422','NAD83(CSRS)v8 to NAD83(CSRS)v3 (1)','','EPSG','1114','Geographic3D Offset by velocity grid (NRCan byn)','EPSG','10413','EPSG','8239',0.05,'EPSG','1050','Point motion velocity grid file','NAD83v70VG.gvb',NULL,NULL,NULL,NULL,'EPSG','10414','EPSG-Can cvg70',0);
INSERT INTO "usage" VALUES('EPSG','20189','grid_transformation','EPSG','10422','EPSG','1061','EPSG','1026');
INSERT INTO "grid_transformation" VALUES('EPSG','10423','NAD83(CSRS)v8 to NAD83(CSRS)v4 (1)','','EPSG','1114','Geographic3D Offset by velocity grid (NRCan byn)','EPSG','10413','EPSG','8244',0.05,'EPSG','1050','Point motion velocity grid file','NAD83v70VG.gvb',NULL,NULL,NULL,NULL,'EPSG','8255','EPSG-Can cvg70',0);
INSERT INTO "usage" VALUES('EPSG','20190','grid_transformation','EPSG','10423','EPSG','1061','EPSG','1026');
INSERT INTO "grid_transformation" VALUES('EPSG','10469','ETRS89 to COV23-IRF (1)','In conjunction with the COV23-TM map projection (code 10470) applied to COV23-IRF (code 10468), emulates the COV23 Snake projection. Applied to ETRS89 (as realized through the OSNet v2009) defines COV23-IRF hence is errorless. ','EPSG','9615','NTv2','EPSG','4258','EPSG','10468',0.0,'EPSG','8656','Latitude and longitude difference file','TN15-ETRS89-to-COV23-IRF.gsb',NULL,NULL,NULL,NULL,NULL,NULL,'CCC-Gbr COV23 OSNet2009',0);
INSERT INTO "usage" VALUES('EPSG','20323','grid_transformation','EPSG','10469','EPSG','4743','EPSG','1141');
INSERT INTO "grid_transformation" VALUES('EPSG','15486','CH1903 to CH1903+ (1)','For improved accuracy (0.01m) use CHENyx06 interpolation programme FINELTRA. File CHENyx06 replaced by CHENyx06a; there is a small area at the border of the data where some more real data has been introduced. swisstopo consider the change insignificant.','EPSG','9615','NTv2','EPSG','4149','EPSG','4150',0.2,'EPSG','8656','Latitude and longitude difference file','CHENyx06a.gsb',NULL,NULL,NULL,NULL,NULL,NULL,'BfL-Che',0);
Expand Down
2 changes: 1 addition & 1 deletion data/sql/metadata.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-- DATABASE_LAYOUT_VERSION_MINOR constants in src/iso19111/factory.cpp must be
-- updated as well.
INSERT INTO "metadata" VALUES('DATABASE.LAYOUT.VERSION.MAJOR', 1);
INSERT INTO "metadata" VALUES('DATABASE.LAYOUT.VERSION.MINOR', 2);
INSERT INTO "metadata" VALUES('DATABASE.LAYOUT.VERSION.MINOR', 3);

INSERT INTO "metadata" VALUES('EPSG.VERSION', 'v10.094');
INSERT INTO "metadata" VALUES('EPSG.DATE', '2023-08-08');
Expand Down
Loading
Loading