PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ box3d_transform()

int box3d_transform ( GBOX box,
LWPROJ pj 
)

Definition at line 209 of file liblwgeom/lwgeom_transform.c.

210 {
211  POINT4D pt;
212  POINTARRAY *pa = ptarray_construct(0, 0, 4);
213  pt = (POINT4D){gbox->xmin, gbox->ymin, 0, 0};
214  ptarray_set_point4d(pa, 0, &pt);
215 
216  pt = (POINT4D){gbox->xmax, gbox->ymin, 0, 0};
217  ptarray_set_point4d(pa, 1, &pt);
218 
219  pt = (POINT4D){gbox->xmax, gbox->ymax, 0, 0};
220  ptarray_set_point4d(pa, 2, &pt);
221 
222  pt = (POINT4D){gbox->xmin, gbox->ymax, 0, 0};
223  ptarray_set_point4d(pa, 3, &pt);
224 
225  ptarray_transform(pa, pj);
226  return ptarray_calculate_gbox_cartesian(pa, gbox);
227 }
int ptarray_calculate_gbox_cartesian(const POINTARRAY *pa, GBOX *gbox)
Calculate box (x/y) and add values to gbox.
Definition: gbox.c:601
int ptarray_transform(POINTARRAY *pa, LWPROJ *pj)
POINTARRAY * ptarray_construct(char hasz, char hasm, uint32_t npoints)
Construct an empty pointarray, allocating storage and setting the npoints, but not filling in any inf...
Definition: ptarray.c:51
void ptarray_set_point4d(POINTARRAY *pa, uint32_t n, const POINT4D *p4d)
Definition: lwgeom_api.c:369

References ptarray_calculate_gbox_cartesian(), ptarray_construct(), ptarray_set_point4d(), ptarray_transform(), GBOX::xmax, GBOX::xmin, GBOX::ymax, and GBOX::ymin.

Referenced by srs_find_planar().

Here is the call graph for this function:
Here is the caller graph for this function: