From cf2ee49d75f2bf4d1b1eeaeac90d8931c9a0d113 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 9 Dec 2024 15:16:05 +0100 Subject: [PATCH] Map EPSG method 'Vertical Offset by Grid Interpolation (asc)' to +proj=vgridshift Fixes #4342 Note that currently none of the .asc grids are in PROJ-data. Most of the ones registered in the EPSG dataset are for EVRF2019 heights and are managed by Euref. My past attempts of getting an open data license for the grid from Euref have not been successful. --- src/iso19111/operation/parammappings.cpp | 6 ++++++ src/iso19111/operation/singleoperation.cpp | 2 +- src/proj_constants.h | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/iso19111/operation/parammappings.cpp b/src/iso19111/operation/parammappings.cpp index 0c6956d1a9..2d4fc2c549 100644 --- a/src/iso19111/operation/parammappings.cpp +++ b/src/iso19111/operation/parammappings.cpp @@ -1038,6 +1038,12 @@ const struct MethodNameCode methodNameCodesList[] = { METHOD_NAME_CODE(NADCON5_3D), METHOD_NAME_CODE(VERTCON), METHOD_NAME_CODE(GEOCENTRIC_TRANSLATION_BY_GRID_INTERPOLATION_IGN), + METHOD_NAME_CODE(VERTICALGRID_NZLVD), + METHOD_NAME_CODE(VERTICALGRID_BEV_AT), + METHOD_NAME_CODE(VERTICALGRID_GTX), + METHOD_NAME_CODE(VERTICALGRID_ASC), + METHOD_NAME_CODE(VERTICALGRID_GTG), + METHOD_NAME_CODE(VERTICALGRID_PL_TXT), // PointMotionOperation METHOD_NAME_CODE(POINT_MOTION_BY_GRID_CANADA_NTV2_VEL), }; diff --git a/src/iso19111/operation/singleoperation.cpp b/src/iso19111/operation/singleoperation.cpp index cfc0900935..779d922042 100644 --- a/src/iso19111/operation/singleoperation.cpp +++ b/src/iso19111/operation/singleoperation.cpp @@ -2159,7 +2159,6 @@ bool Transformation::isGeographic3DToGravityRelatedHeight( "1126", // Vertical change by geoid grid difference (NRCan) "1127", // Geographic3D to Depth (gtg) "1128", // Geog3D to Geog2D+Depth (gtg) - "1129", // Vertical Offset by Grid Interpolation (gtg) "1135", // Geog3D to Geog2D+GravityRelatedHeight (NGS bin) "9661", // Geographic3D to GravityRelatedHeight (EGM) "9662", // Geographic3D to GravityRelatedHeight (Ausgeoid98) @@ -2312,6 +2311,7 @@ static bool isRegularVerticalGridMethod(int methodEPSGCode, return methodEPSGCode == EPSG_CODE_METHOD_VERTICALGRID_NZLVD || methodEPSGCode == EPSG_CODE_METHOD_VERTICALGRID_BEV_AT || methodEPSGCode == EPSG_CODE_METHOD_VERTICALGRID_GTX || + methodEPSGCode == EPSG_CODE_METHOD_VERTICALGRID_ASC || methodEPSGCode == EPSG_CODE_METHOD_VERTICALGRID_GTG || methodEPSGCode == EPSG_CODE_METHOD_VERTICALGRID_PL_TXT; } diff --git a/src/proj_constants.h b/src/proj_constants.h index 0e3c71f639..dba70c8375 100644 --- a/src/proj_constants.h +++ b/src/proj_constants.h @@ -681,6 +681,10 @@ #define EPSG_NAME_METHOD_VERTICALGRID_GTX \ "Vertical Offset by Grid Interpolation (gtx)" +#define EPSG_CODE_METHOD_VERTICALGRID_ASC 1085 +#define EPSG_NAME_METHOD_VERTICALGRID_ASC \ + "Vertical Offset by Grid Interpolation (asc)" + #define EPSG_CODE_METHOD_VERTICALGRID_GTG 1129 #define EPSG_NAME_METHOD_VERTICALGRID_GTG \ "Vertical Offset by Grid Interpolation (gtg)"