MCPcopy Create free account
hub / github.com/OSGeo/PROJ / pj_vgridshift_reverse_4d

Function pj_vgridshift_reverse_4d

src/transformations/vgridshift.cpp:132–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132static void pj_vgridshift_reverse_4d(PJ_COORD &coo, PJ *P) {
133 struct vgridshiftData *Q = (struct vgridshiftData *)P->opaque;
134
135 /* If transformation is not time restricted, we always call it */
136 if (Q->t_final == 0 || Q->t_epoch == 0) {
137 // Assigning in 2 steps avoids cppcheck warning
138 // "Overlapping read/write of union is undefined behavior"
139 // Cf
140 // https://github.com/OSGeo/PROJ/pull/3527#pullrequestreview-1233332710
141 const auto lpz = pj_vgridshift_reverse_3d(coo.xyz, P);
142 coo.lpz = lpz;
143 return;
144 }
145
146 /* Time restricted - only apply transform if within time bracket */
147 if (coo.lpzt.t < Q->t_epoch && Q->t_final > Q->t_epoch) {
148 // Assigning in 2 steps avoids cppcheck warning
149 // "Overlapping read/write of union is undefined behavior"
150 // Cf
151 // https://github.com/OSGeo/PROJ/pull/3527#pullrequestreview-1233332710
152 const auto lpz = pj_vgridshift_reverse_3d(coo.xyz, P);
153 coo.lpz = lpz;
154 }
155}
156
157static PJ *pj_vgridshift_destructor(PJ *P, int errlev) {
158 if (nullptr == P)

Callers

nothing calls this directly

Calls 1

pj_vgridshift_reverse_3dFunction · 0.85

Tested by

no test coverage detected