Skip to content

Commit a5b6487

Browse files
Deformation: Make code and comments compatible
The expression in the head comment describing the transformation had a switched sign, compared to the code in [lines 278-289](https://github.com/OSGeo/PROJ/blob/effac63ae5360e737790defa5bdc3d070d19a49b/src/transformations/deformation.cpp#L278-L289). Also, the description of file formats, while still relevant, needed an update to mention the possibility of representing all three components of the deformation model as a GTG file
1 parent effac63 commit a5b6487

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/transformations/deformation.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,26 @@
88
99
Perform datum shifts by means of a deformation/velocity model.
1010
11-
X_out = X_in + (T_ct - T_obs)*DX
12-
Y_out = Y_in + (T_ct - T_obs)*DY
13-
Z_out = Z_in + (T_ct - T_obs)*DZ
14-
11+
X_out = X_in + (T_obs - T_epoch) * DX
12+
Y_out = Y_in + (T_obs - T_epoch) * DY
13+
Z_out = Z_in + (T_obs - T_epoch) * DZ
1514
1615
The deformation operation takes cartesian coordinates as input and
1716
returns cartesian coordinates as well.
1817
1918
Corrections in the gridded model are in east, north, up (ENU) space.
20-
Hence the input coordinates needs to be converted to ENU-space when
19+
Hence the input coordinates need to be converted to ENU-space when
2120
searching for corrections in the grid. The corrections are then converted
2221
to cartesian PJ_XYZ-space and applied to the input coordinates (also in
2322
cartesian space).
2423
25-
A full deformation model is described by two grids, one for the horizontal
26-
components and one for the vertical component. The horizontal grid is
27-
stored in CTable/CTable2 and the vertical grid is stored in the GTX
28-
format. The NTv2 format should not be used for this purpose since grid-
29-
values are scaled upon reading. Both grids are expected to contain
30-
grid-values in units of mm/year in ENU-space.
24+
A full deformation model is preferably represented as a 3 channel Geodetic
25+
TIFF Grid, but was historically described by a set of two grids: One for
26+
the horizontal components and one for the vertical component.
27+
28+
The east and north components are (were) stored using the CTable/CTable2
29+
format, up component is (was) stored in the GTX format. Both grids are
30+
(were) expected to contain grid-values in units of mm/year in ENU-space.
3131
3232
************************************************************************
3333
* Copyright (c) 2017, Kristian Evers

0 commit comments

Comments
 (0)