2056 static int startdepth = 0;
2057 static int minmaxvertices = 8;
2066 if ( maxvertices < minmaxvertices )
2069 lwerror(
"%s: cannot subdivide to fewer than %d vertices per output", __func__, minmaxvertices);
int lwgeom_has_m(const LWGEOM *geom)
Return LW_TRUE if geometry has M ordinates.
int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members) ...
int lwgeom_has_z(const LWGEOM *geom)
Return LW_TRUE if geometry has Z ordinates.
void lwcollection_free(LWCOLLECTION *col)
void lwgeom_set_srid(LWGEOM *geom, int32_t srid)
static int lwgeom_subdivide_recursive(const LWGEOM *geom, int maxvertices, int depth, LWCOLLECTION *col, const GBOX *clip)
LWCOLLECTION * lwcollection_construct_empty(uint8_t type, int srid, char hasz, char hasm)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
const GBOX * lwgeom_get_bbox(const LWGEOM *lwg)
Get a non-empty geometry bounding box, computing and caching it if not already there.