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