1764 uint64_t numedges, i, j;
1770 for (i=0; i<num_signed_edge_ids; ++i) {
1771 int absid = llabs(signed_edge_ids[i]);
1774 for (j=0; j<numedges; ++j) {
1775 if ( edge_ids[j] == absid ) {
1780 if ( ! found ) edge_ids[numedges++] = absid;
1786 if (i == UINT64_MAX)
1791 else if ( i != numedges )
1793 lwfree( signed_edge_ids );
1795 lwerror(
"Unexpected error: %d edges found when expecting %d", i, numedges);
1803 for ( i=0; i<num_signed_edge_ids; ++i )
1809 for ( j=0; j<numedges; ++j )
1811 if ( ring_edges[j].edge_id == llabs(eid) )
1813 edge = &(ring_edges[j]);
1820 lwerror(
"missing edge that was found in ring edges loop");
int ptarray_append_ptarray(POINTARRAY *pa1, POINTARRAY *pa2, double gap_tolerance)
Append a POINTARRAY, pa2 to the end of an existing POINTARRAY, pa1.
POINTARRAY * ptarray_clone_deep(const POINTARRAY *ptarray)
Deep clone a pointarray (also clones serialized pointlist)
void ptarray_free(POINTARRAY *pa)
void * lwalloc(size_t size)
LWPOLY * lwpoly_construct(int32_t srid, GBOX *bbox, uint32_t nrings, POINTARRAY **points)
void ptarray_reverse_in_place(POINTARRAY *pa)
LWT_INT64 LWT_ELEMID
Identifier of topology element.
#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)
LWT_ISO_EDGE * lwt_be_getEdgeById(LWT_TOPOLOGY *topo, const LWT_ELEMID *ids, uint64_t *numelems, int fields)
static void _lwt_release_edges(LWT_ISO_EDGE *edges, int num_edges)
const LWT_BE_IFACE * be_iface