search all the segments of pointarray to see which one is closest to p1 Returns minimum distance between point and pointarray
Definition at line 1134 of file measures.c.
1141 LWDEBUG(2,
"lw_dist2d_pt_ptarray enter");
1146 LWDEBUGF(2,
"lw_dist2d_pt_ptarray: distance from first point ? : %.15g", dl->
distance);
1148 for (uint32_t t = 1; t < pa->
npoints; t++)
1155 LWDEBUGF(2,
"lw_dist2d_pt_ptarray: distance from seg %lu ? : %.15g", t, dl->
distance);
#define LW_TRUE
Return types for functions with status returns.
#define LWDEBUG(level, msg)
#define LWDEBUGF(level, msg,...)
static const POINT2D * getPoint2d_cp(const POINTARRAY *pa, uint32_t n)
Returns a POINT2D pointer into the POINTARRAY serialized_ptlist, suitable for reading from.
int lw_dist2d_pt_seg(const POINT2D *p, const POINT2D *A, const POINT2D *B, DISTPTS *dl)
lw_dist2d_comp from p to line A->B This one is now sending every occasion to lw_dist2d_pt_pt Before i...
int lw_dist2d_pt_pt(const POINT2D *thep1, const POINT2D *thep2, DISTPTS *dl)
Compares incoming points and stores the points closest to each other or most far away from each other...
References DIST_MIN, DISTPTS::distance, getPoint2d_cp(), lw_dist2d_pt_pt(), lw_dist2d_pt_seg(), LW_FALSE, LW_TRUE, LWDEBUG, LWDEBUGF, DISTPTS::mode, POINTARRAY::npoints, DISTPTS::tolerance, and DISTPTS::twisted.
Referenced by lw_dist2d_point_line(), lw_dist2d_point_poly(), and lw_dist2d_point_tri().