552{
556 LWGEOM *minpoint, *maxpoint;
558
561
563 {
564 elog(ERROR, "BOX3D_construct: args must be points");
565 PG_RETURN_NULL();
566 }
567
569 elog(ERROR, "BOX3D_construct: args can not be empty points");
570 PG_RETURN_NULL();
571 }
572
574
577
578 result->
xmax = maxp.
x;
579 result->
ymax = maxp.
y;
580 result->
zmax = maxp.
z;
581
582 result->
xmin = minp.
x;
583 result->
ymin = minp.
y;
584 result->
zmin = minp.
z;
585
587
588 PG_RETURN_POINTER(result);
589}
void gserialized_error_if_srid_mismatch(const GSERIALIZED *g1, const GSERIALIZED *g2, const char *funcname)
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
int getPoint3dz_p(const POINTARRAY *pa, uint32_t n, POINT3DZ *point)
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)