PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ _lwt_GetIsoNode()

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

Definition at line 3682 of file lwgeom_topo.c.

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().

3683 {
3684  LWT_ISO_NODE *node;
3685  int n = 1;
3686 
3687  node = lwt_be_getNodeById( topo, &nid, &n, LWT_COL_NODE_CONTAINING_FACE );
3688  if ( n < 0 ) {
3689  lwerror("Backend error: %s", lwt_be_lastErrorMessage(topo->be_iface));
3690  return 0;
3691  }
3692  if ( n < 1 ) {
3693  lwerror("SQL/MM Spatial exception - non-existent node");
3694  return 0;
3695  }
3696  if ( node->containing_face == -1 )
3697  {
3698  lwfree(node);
3699  lwerror("SQL/MM Spatial exception - not isolated node");
3700  return 0;
3701  }
3702 
3703  return node;
3704 }
#define LWT_COL_NODE_CONTAINING_FACE
LWT_ELEMID containing_face
void lwfree(void *mem)
Definition: lwutil.c:244
const LWT_BE_IFACE * be_iface
LWT_ISO_NODE * lwt_be_getNodeById(LWT_TOPOLOGY *topo, const LWT_ELEMID *ids, int *numelems, int fields)
Definition: lwgeom_topo.c:156
const char * lwt_be_lastErrorMessage(const LWT_BE_IFACE *be)
Definition: lwgeom_topo.c:120
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190
Here is the call graph for this function:
Here is the caller graph for this function: