PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ lw_dist2d_point_line()

int lw_dist2d_point_line ( LWPOINT point,
LWLINE line,
DISTPTS dl 
)

point to line calculation

Definition at line 605 of file measures.c.

606 {
607  const POINT2D *p = getPoint2d_cp(point->point, 0);
608  return lw_dist2d_pt_ptarray(p, line->points, dl);
609 }
static const POINT2D * getPoint2d_cp(const POINTARRAY *pa, uint32_t n)
Returns a POINT2D pointer into the POINTARRAY serialized_ptlist, suitable for reading from.
Definition: lwinline.h:91
int lw_dist2d_pt_ptarray(const POINT2D *p, POINTARRAY *pa, DISTPTS *dl)
search all the segments of pointarray to see which one is closest to p1 Returns minimum distance betw...
Definition: measures.c:1129
POINTARRAY * points
Definition: liblwgeom.h:469
POINTARRAY * point
Definition: liblwgeom.h:457

References getPoint2d_cp(), lw_dist2d_pt_ptarray(), LWPOINT::point, and LWLINE::points.

Referenced by lw_dist2d_distribute_bruteforce().

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