849{
852
856
858 {
859 POSTGIS_DEBUG(3, "mvt_geom: geometry outside clip box");
860 return NULL;
861 }
862
864 {
865 POSTGIS_DEBUG(3, "mvt_geom: geometry contained fully inside the box");
866 return lwg_in;
867 }
868
871 return NULL;
872 return geom_clipped;
873}
int gbox_overlaps_2d(const GBOX *g1, const GBOX *g2)
Return LW_TRUE if the GBOX overlaps on the 2d plane, LW_FALSE otherwise.
void gbox_init(GBOX *gbox)
Zero out all the entries in the GBOX.
int gbox_contains_2d(const GBOX *g1, const GBOX *g2)
Return LW_TRUE if the first GBOX contains the second on the 2d plane, LW_FALSE otherwise.
LWGEOM * lwgeom_clip_by_rect(const LWGEOM *geom1, double x0, double y0, double x1, double y1)
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...
#define FLAGS_SET_GEODETIC(flags, value)
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)