PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ lwt_nodeEdges_loadFromDB()

LWT_NODE_EDGES* lwt_nodeEdges_loadFromDB ( LWT_TOPOLOGY topo,
LWT_ELEMID  node_id,
int  fields 
)

Definition at line 44 of file lwt_node_edges.c.

45 {
46  LWT_NODE_EDGES *star = lwalloc(sizeof(LWT_NODE_EDGES));
47  star->numEdges = 1;
48  /* Get incident edges */
49  star->edges = lwt_be_getEdgeByNode( topo, &node_id, &(star->numEdges), fields );
50  if (star->numEdges == UINT64_MAX)
51  {
53  lwfree(star);
54  return NULL;
55  }
56  star->fields = fields;
57  return star;
58 }
void lwfree(void *mem)
Definition: lwutil.c:248
void * lwalloc(size_t size)
Definition: lwutil.c:227
LWT_ISO_EDGE * lwt_be_getEdgeByNode(LWT_TOPOLOGY *topo, const LWT_ELEMID *ids, uint64_t *numelems, int fields)
Definition: lwgeom_topo.c:227
#define PGTOPO_BE_ERROR()
LWT_ISO_EDGE * edges

References LWT_NODE_EDGES_t::edges, LWT_NODE_EDGES_t::fields, lwalloc(), lwfree(), lwt_be_getEdgeByNode(), LWT_NODE_EDGES_t::numEdges, and PGTOPO_BE_ERROR.

Referenced by _lwt_SnapEdgeToExistingNode().

Here is the call graph for this function:
Here is the caller graph for this function: