3942 int i, nedges, nfaces, fields;
3948 int nedge_right = 0;
3955 int fnode_edges = 0;
3957 int lnode_edges = 0;
3966 LWDEBUGF(1,
"lwt_be_getEdgeById returned NULL and set i=%d", i);
3974 lwerror(
"SQL/MM Spatial exception - non-existent edge %" 3980 lwerror(
"Backend coding error: getEdgeById callback returned NULL " 3981 "but numelements output parameter has value %d " 3982 "(expected 0 or 1)", i);
3994 LWDEBUG(1,
"Updating next_{right,left}_face of ring edges...");
4002 node_ids[nedges++] = edge->
end_node;
4008 if ( nedges == -1 ) {
4012 nedge_left = nedge_right = 0;
4013 for ( i=0; i<nedges; ++i )
4016 if ( e->
edge_id == edge_id )
continue;
4054 LWDEBUGF(1,
"updating %d 'next_left' edges", nedge_left);
4068 LWDEBUGF(1,
"updating %d 'next_right' edges", nedge_right);
4080 LWDEBUGF(1,
"releasing %d updateable edges in %p", nedges, upd_edge);
4098 LWDEBUG(1,
"floodface is universe");
4112 if ( nfaces == -1 ) {
4118 for ( i=0; i<nfaces; ++i )
4120 if ( faces[i].face_id == edge->
face_left )
4122 if ( ! box1 ) box1 = faces[i].
mbr;
4128 lwerror(
"corrupted topology: more than 1 face have face_id=%" 4133 else if ( faces[i].face_id == edge->
face_right )
4135 if ( ! box2 ) box2 = faces[i].
mbr;
4141 lwerror(
"corrupted topology: more than 1 face have face_id=%" 4151 lwerror(
"Backend coding error: getFaceById returned face " 4160 lwerror(
"corrupted topology: no face have face_id=%" 4169 lwerror(
"corrupted topology: no face have face_id=%" 4190 lwerror(
"Unexpected error: %d faces updated when expecting 1", i);
4209 lwerror(
"Unexpected error: %d faces inserted when expecting 1", i);
4273 if ( ! fnode_edges )
4314 return modFace ? floodface : newface.
face_id;
static LWT_ISO_FACE * lwt_be_getFaceById(LWT_TOPOLOGY *topo, const LWT_ELEMID *ids, int *numelems, int fields)
#define LWT_COL_NODE_CONTAINING_FACE
static int lwt_be_insertFaces(LWT_TOPOLOGY *topo, LWT_ISO_FACE *face, int numelems)
LWT_ELEMID containing_face
static int lwt_be_updateEdgesById(LWT_TOPOLOGY *topo, const LWT_ISO_EDGE *edges, int numedges, int upd_fields)
static int _lwt_UpdateNodeFaceRef(LWT_TOPOLOGY *topo, LWT_ELEMID of, LWT_ELEMID nf)
int lwt_be_deleteEdges(LWT_TOPOLOGY *topo, const LWT_ISO_EDGE *sel_edge, int sel_fields)
#define LWT_COL_EDGE_START_NODE
#define LWDEBUG(level, msg)
LWT_ISO_EDGE * lwt_be_getEdgeById(LWT_TOPOLOGY *topo, const LWT_ELEMID *ids, int *numelems, int fields)
int gbox_merge(const GBOX *new_box, GBOX *merge_box)
Update the merged GBOX to be large enough to include itself and the new box.
static int lwt_be_updateFacesById(LWT_TOPOLOGY *topo, const LWT_ISO_FACE *faces, int numfaces)
const LWT_BE_IFACE * be_iface
#define LWT_COL_EDGE_END_NODE
static int lwt_be_updateTopoGeomFaceHeal(LWT_TOPOLOGY *topo, LWT_ELEMID face1, LWT_ELEMID face2, LWT_ELEMID newface)
static int lwt_be_deleteFacesById(const LWT_TOPOLOGY *topo, const LWT_ELEMID *ids, int numelems)
static int lwt_be_updateNodesById(LWT_TOPOLOGY *topo, const LWT_ISO_NODE *nodes, int numnodes, int upd_fields)
#define LWT_COL_EDGE_EDGE_ID
Edge fields.
#define LWT_COL_EDGE_NEXT_LEFT
static int _lwt_UpdateEdgeFaceRef(LWT_TOPOLOGY *topo, LWT_ELEMID of, LWT_ELEMID nf)
#define LWT_COL_EDGE_NEXT_RIGHT
static void _lwt_release_edges(LWT_ISO_EDGE *edges, int num_edges)
LWT_INT64 LWT_ELEMID
Identifier of topology element.
static LWT_ISO_EDGE * lwt_be_getEdgeByNode(LWT_TOPOLOGY *topo, const LWT_ELEMID *ids, int *numelems, int fields)
static void _lwt_release_faces(LWT_ISO_FACE *faces, int num_faces)
#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.
static int lwt_be_checkTopoGeomRemEdge(LWT_TOPOLOGY *topo, LWT_ELEMID edge_id, LWT_ELEMID face_left, LWT_ELEMID face_right)