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

Process properly EPSG_CODE_METHOD_VERTICALGRID_GTG with code 1129 #4213

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions src/iso19111/operation/singleoperation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2269,6 +2269,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_GTG ||
methodEPSGCode == EPSG_CODE_METHOD_VERTICALGRID_PL_TXT;
}

Expand Down
4 changes: 4 additions & 0 deletions src/proj_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,10 @@
#define EPSG_NAME_METHOD_VERTICALGRID_GTX \
"Vertical Offset by Grid Interpolation (gtx)"

#define EPSG_CODE_METHOD_VERTICALGRID_GTG 1129
#define EPSG_NAME_METHOD_VERTICALGRID_GTG \
"Vertical Offset by Grid Interpolation (gtg)"

#define EPSG_CODE_METHOD_VERTICALGRID_PL_TXT 1101
#define EPSG_NAME_METHOD_VERTICALGRID_PL_TXT \
"Vertical Offset by Grid Interpolation (PL txt)"
Expand Down
9 changes: 9 additions & 0 deletions test/unit/test_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1208,6 +1208,15 @@ TEST(factory, AuthorityFactory_affine_parametric_transform) {

// ---------------------------------------------------------------------------

TEST(factory, AuthorityFactory_10566_issue_4212) {
auto factory = AuthorityFactory::create(DatabaseContext::create(), "EPSG");
auto op = factory->createCoordinateOperation("10566", true);
EXPECT_EQ(op->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=vgridshift +grids=dk_sdfi_gllmsl_2022.tif +multiplier=1");
}

// ---------------------------------------------------------------------------

TEST(factory,
AuthorityFactory_createCoordinateOperation_concatenated_operation) {
auto factory = AuthorityFactory::create(DatabaseContext::create(), "EPSG");
Expand Down