PostGIS  2.2.7dev-r@@SVN_REVISION@@
liblwgeom_topo.h
Go to the documentation of this file.
1 /**********************************************************************
2  *
3  * PostGIS - Spatial Types for PostgreSQL
4  * http://postgis.net
5  *
6  * Copyright (C) 2015 Sandro Santilli <strk@keybit.net>
7  *
8  * This is free software; you can redistribute and/or modify it under
9  * the terms of the GNU General Public Licence. See the COPYING file.
10  *
11  **********************************************************************/
12 
13 #ifndef LIBLWGEOM_TOPO_H
14 #define LIBLWGEOM_TOPO_H 1
15 
16 #include "liblwgeom.h"
17 
18 /* INT64 */
19 typedef int64_t LWT_INT64;
20 
23 
24 /*
25  * ISO primitive elements
26  */
27 
29 typedef struct
30 {
32  LWT_ELEMID containing_face; /* -1 if not isolated */
34 }
36 
38 
40 #define LWT_COL_NODE_NODE_ID 1<<0
41 #define LWT_COL_NODE_CONTAINING_FACE 1<<1
42 #define LWT_COL_NODE_GEOM 1<<2
43 #define LWT_COL_NODE_ALL (1<<3)-1
44 
46 typedef struct
47 {
56 }
58 
60 #define LWT_COL_EDGE_EDGE_ID 1<<0
61 #define LWT_COL_EDGE_START_NODE 1<<1
62 #define LWT_COL_EDGE_END_NODE 1<<2
63 #define LWT_COL_EDGE_FACE_LEFT 1<<3
64 #define LWT_COL_EDGE_FACE_RIGHT 1<<4
65 #define LWT_COL_EDGE_NEXT_LEFT 1<<5
66 #define LWT_COL_EDGE_NEXT_RIGHT 1<<6
67 #define LWT_COL_EDGE_GEOM 1<<7
68 #define LWT_COL_EDGE_ALL (1<<8)-1
69 
71 typedef struct
72 {
75 }
77 
79 #define LWT_COL_FACE_FACE_ID 1<<0
80 #define LWT_COL_FACE_MBR 1<<1
81 #define LWT_COL_FACE_ALL (1<<2)-1
82 
83 typedef enum LWT_SPATIALTYPE_T {
86  LWT_AREAL = 2,
89 
90 /*
91  * Backend handling functions
92  */
93 
94 /* opaque pointers referencing native backend objects */
95 
102 typedef struct LWT_BE_DATA_T LWT_BE_DATA;
103 
112 
120 typedef struct LWT_BE_TOPOLOGY_T LWT_BE_TOPOLOGY;
121 
127 typedef struct LWT_BE_CALLBACKS_T {
128 
134  const char* (*lastErrorMessage) (const LWT_BE_DATA* be);
135 
146  LWT_BE_TOPOLOGY* (*createTopology) (
147  const LWT_BE_DATA* be,
148  const char* name, int srid, double precision, int hasZ
149  );
150 
158  LWT_BE_TOPOLOGY* (*loadTopologyByName) (
159  const LWT_BE_DATA* be,
160  const char* name
161  );
162 
170 
188  LWT_ISO_NODE* (*getNodeById) (
189  const LWT_BE_TOPOLOGY* topo,
190  const LWT_ELEMID* ids, int* numelems, int fields
191  );
192 
213  LWT_ISO_NODE* (*getNodeWithinDistance2D) (
214  const LWT_BE_TOPOLOGY* topo,
215  const LWPOINT* pt, double dist, int* numelems,
216  int fields, int limit
217  );
218 
232  int (*insertNodes) (
233  const LWT_BE_TOPOLOGY* topo,
234  LWT_ISO_NODE* nodes,
235  int numelems
236  );
237 
254  LWT_ISO_EDGE* (*getEdgeById) (
255  const LWT_BE_TOPOLOGY* topo,
256  const LWT_ELEMID* ids, int* numelems, int fields
257  );
258 
279  LWT_ISO_EDGE* (*getEdgeWithinDistance2D) (
280  const LWT_BE_TOPOLOGY* topo,
281  const LWPOINT* pt, double dist, int* numelems,
282  int fields, int limit
283  );
284 
296  const LWT_BE_TOPOLOGY* topo
297  );
298 
312  int (*insertEdges) (
313  const LWT_BE_TOPOLOGY* topo,
314  LWT_ISO_EDGE* edges,
315  int numelems
316  );
317 
336  int (*updateEdges) (
337  const LWT_BE_TOPOLOGY* topo,
338  const LWT_ISO_EDGE* sel_edge, int sel_fields,
339  const LWT_ISO_EDGE* upd_edge, int upd_fields,
340  const LWT_ISO_EDGE* exc_edge, int exc_fields
341  );
342 
359  LWT_ISO_FACE* (*getFaceById) (
360  const LWT_BE_TOPOLOGY* topo,
361  const LWT_ELEMID* ids, int* numelems, int fields
362  );
363 
375  const LWT_BE_TOPOLOGY* topo,
376  const LWPOINT* pt
377  );
378 
398  const LWT_BE_TOPOLOGY* topo,
399  LWT_ELEMID split_edge, LWT_ELEMID new_edge1, LWT_ELEMID new_edge2
400  );
401 
413  int (*deleteEdges) (
414  const LWT_BE_TOPOLOGY* topo,
415  const LWT_ISO_EDGE* sel_edge, int sel_fields
416  );
417 
437  LWT_ISO_NODE* (*getNodeWithinBox2D) (
438  const LWT_BE_TOPOLOGY* topo,
439  const GBOX* box,
440  int* numelems, int fields, int limit
441  );
442 
462  LWT_ISO_EDGE* (*getEdgeWithinBox2D) (
463  const LWT_BE_TOPOLOGY* topo,
464  const GBOX* box,
465  int* numelems, int fields, int limit
466  );
467 
486  LWT_ISO_EDGE* (*getEdgeByNode) (
487  const LWT_BE_TOPOLOGY* topo,
488  const LWT_ELEMID* ids, int* numelems, int fields
489  );
490 
509  int (*updateNodes) (
510  const LWT_BE_TOPOLOGY* topo,
511  const LWT_ISO_NODE* sel_node, int sel_fields,
512  const LWT_ISO_NODE* upd_node, int upd_fields,
513  const LWT_ISO_NODE* exc_node, int exc_fields
514  );
515 
531  const LWT_BE_TOPOLOGY* topo,
532  LWT_ELEMID split_face, LWT_ELEMID new_face1, LWT_ELEMID new_face2
533  );
534 
548  int (*insertFaces) (
549  const LWT_BE_TOPOLOGY* topo,
550  LWT_ISO_FACE* faces,
551  int numelems
552  );
553 
566  const LWT_BE_TOPOLOGY* topo,
567  const LWT_ISO_FACE* faces, int numfaces
568  );
569 
570  /*
571  * Get the ordered list edge visited by a side walk
572  *
573  * The walk starts from the side of an edge and stops when
574  * either the max number of visited edges OR the starting
575  * position is reached. The output list never includes a
576  * duplicated signed edge identifier.
577  *
578  * It is expected that the walk uses the "next_left" and "next_right"
579  * attributes of ISO edges to perform the walk (rather than recomputing
580  * the turns at each node).
581  *
582  * @param topo the topology to operate on
583  * @param edge walk start position and direction:
584  * abs value identifies the edge, sign expresses
585  * side (left if positive, right if negative)
586  * and direction (forward if positive, backward if negative).
587  * @param numedges output parameter, gets the number of edges visited
588  * @param limit max edges to return (to avoid an infinite loop in case
589  * of a corrupted topology). 0 is for unlimited.
590  * The function is expected to error out if the limit is hit.
591  *
592  * @return an array of signed edge identifiers (positive edges being
593  * walked in their direction, negative ones in opposite) or
594  * NULL on error (@see lastErroMessage)
595  */
596  LWT_ELEMID* (*getRingEdges) (
597  const LWT_BE_TOPOLOGY* topo,
598  LWT_ELEMID edge, int *numedges, int limit
599  );
600 
615  const LWT_BE_TOPOLOGY* topo,
616  const LWT_ISO_EDGE* edges, int numedges,
617  int upd_fields
618  );
619 
640  LWT_ISO_EDGE* (*getEdgeByFace) (
641  const LWT_BE_TOPOLOGY* topo,
642  const LWT_ELEMID* ids, int* numelems, int fields,
643  const GBOX *box
644  );
645 
664  LWT_ISO_NODE* (*getNodeByFace) (
665  const LWT_BE_TOPOLOGY* topo,
666  const LWT_ELEMID* faces, int* numelems, int fields,
667  const GBOX *box
668  );
669 
684  const LWT_BE_TOPOLOGY* topo,
685  const LWT_ISO_NODE* nodes, int numnodes,
686  int upd_fields
687  );
688 
700  const LWT_BE_TOPOLOGY* topo,
701  const LWT_ELEMID* ids,
702  int numelems
703  );
704 
709  int (*topoGetSRID) (
710  const LWT_BE_TOPOLOGY* topo
711  );
712 
716  double (*topoGetPrecision) (
717  const LWT_BE_TOPOLOGY* topo
718  );
719 
724  int (*topoHasZ) (
725  const LWT_BE_TOPOLOGY* topo
726  );
727 
739  const LWT_BE_TOPOLOGY* topo,
740  const LWT_ELEMID* ids,
741  int numelems
742  );
743 
757  const LWT_BE_TOPOLOGY* topo,
758  LWT_ELEMID rem_edge,
759  LWT_ELEMID face_left,
760  LWT_ELEMID face_right
761  );
762 
778  const LWT_BE_TOPOLOGY* topo,
779  LWT_ELEMID face1, LWT_ELEMID face2, LWT_ELEMID newface
780  );
781 
803  const LWT_BE_TOPOLOGY* topo,
804  LWT_ELEMID rem_node,
805  LWT_ELEMID e1,
806  LWT_ELEMID e2
807  );
808 
825  const LWT_BE_TOPOLOGY* topo,
826  LWT_ELEMID edge1, LWT_ELEMID edge2, LWT_ELEMID newedge
827  );
828 
848  LWT_ISO_FACE* (*getFaceWithinBox2D) (
849  const LWT_BE_TOPOLOGY* topo,
850  const GBOX* box,
851  int* numelems, int fields, int limit
852  );
853 
855 
856 
865 
873 
876 
877 /********************************************************************
878  *
879  * End of BE interface
880  *
881  *******************************************************************/
882 
886 typedef enum LWT_TOPOERR_TYPE_T {
898 
900 typedef struct LWT_TOPOERR_T {
907 } LWT_TOPOERR;
908 
909 /*
910  * Topology functions
911  */
912 
918 
919 
920 /*******************************************************************
921  *
922  * Non-ISO signatures here
923  *
924  *******************************************************************/
925 
938 LWT_TOPOLOGY *lwt_CreateTopology(LWT_BE_IFACE *iface, const char *name,
939  int srid, double prec, int hasz);
940 
950 LWT_TOPOLOGY *lwt_LoadTopology(LWT_BE_IFACE *iface, const char *name);
951 
957 void lwt_DropTopology(LWT_TOPOLOGY* topo);
958 
963 void lwt_FreeTopology(LWT_TOPOLOGY* topo);
964 
975 LWT_ELEMID lwt_GetNodeByPoint(LWT_TOPOLOGY *topo, LWPOINT *pt, double tol);
976 
988 LWT_ELEMID lwt_GetEdgeByPoint(LWT_TOPOLOGY *topo, LWPOINT *pt, double tol);
989 
1002 LWT_ELEMID lwt_GetFaceByPoint(LWT_TOPOLOGY *topo, LWPOINT *pt, double tol);
1003 
1004 
1005 /*******************************************************************
1006  *
1007  * Topology population (non-ISO)
1008  *
1009  *******************************************************************/
1010 
1024 LWT_ELEMID lwt_AddPoint(LWT_TOPOLOGY* topo, LWPOINT* point, double tol);
1025 
1043 LWT_ELEMID* lwt_AddLine(LWT_TOPOLOGY* topo, LWLINE* line, double tol,
1044  int* nedges);
1045 
1064 LWT_ELEMID* lwt_AddPolygon(LWT_TOPOLOGY* topo, LWPOLY* poly, double tol,
1065  int* nfaces);
1066 
1067 /*******************************************************************
1068  *
1069  * ISO signatures here
1070  *
1071  *******************************************************************/
1072 
1082 void lwt_CreateTopoGeo(LWT_TOPOLOGY* topo, LWGEOM *geom);
1083 
1101  LWPOINT* pt, int skipChecks);
1102 
1115 int lwt_MoveIsoNode(LWT_TOPOLOGY* topo,
1116  LWT_ELEMID node, LWPOINT* pt);
1117 
1129 int lwt_RemoveIsoNode(LWT_TOPOLOGY* topo, LWT_ELEMID node);
1130 
1142 int lwt_RemIsoEdge(LWT_TOPOLOGY* topo, LWT_ELEMID edge);
1143 
1158  LWT_ELEMID startNode, LWT_ELEMID endNode,
1159  const LWLINE *geom);
1160 
1183  LWT_ELEMID start_node, LWT_ELEMID end_node,
1184  LWLINE *geom, int skipChecks);
1185 
1204  LWT_ELEMID start_node, LWT_ELEMID end_node,
1205  LWLINE *geom, int skipChecks);
1206 
1219 
1236 
1248 int lwt_ChangeEdgeGeom(LWT_TOPOLOGY* topo, LWT_ELEMID edge, LWLINE* curve);
1249 
1264 LWT_ELEMID lwt_ModEdgeSplit(LWT_TOPOLOGY* topo, LWT_ELEMID edge, LWPOINT* pt, int skipChecks);
1265 
1279 LWT_ELEMID lwt_NewEdgesSplit(LWT_TOPOLOGY* topo, LWT_ELEMID edge, LWPOINT* pt, int skipChecks);
1280 
1294 
1308 
1322 int lwt_GetFaceEdges(LWT_TOPOLOGY* topo, LWT_ELEMID face, LWT_ELEMID **edges);
1323 
1336 
1337 #endif /* LIBLWGEOM_TOPO_H */
enum LWT_TOPOERR_TYPE_T LWT_TOPOERR_TYPE
Topology errors type.
LWT_ELEMID face_left
LWT_ELEMID lwt_AddIsoNode(LWT_TOPOLOGY *topo, LWT_ELEMID face, LWPOINT *pt, int skipChecks)
Add an isolated node.
Definition: lwgeom_topo.c:529
void lwt_FreeBackendIface(LWT_BE_IFACE *iface)
Release memory associated with an LWT_BE_IFACE.
Definition: lwgeom_topo.c:71
LWT_SPATIALTYPE_T
LWT_ELEMID containing_face
struct LWT_TOPOERR_T LWT_TOPOERR
Topology error.
struct LWT_BE_CALLBACKS_T LWT_BE_CALLBACKS
Structure containing base backend callbacks.
LWT_ELEMID lwt_RemEdgeNewFace(LWT_TOPOLOGY *topo, LWT_ELEMID edge)
Remove an edge, possibly merging two faces (replacing both with a new one)
Definition: lwgeom_topo.c:4294
LWPOINT * geom
tuple data
Definition: ovdump.py:103
int(* checkTopoGeomRemEdge)(const LWT_BE_TOPOLOGY *topo, LWT_ELEMID rem_edge, LWT_ELEMID face_left, LWT_ELEMID face_right)
Check TopoGeometry objects before an edge removal event.
void lwt_iso_node_release(LWT_ISO_NODE *node)
int(* freeTopology)(LWT_BE_TOPOLOGY *topo)
Release memory associated to a backend topology.
LWT_ELEMID lwt_ModEdgeSplit(LWT_TOPOLOGY *topo, LWT_ELEMID edge, LWPOINT *pt, int skipChecks)
Split an edge by a node, modifying the original edge and adding a new one.
Definition: lwgeom_topo.c:1038
int(* updateFacesById)(const LWT_BE_TOPOLOGY *topo, const LWT_ISO_FACE *faces, int numfaces)
Update faces by id.
LWT_ELEMID lwt_GetEdgeByPoint(LWT_TOPOLOGY *topo, LWPOINT *pt, double tol)
Find the edge-id of an edge that intersects a given point.
Definition: lwgeom_topo.c:4794
int(* updateTopoGeomFaceHeal)(const LWT_BE_TOPOLOGY *topo, LWT_ELEMID face1, LWT_ELEMID face2, LWT_ELEMID newface)
Update TopoGeometry objects after healing two faces.
LWT_BE_IFACE * lwt_CreateBackendIface(const LWT_BE_DATA *data)
Create a new backend interface.
Definition: lwgeom_topo.c:57
int(* insertNodes)(const LWT_BE_TOPOLOGY *topo, LWT_ISO_NODE *nodes, int numelems)
Insert nodes.
LWLINE * geom
LWT_TOPOLOGY * lwt_LoadTopology(LWT_BE_IFACE *iface, const char *name)
Loads an existing topology by name from the database.
Definition: lwgeom_topo.c:497
LWT_ELEMID lwt_AddIsoEdge(LWT_TOPOLOGY *topo, LWT_ELEMID startNode, LWT_ELEMID endNode, const LWLINE *geom)
Add an isolated edge connecting two existing isolated nodes.
Definition: lwgeom_topo.c:789
LWGEOM * lwt_GetFaceGeometry(LWT_TOPOLOGY *topo, LWT_ELEMID face)
Return the geometry of a face.
Definition: lwgeom_topo.c:2828
int(* updateTopoGeomFaceSplit)(const LWT_BE_TOPOLOGY *topo, LWT_ELEMID split_face, LWT_ELEMID new_face1, LWT_ELEMID new_face2)
Update TopoGeometry objects after a face split event.
LWT_ELEMID lwt_NewEdgesSplit(LWT_TOPOLOGY *topo, LWT_ELEMID edge, LWPOINT *pt, int skipChecks)
Split an edge by a node, replacing it with two new edges.
Definition: lwgeom_topo.c:1195
LWT_ELEMID lwt_GetNodeByPoint(LWT_TOPOLOGY *topo, LWPOINT *pt, double tol)
Retrieve the id of a node at a point location.
Definition: lwgeom_topo.c:4759
Topology error.
int lwt_ChangeEdgeGeom(LWT_TOPOLOGY *topo, LWT_ELEMID edge, LWLINE *curve)
Changes the shape of an edge without affecting the topology structure.
Definition: lwgeom_topo.c:3268
LWT_ELEMID lwt_AddPoint(LWT_TOPOLOGY *topo, LWPOINT *point, double tol)
Adds a point to the topology.
Definition: lwgeom_topo.c:4991
LWT_ELEMID next_left
int(* updateNodes)(const LWT_BE_TOPOLOGY *topo, const LWT_ISO_NODE *sel_node, int sel_fields, const LWT_ISO_NODE *upd_node, int upd_fields, const LWT_ISO_NODE *exc_node, int exc_fields)
Update nodes selected by fields match/mismatch.
enum LWT_SPATIALTYPE_T LWT_SPATIALTYPE
int lwt_RemIsoEdge(LWT_TOPOLOGY *topo, LWT_ELEMID edge)
Remove an isolated edge.
Definition: lwgeom_topo.c:3749
LWT_ELEMID(* getNextEdgeId)(const LWT_BE_TOPOLOGY *topo)
Get next available edge identifier.
int(* deleteFacesById)(const LWT_BE_TOPOLOGY *topo, const LWT_ELEMID *ids, int numelems)
Delete faces by id.
int(* updateTopoGeomEdgeHeal)(const LWT_BE_TOPOLOGY *topo, LWT_ELEMID edge1, LWT_ELEMID edge2, LWT_ELEMID newedge)
Update TopoGeometry objects after healing two edges.
struct LWT_BE_DATA_T LWT_BE_DATA
Backend private data pointer.
LWT_ELEMID lwt_AddEdgeModFace(LWT_TOPOLOGY *topo, LWT_ELEMID start_node, LWT_ELEMID end_node, LWLINE *geom, int skipChecks)
Add a new edge possibly splitting a face (modifying it)
Definition: lwgeom_topo.c:2765
void lwt_CreateTopoGeo(LWT_TOPOLOGY *topo, LWGEOM *geom)
Populate an empty topology with data from a simple geometry.
LWT_ELEMID lwt_AddEdgeNewFaces(LWT_TOPOLOGY *topo, LWT_ELEMID start_node, LWT_ELEMID end_node, LWLINE *geom, int skipChecks)
Add a new edge possibly splitting a face (replacing with two new faces)
Definition: lwgeom_topo.c:2773
int(* insertEdges)(const LWT_BE_TOPOLOGY *topo, LWT_ISO_EDGE *edges, int numelems)
Insert edges.
int lwt_MoveIsoNode(LWT_TOPOLOGY *topo, LWT_ELEMID node, LWPOINT *pt)
Move an isolated node.
Definition: lwgeom_topo.c:3677
LWT_ELEMID(* getFaceContainingPoint)(const LWT_BE_TOPOLOGY *topo, const LWPOINT *pt)
Get face containing point.
int64_t LWT_INT64
int(* updateEdgesById)(const LWT_BE_TOPOLOGY *topo, const LWT_ISO_EDGE *edges, int numedges, int upd_fields)
Update edges by id.
LWT_ELEMID face_id
double(* topoGetPrecision)(const LWT_BE_TOPOLOGY *topo)
Get topology precision.
LWT_ELEMID face_right
uint8_t precision
Definition: cu_in_twkb.c:25
LWT_ELEMID elem1
Identifier of first affected element.
LWT_ELEMID lwt_NewEdgeHeal(LWT_TOPOLOGY *topo, LWT_ELEMID e1, LWT_ELEMID e2)
Merge two edges, replacing both with a new one.
Definition: lwgeom_topo.c:4753
LWT_ELEMID node_id
int(* deleteNodesById)(const LWT_BE_TOPOLOGY *topo, const LWT_ELEMID *ids, int numelems)
Delete nodes by id.
LWT_ELEMID lwt_GetFaceByPoint(LWT_TOPOLOGY *topo, LWPOINT *pt, double tol)
Find the face-id of a face containing a given point.
Definition: lwgeom_topo.c:4850
int(* insertFaces)(const LWT_BE_TOPOLOGY *topo, LWT_ISO_FACE *faces, int numelems)
Insert faces.
LWT_ELEMID edge_id
LWT_ELEMID lwt_ModEdgeHeal(LWT_TOPOLOGY *topo, LWT_ELEMID e1, LWT_ELEMID e2)
Merge two edges, modifying the first and deleting the second.
Definition: lwgeom_topo.c:4747
int(* topoHasZ)(const LWT_BE_TOPOLOGY *topo)
Get topology Z flag.
void lwt_DropTopology(LWT_TOPOLOGY *topo)
Drop a topology and all its associated objects from the database.
int(* updateTopoGeomEdgeSplit)(const LWT_BE_TOPOLOGY *topo, LWT_ELEMID split_edge, LWT_ELEMID new_edge1, LWT_ELEMID new_edge2)
Update TopoGeometry objects after an edge split event.
LWT_ELEMID * lwt_AddLine(LWT_TOPOLOGY *topo, LWLINE *line, double tol, int *nedges)
Adds a linestring to the topology.
Definition: lwgeom_topo.c:5590
struct LWT_BE_TOPOLOGY_T LWT_BE_TOPOLOGY
Topology handler.
LWT_TOPOLOGY * lwt_CreateTopology(LWT_BE_IFACE *iface, const char *name, int srid, double prec, int hasz)
Initializes a new topology.
LWT_TOPOERR_TYPE err
Type of error.
int lwt_RemoveIsoNode(LWT_TOPOLOGY *topo, LWT_ELEMID node)
Remove an isolated node.
Definition: lwgeom_topo.c:3718
int(* checkTopoGeomRemNode)(const LWT_BE_TOPOLOGY *topo, LWT_ELEMID rem_node, LWT_ELEMID e1, LWT_ELEMID e2)
Check TopoGeometry objects before a node removal event.
Structure containing base backend callbacks.
int lwt_GetFaceEdges(LWT_TOPOLOGY *topo, LWT_ELEMID face, LWT_ELEMID **edges)
Return the list of directed edges bounding a face.
Definition: lwgeom_topo.c:3049
int(* deleteEdges)(const LWT_BE_TOPOLOGY *topo, const LWT_ISO_EDGE *sel_edge, int sel_fields)
Delete edges.
LWT_ELEMID start_node
void lwt_BackendIfaceRegisterCallbacks(LWT_BE_IFACE *iface, const LWT_BE_CALLBACKS *cb)
Register backend callbacks into the opaque iface handler.
Definition: lwgeom_topo.c:65
LWT_ELEMID next_right
int(* updateEdges)(const LWT_BE_TOPOLOGY *topo, const LWT_ISO_EDGE *sel_edge, int sel_fields, const LWT_ISO_EDGE *upd_edge, int upd_fields, const LWT_ISO_EDGE *exc_edge, int exc_fields)
Update edges selected by fields match/mismatch.
LWT_INT64 LWT_ELEMID
Identifier of topology element.
LWT_ELEMID end_node
LWT_ELEMID lwt_RemEdgeModFace(LWT_TOPOLOGY *topo, LWT_ELEMID edge)
Remove an edge, possibly merging two faces (replacing one with the other)
Definition: lwgeom_topo.c:4288
int(* topoGetSRID)(const LWT_BE_TOPOLOGY *topo)
Get topology SRID.
LWT_ELEMID * lwt_AddPolygon(LWT_TOPOLOGY *topo, LWPOLY *poly, double tol, int *nfaces)
Adds a polygon to the topology.
Definition: lwgeom_topo.c:5842
int(* updateNodesById)(const LWT_BE_TOPOLOGY *topo, const LWT_ISO_NODE *nodes, int numnodes, int upd_fields)
Update nodes by id.
void lwt_FreeTopology(LWT_TOPOLOGY *topo)
Release memory associated with an LWT_TOPOLOGY.
Definition: lwgeom_topo.c:519
LWT_ELEMID elem2
Identifier of second affected element (0 if inapplicable)
This library is the generic geometry handling section of PostGIS.
LWT_TOPOERR_TYPE_T
Topology errors type.