Definition at line 479 of file lwgeom_box3d.c.
References BOX3D_combine_BOX3D(), box3d_from_gbox(), LW_FAILURE, lwgeom_calculate_gbox(), lwgeom_free(), lwgeom_from_gserialized(), PG_FUNCTION_INFO_V1(), BOX3D::srid, LWGEOM::srid, BOX3D::xmax, GBOX::xmax, BOX3D::xmin, GBOX::xmin, BOX3D::ymax, GBOX::ymax, BOX3D::ymin, GBOX::ymin, BOX3D::zmax, GBOX::zmax, BOX3D::zmin, and GBOX::zmin.
Referenced by BOX3D_zmax().
484 BOX3D *result = NULL;
490 if ( (box == NULL) && (geom == NULL) )
496 result = palloc(
sizeof(
BOX3D));
497 memcpy(result, box,
sizeof(
BOX3D));
498 PG_RETURN_POINTER(result);
511 PG_FREE_IF_COPY(geom, 1);
515 result = palloc(
sizeof(
BOX3D));
516 memcpy(result, box,
sizeof(
BOX3D));
517 PG_RETURN_POINTER(result);
523 PG_FREE_IF_COPY(geom, 1);
526 PG_RETURN_POINTER(result);
529 result = palloc(
sizeof(
BOX3D));
538 PG_FREE_IF_COPY(geom, 1);
539 PG_RETURN_POINTER(result);
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
int lwgeom_calculate_gbox(const LWGEOM *lwgeom, GBOX *gbox)
Calculate bounding box of a geometry, automatically taking into account whether it is cartesian or ge...
BOX3D * box3d_from_gbox(const GBOX *gbox)