Return the list of directed edges bounding a face.
3098 if ( numfaceedges == -1 ) {
3102 if ( ! numfaceedges )
return 0;
3146 nseid = prevseid = 0;
3150 for ( i=0; i<facepoly->
nrings; ++i )
3159 while ( j < ring->npoints-1 )
3161 LWDEBUGF(1,
"Looking for edge covering ring %d from vertex %d",
3171 lwerror(
"No edge (among %d) found to be defining geometry of face %" 3176 nextedge = &(edges[edgeno]);
3177 nextline = nextedge->
geom;
3180 " covers ring %d from vertex %d to %d",
3196 seid[nseid++] = nextedge->
face_left == face_id ?
3207 if ( (nseid - prevseid) > 1 )
3211 LWDEBUGF(1,
"Looking for smallest id among the %d edges " 3212 "composing ring %d", (nseid-prevseid), i);
3213 for ( j=prevseid; j<nseid; ++j )
3217 if ( ! minid ||
id < minid )
3224 " at position %d", minid, minidx);
3225 if ( minidx != prevseid )
#define LWT_COL_EDGE_FACE_LEFT
char * lwgeom_to_wkt(const LWGEOM *geom, uint8_t variant, int precision, size_t *size_out)
WKT emitter function.
#define LWT_COL_EDGE_FACE_RIGHT
void lwgeom_free(LWGEOM *geom)
LWPOLY * lwgeom_as_lwpoly(const LWGEOM *lwgeom)
static LWT_ISO_EDGE * lwt_be_getEdgeByFace(LWT_TOPOLOGY *topo, const LWT_ELEMID *ids, int *numelems, int fields, const GBOX *box)
LWGEOM * lwline_as_lwgeom(const LWLINE *obj)
static LWGEOM * _lwt_FaceByEdges(LWT_TOPOLOGY *topo, LWT_ISO_EDGE *edges, int numfaceedges)
const LWT_BE_IFACE * be_iface
#define LWT_COL_EDGE_EDGE_ID
Edge fields.
static void _lwt_RotateElemidArray(LWT_ELEMID *ary, int from, int to, int rotidx)
void lwgeom_reverse(LWGEOM *lwgeom)
Reverse vertex order of LWGEOM.
static void _lwt_release_edges(LWT_ISO_EDGE *edges, int num_edges)
LWT_INT64 LWT_ELEMID
Identifier of topology element.
#define LWT_COL_EDGE_GEOM
void * lwalloc(size_t size)
int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members) ...
static int _lwt_FindNextRingEdge(const POINTARRAY *ring, int from, const LWT_ISO_EDGE *edges, int numedges)
#define LWDEBUGF(level, msg,...)
const char * lwt_be_lastErrorMessage(const LWT_BE_IFACE *be)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.