Definition at line 535 of file lwgeom_box.c.
References error_if_srid_mismatch(), gbox_new(), gflags(), lwgeom_from_gserialized(), lwpoint_get_x(), lwpoint_get_y(), POINTTYPE, LWPOINT::srid, LWPOINT::type, GBOX::xmax, GBOX::xmin, GBOX::ymax, and GBOX::ymin.
Referenced by BOX2D_to_LWGEOM().
541 double min, max, tmp;
548 elog(ERROR,
"GBOX_construct: arguments must be points");
580 PG_RETURN_POINTER(result);
GBOX * gbox_new(uint8_t flags)
Create a new gbox with the dimensionality indicated by the flags.
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void error_if_srid_mismatch(int srid1, int srid2)
double lwpoint_get_x(const LWPOINT *point)
uint8_t gflags(int hasz, int hasm, int geodetic)
Construct a new flags char.
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
double lwpoint_get_y(const LWPOINT *point)