1945 const int maxdepth = 50;
1950 GBOX subbox1, subbox2;
1951 LWGEOM *clipped1, *clipped2;
1958 if ( width == 0.0 && height == 0.0 )
1976 for ( i = 0; i < incol->
ngeoms; i++ )
1986 if ( depth > maxdepth )
1994 if ( nvertices == 0 )
2000 if ( nvertices < maxvertices )
2006 subbox1 = subbox2 = *clip;
2007 if ( width > height )
LWGEOM * lwgeom_clip_by_rect(const LWGEOM *geom1, double x0, double y0, double x1, double y1)
#define POLYHEDRALSURFACETYPE
int lwgeom_count_vertices(const LWGEOM *geom)
Count points in an LWGEOM.
LWGEOM * lwgeom_clone_deep(const LWGEOM *lwgeom)
Deep-clone an LWGEOM object.
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
#define FP_TOLERANCE
Floating point comparators.
int lwgeom_is_collection(const LWGEOM *geom)
Determine whether a LWGEOM can contain sub-geometries or not.
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
static int lwgeom_subdivide_recursive(const LWGEOM *geom, int maxvertices, int depth, LWCOLLECTION *col, const GBOX *clip)
void lwgeom_free(LWGEOM *lwgeom)
LWCOLLECTION * lwcollection_add_lwgeom(LWCOLLECTION *col, const LWGEOM *geom)
Appends geom to the collection managed by col.
void lwerror(const char *fmt,...)
Write a notice out to the error handler.