Definition at line 464 of file lwgeom_box3d.c.
465{
471 int32_t srid;
472 int rv;
473
474
475 if (!box && !geom)
476 {
477 PG_RETURN_NULL();
478 }
479
480 else if (!geom)
481 {
484 PG_RETURN_POINTER(
result);
485 }
486
487
488
489
490
495
496
498 {
499 PG_FREE_IF_COPY(geom, 1);
500
501 if (!box)
502 PG_RETURN_NULL();
505 PG_RETURN_POINTER(
result);
506 }
507
508
509 if (!box)
510 {
511 PG_FREE_IF_COPY(geom, 1);
514 PG_RETURN_POINTER(
result);
515 }
516
525
526 PG_FREE_IF_COPY(geom, 1);
527 PG_RETURN_POINTER(
result);
528}
char result[OUT_DOUBLE_BUFFER_SIZE]
BOX3D * box3d_from_gbox(const GBOX *gbox)
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...
References box3d_from_gbox(), LW_FAILURE, lwgeom_calculate_gbox(), lwgeom_free(), lwgeom_from_gserialized(), result, 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.