Find the edge-id of an edge that intersects a given point.
4864{
4866 uint64_t num, i;
4870
4872 {
4874 return -1;
4875 }
4877 if (num == UINT64_MAX)
4878 {
4880 return -1;
4881 }
4882 for (i=0; i<num;++i)
4883 {
4885#if 0
4887 double dist;
4888
4890 {
4893 " has null geometry", e->
edge_id);
4894 continue;
4895 }
4896
4897
4898
4901 if ( dist > tol ) continue;
4902#endif
4903
4904 if ( id )
4905 {
4907 lwerror(
"Two or more edges found");
4908 return -1;
4909 }
4911 }
4912
4914
4915 return id;
4916}
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
#define PGTOPO_BE_ERROR()
void lwnotice(const char *fmt,...) __attribute__((format(printf
Write a notice out to the notice handler.
void void lwerror(const char *fmt,...) __attribute__((format(printf
Write a notice out to the error handler.
LWT_ISO_EDGE * lwt_be_getEdgeWithinDistance2D(LWT_TOPOLOGY *topo, const LWPOINT *pt, double dist, uint64_t *numelems, int fields, int64_t limit)
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)