PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ _lwt_GetIsoNode()

static LWT_ISO_NODE* _lwt_GetIsoNode ( LWT_TOPOLOGY topo,
LWT_ELEMID  nid 
)
static

Definition at line 3536 of file lwgeom_topo.c.

3537 {
3538  LWT_ISO_NODE *node;
3539  int n = 1;
3540 
3541  node = lwt_be_getNodeById( topo, &nid, &n, LWT_COL_NODE_CONTAINING_FACE );
3542  if ( n < 0 ) {
3543  lwerror("Backend error: %s", lwt_be_lastErrorMessage(topo->be_iface));
3544  return 0;
3545  }
3546  if ( n < 1 ) {
3547  lwerror("SQL/MM Spatial exception - non-existent node");
3548  return 0;
3549  }
3550  if ( node->containing_face == -1 )
3551  {
3552  lwfree(node);
3553  lwerror("SQL/MM Spatial exception - not isolated node");
3554  return 0;
3555  }
3556 
3557  return node;
3558 }
void lwfree(void *mem)
Definition: lwutil.c:244
#define LWT_COL_NODE_CONTAINING_FACE
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190
const char * lwt_be_lastErrorMessage(const LWT_BE_IFACE *be)
Definition: lwgeom_topo.c:120
LWT_ISO_NODE * lwt_be_getNodeById(LWT_TOPOLOGY *topo, const LWT_ELEMID *ids, int *numelems, int fields)
Definition: lwgeom_topo.c:156
LWT_ELEMID containing_face
const LWT_BE_IFACE * be_iface

References LWT_TOPOLOGY_T::be_iface, LWT_ISO_NODE::containing_face, lwerror(), lwfree(), lwt_be_getNodeById(), lwt_be_lastErrorMessage(), and LWT_COL_NODE_CONTAINING_FACE.

Referenced by lwt_MoveIsoNode(), and lwt_RemoveIsoNode().

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