3798 int i, nedges, nfaces, fields;
3804 int nedge_right = 0;
3811 int fnode_edges = 0;
3813 int lnode_edges = 0;
3822 LWDEBUGF(1,
"lwt_be_getEdgeById returned NULL and set i=%d", i);
3830 lwerror(
"SQL/MM Spatial exception - non-existent edge %"
3836 lwerror(
"Backend coding error: getEdgeById callback returned NULL "
3837 "but numelements output parameter has value %d "
3838 "(expected 0 or 1)", i);
3850 LWDEBUG(1,
"Updating next_{right,left}_face of ring edges...");
3858 node_ids[nedges++] = edge->
end_node;
3864 if ( nedges == -1 ) {
3868 nedge_left = nedge_right = 0;
3869 for ( i=0; i<nedges; ++i )
3872 if ( e->
edge_id == edge_id )
continue;
3910 LWDEBUGF(1,
"updating %d 'next_left' edges", nedge_left);
3924 LWDEBUGF(1,
"updating %d 'next_right' edges", nedge_right);
3936 LWDEBUGF(1,
"releasing %d updateable edges in %p", nedges, upd_edge);
3954 LWDEBUG(1,
"floodface is universe");
3968 if ( nfaces == -1 ) {
3974 for ( i=0; i<nfaces; ++i )
3976 if ( faces[i].face_id == edge->
face_left )
3978 if ( ! box1 ) box1 = faces[i].
mbr;
3984 lwerror(
"corrupted topology: more than 1 face have face_id=%"
3989 else if ( faces[i].face_id == edge->
face_right )
3991 if ( ! box2 ) box2 = faces[i].
mbr;
3997 lwerror(
"corrupted topology: more than 1 face have face_id=%"
4007 lwerror(
"Backend coding error: getFaceById returned face "
4016 lwerror(
"corrupted topology: no face have face_id=%"
4025 lwerror(
"corrupted topology: no face have face_id=%"
4046 lwerror(
"Unexpected error: %d faces updated when expecting 1", i);
4065 lwerror(
"Unexpected error: %d faces inserted when expecting 1", i);
4129 if ( ! fnode_edges )
4170 return modFace ? floodface : newface.
face_id;
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.
LWT_INT64 LWT_ELEMID
Identifier of topology element.
#define LWT_COL_EDGE_START_NODE
#define LWT_COL_EDGE_NEXT_RIGHT
#define LWT_COL_NODE_CONTAINING_FACE
#define LWT_COL_EDGE_EDGE_ID
Edge fields.
#define LWT_COL_EDGE_END_NODE
#define LWT_COL_EDGE_NEXT_LEFT
#define LWDEBUG(level, msg)
#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, int *numelems, int fields)
static int lwt_be_checkTopoGeomRemEdge(LWT_TOPOLOGY *topo, LWT_ELEMID edge_id, LWT_ELEMID face_left, LWT_ELEMID face_right)
static int _lwt_UpdateEdgeFaceRef(LWT_TOPOLOGY *topo, LWT_ELEMID of, LWT_ELEMID nf)
static int lwt_be_updateFacesById(LWT_TOPOLOGY *topo, const LWT_ISO_FACE *faces, int numfaces)
static int lwt_be_updateNodesById(LWT_TOPOLOGY *topo, const LWT_ISO_NODE *nodes, int numnodes, int upd_fields)
static int lwt_be_updateTopoGeomFaceHeal(LWT_TOPOLOGY *topo, LWT_ELEMID face1, LWT_ELEMID face2, LWT_ELEMID newface)
static LWT_ISO_FACE * lwt_be_getFaceById(LWT_TOPOLOGY *topo, const LWT_ELEMID *ids, int *numelems, int fields)
static int lwt_be_insertFaces(LWT_TOPOLOGY *topo, LWT_ISO_FACE *face, int numelems)
int lwt_be_deleteEdges(LWT_TOPOLOGY *topo, const LWT_ISO_EDGE *sel_edge, int sel_fields)
static int _lwt_UpdateNodeFaceRef(LWT_TOPOLOGY *topo, LWT_ELEMID of, LWT_ELEMID nf)
static void _lwt_release_faces(LWT_ISO_FACE *faces, int num_faces)
static LWT_ISO_EDGE * lwt_be_getEdgeByNode(LWT_TOPOLOGY *topo, const LWT_ELEMID *ids, int *numelems, int fields)
static int lwt_be_deleteFacesById(const LWT_TOPOLOGY *topo, const LWT_ELEMID *ids, int numelems)
static void _lwt_release_edges(LWT_ISO_EDGE *edges, int num_edges)
static int lwt_be_updateEdgesById(LWT_TOPOLOGY *topo, const LWT_ISO_EDGE *edges, int numedges, int upd_fields)
LWT_ELEMID containing_face
const LWT_BE_IFACE * be_iface