PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ lwt_edgeEndStar_getNextCCW()

const LWT_EDGEEND* lwt_edgeEndStar_getNextCCW ( LWT_EDGEEND_STAR star,
LWT_ISO_EDGE edge,
int  outgoing 
)

Definition at line 198 of file lwt_edgeend_star.c.

199 {
201 
202  uint64_t i=0;
203  LWT_EDGEEND *thisEdgeEnd = NULL;
204  for ( i=0; i<star->numEdgeEnds; ++i )
205  {
206  LWT_EDGEEND *ee = star->edgeEnds[i];
207  if ( ee->edge == edge && ee->outgoing == outgoing ) {
208  thisEdgeEnd = ee;
209  break;
210  }
211  }
212  if ( ! thisEdgeEnd ) {
213  lwerror("Could not find %s edge %" LWTFMT_ELEMID " in the star",
214  outgoing ? "outgoing" : "incoming", edge->edge_id);
215  return NULL;
216  }
217  LWT_EDGEEND *nextEdgeEnd = i > 0 ? star->edgeEnds[i-1] : star->edgeEnds[star->numEdgeEnds-1];
218  return nextEdgeEnd;
219 }
#define LWTFMT_ELEMID
void void lwerror(const char *fmt,...) __attribute__((format(printf
Write a notice out to the error handler.
static void lwt_edgeEndStar_ensureSorted(LWT_EDGEEND_STAR *star)
LWT_EDGEEND ** edgeEnds
const LWT_ISO_EDGE * edge
Definition: lwt_edgeend.h:33
LWT_ELEMID edge_id

References LWT_EDGEEND_t::edge, LWT_ISO_EDGE::edge_id, LWT_EDGEEND_STAR_t::edgeEnds, lwerror(), lwt_edgeEndStar_ensureSorted(), LWTFMT_ELEMID, LWT_EDGEEND_STAR_t::numEdgeEnds, and LWT_EDGEEND_t::outgoing.

Referenced by _lwt_SnapEdgeToExistingNode().

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