Skip to content

Commit

Permalink
Add support for 'Coordinate Frame rotation full matrix (geog3D)'
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Jan 22, 2025
1 parent c340447 commit d82b32b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/iso19111/operation/coordinateoperationfactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2395,6 +2395,8 @@ struct MyPROJStringExportableHorizVerticalHorizPROJBased final
EPSG_CODE_METHOD_COORDINATE_FRAME_FULL_MATRIX_GEOGRAPHIC_2D ||
methodEPSGCode ==
EPSG_CODE_METHOD_COORDINATE_FRAME_GEOGRAPHIC_3D ||
methodEPSGCode ==
EPSG_CODE_METHOD_COORDINATE_FRAME_FULL_MATRIX_GEOGRAPHIC_3D ||
methodEPSGCode ==
EPSG_CODE_METHOD_TIME_DEPENDENT_COORDINATE_FRAME_GEOCENTRIC ||
methodEPSGCode ==
Expand Down
4 changes: 4 additions & 0 deletions src/iso19111/operation/parammappings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,7 @@ const struct MethodNameCode methodNameCodesList[] = {
METHOD_NAME_CODE(COORDINATE_FRAME_GEOGRAPHIC_2D),
METHOD_NAME_CODE(COORDINATE_FRAME_FULL_MATRIX_GEOGRAPHIC_2D),
METHOD_NAME_CODE(COORDINATE_FRAME_GEOGRAPHIC_3D),
METHOD_NAME_CODE(COORDINATE_FRAME_FULL_MATRIX_GEOGRAPHIC_3D),
METHOD_NAME_CODE(POSITION_VECTOR_GEOCENTRIC),
METHOD_NAME_CODE(POSITION_VECTOR_GEOGRAPHIC_2D),
METHOD_NAME_CODE(POSITION_VECTOR_GEOGRAPHIC_3D),
Expand Down Expand Up @@ -1557,6 +1558,9 @@ static const MethodMapping gOtherMethodMappings[] = {
{EPSG_NAME_METHOD_COORDINATE_FRAME_GEOGRAPHIC_3D,
EPSG_CODE_METHOD_COORDINATE_FRAME_GEOGRAPHIC_3D, nullptr, nullptr, nullptr,
paramsHelmert7},
{EPSG_NAME_METHOD_COORDINATE_FRAME_FULL_MATRIX_GEOGRAPHIC_3D,
EPSG_CODE_METHOD_COORDINATE_FRAME_FULL_MATRIX_GEOGRAPHIC_3D, nullptr,
nullptr, nullptr, paramsHelmert7},

{EPSG_NAME_METHOD_POSITION_VECTOR_GEOCENTRIC,
EPSG_CODE_METHOD_POSITION_VECTOR_GEOCENTRIC, nullptr, nullptr, nullptr,
Expand Down
4 changes: 3 additions & 1 deletion src/iso19111/operation/singleoperation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3278,7 +3278,9 @@ bool SingleOperation::exportToPROJStringGeneric(
if (methodEPSGCode ==
EPSG_CODE_METHOD_COORDINATE_FRAME_FULL_MATRIX_GEOCENTRIC ||
methodEPSGCode ==
EPSG_CODE_METHOD_COORDINATE_FRAME_FULL_MATRIX_GEOGRAPHIC_2D) {
EPSG_CODE_METHOD_COORDINATE_FRAME_FULL_MATRIX_GEOGRAPHIC_2D ||
methodEPSGCode ==
EPSG_CODE_METHOD_COORDINATE_FRAME_FULL_MATRIX_GEOGRAPHIC_3D) {
positionVectorConvention = false;
sevenParamsTransform = true;
fullMatrix = true;
Expand Down
4 changes: 4 additions & 0 deletions src/iso19111/operation/transformation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ std::vector<double> Transformation::getTOWGS84Parameters(
methodEPSGCode == EPSG_CODE_METHOD_COORDINATE_FRAME_GEOGRAPHIC_2D ||
methodEPSGCode ==
EPSG_CODE_METHOD_COORDINATE_FRAME_FULL_MATRIX_GEOGRAPHIC_2D ||
methodEPSGCode ==
EPSG_CODE_METHOD_COORDINATE_FRAME_FULL_MATRIX_GEOGRAPHIC_3D ||
methodEPSGCode == EPSG_CODE_METHOD_COORDINATE_FRAME_GEOGRAPHIC_3D) {
sevenParamsTransform = true;
invertRotSigns = true;
Expand Down Expand Up @@ -1416,6 +1418,8 @@ createApproximateInverseIfPossible(const Transformation *op) {
methodEPSGCode == EPSG_CODE_METHOD_COORDINATE_FRAME_GEOGRAPHIC_2D ||
methodEPSGCode ==
EPSG_CODE_METHOD_COORDINATE_FRAME_FULL_MATRIX_GEOGRAPHIC_2D ||
methodEPSGCode ==
EPSG_CODE_METHOD_COORDINATE_FRAME_FULL_MATRIX_GEOGRAPHIC_3D ||
methodEPSGCode == EPSG_CODE_METHOD_COORDINATE_FRAME_GEOGRAPHIC_3D) {
sevenParamsTransform = true;
} else if (
Expand Down
4 changes: 4 additions & 0 deletions src/proj_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,10 @@
"Coordinate Frame rotation full matrix (geog2D)"
#define EPSG_CODE_METHOD_COORDINATE_FRAME_FULL_MATRIX_GEOGRAPHIC_2D 1133

#define EPSG_NAME_METHOD_COORDINATE_FRAME_FULL_MATRIX_GEOGRAPHIC_3D \
"Coordinate Frame rotation full matrix (geog3D)"
#define EPSG_CODE_METHOD_COORDINATE_FRAME_FULL_MATRIX_GEOGRAPHIC_3D 1140

#define EPSG_NAME_METHOD_COORDINATE_FRAME_GEOGRAPHIC_3D \
"Coordinate Frame rotation (geog3D domain)"
#define EPSG_CODE_METHOD_COORDINATE_FRAME_GEOGRAPHIC_3D 1038
Expand Down

0 comments on commit d82b32b

Please sign in to comment.