Find the edge-id of an edge that intersects a given point.
4696{
4698 uint64_t num, i;
4702
4704 {
4706 return -1;
4707 }
4709 if (num == UINT64_MAX)
4710 {
4712 return -1;
4713 }
4714 for (i=0; i<num;++i)
4715 {
4717#if 0
4719 double dist;
4720
4722 {
4725 " has null geometry", e->
edge_id);
4726 continue;
4727 }
4728
4729
4730
4733 if ( dist > tol ) continue;
4734#endif
4735
4736 if ( id )
4737 {
4739 lwerror(
"Two or more edges found");
4740 return -1;
4741 }
4743 }
4744
4746
4747 return id;
4748}
LWGEOM * lwpoint_as_lwgeom(const LWPOINT *obj)
double lwgeom_mindistance2d_tolerance(const LWGEOM *lw1, const LWGEOM *lw2, double tolerance)
Function handling min distance calculations and dwithin calculations.
LWGEOM * lwline_as_lwgeom(const LWLINE *obj)
LWT_INT64 LWT_ELEMID
Identifier of topology element.
#define LWT_COL_EDGE_EDGE_ID
Edge fields.
#define LWT_COL_EDGE_GEOM
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
void lwnotice(const char *fmt,...)
Write a notice out to the notice handler.
const char * lwt_be_lastErrorMessage(const LWT_BE_IFACE *be)
LWT_ISO_EDGE * lwt_be_getEdgeWithinDistance2D(LWT_TOPOLOGY *topo, LWPOINT *pt, double dist, uint64_t *numelems, int fields, int64_t limit)
static void _lwt_release_edges(LWT_ISO_EDGE *edges, int num_edges)
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
const LWT_BE_IFACE * be_iface