Adds a polygon to the topology.
The boundary of the given polygon will snap to existing nodes or edges within given tolerance. Existing edges or faces may be split by the boundary of the polygon.
7593 uint64_t nfacesinbox;
7597 const GEOSPreparedGeometry *ppoly;
7598 GEOSGeometry *polyg;
7609 LWDEBUGF(1,
"Working tolerance:%.15g", tol);
7621 if (nfacesinbox == UINT64_MAX)
7638 ppoly = GEOSPrepare(polyg);
7640 for ( j=0; j<nfacesinbox; ++j )
7644 GEOSGeometry *fgg, *sp;
7652 GEOSPreparedGeom_destroy(ppoly);
7653 GEOSGeom_destroy(polyg);
7664 GEOSPreparedGeom_destroy(ppoly);
7665 GEOSGeom_destroy(polyg);
7670 sp = GEOSPointOnSurface(fgg);
7671 GEOSGeom_destroy(fgg);
7674 GEOSPreparedGeom_destroy(ppoly);
7675 GEOSGeom_destroy(polyg);
7680 covers = GEOSPreparedCovers( ppoly, sp );
7681 GEOSGeom_destroy(sp);
7684 GEOSPreparedGeom_destroy(ppoly);
7685 GEOSGeom_destroy(polyg);
7698 GEOSPreparedGeom_destroy(ppoly);
7699 GEOSGeom_destroy(polyg);
void gbox_expand(GBOX *g, double d)
Move the box minimums down and the maximums up by the distance provided.
char lwgeom_geos_errmsg[LWGEOM_GEOS_ERRMSG_MAXSIZE]
GEOSGeometry * LWGEOM2GEOS(const LWGEOM *lwgeom, uint8_t autofix)
void lwgeom_free(LWGEOM *geom)
LWGEOM * lwpoly_as_lwgeom(const LWPOLY *obj)
const GBOX * lwgeom_get_bbox(const LWGEOM *lwgeom)
Get a non-empty geometry bounding box, computing and caching it if not already there.
void * lwalloc(size_t size)
int lwpoly_is_empty(const LWPOLY *poly)
LWT_INT64 LWT_ELEMID
Identifier of topology element.
#define PGTOPO_BE_ERROR()
Datum covers(PG_FUNCTION_ARGS)
#define LWDEBUGF(level, msg,...)
void void lwerror(const char *fmt,...) __attribute__((format(printf
Write a notice out to the error handler.
LWGEOM * lwt_GetFaceGeometry(LWT_TOPOLOGY *topo, LWT_ELEMID faceid)
Return the geometry of a face.
void _lwt_release_faces(LWT_ISO_FACE *faces, int num_faces)
LWT_ISO_FACE * lwt_be_getFaceWithinBox2D(const LWT_TOPOLOGY *topo, const GBOX *box, uint64_t *numelems, int fields, uint64_t limit)
static void lwt_LoadPolygon(LWT_TOPOLOGY *topo, const LWPOLY *poly, double tol)
#define _LWT_MINTOLERANCE(topo, geom)