PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ lw_dist3d_point_line()

int lw_dist3d_point_line ( LWPOINT point,
LWLINE line,
DISTPTS3D dl 
)

point to line calculation

Definition at line 600 of file measures3d.c.

References getPoint3dz_p(), lw_dist3d_pt_ptarray(), LWDEBUG, LWPOINT::point, and LWLINE::points.

Referenced by lw_dist3d_distribute_bruteforce().

601 {
602  POINT3DZ p;
603  POINTARRAY *pa = line->points;
604  LWDEBUG(2, "lw_dist3d_point_line is called");
605 
606  getPoint3dz_p(point->point, 0, &p);
607  return lw_dist3d_pt_ptarray(&p, pa, dl);
608 }
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:83
POINTARRAY * point
Definition: liblwgeom.h:411
int getPoint3dz_p(const POINTARRAY *pa, int n, POINT3DZ *point)
Definition: lwgeom_api.c:214
int lw_dist3d_pt_ptarray(POINT3DZ *p, POINTARRAY *pa, DISTPTS3D *dl)
search all the segments of pointarray to see which one is closest to p Returns distance between point...
Definition: measures3d.c:740
POINTARRAY * points
Definition: liblwgeom.h:422
Here is the call graph for this function:
Here is the caller graph for this function: