PostGIS  2.5.0dev-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 597 of file measures3d.c.

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

Referenced by lw_dist3d_distribute_bruteforce().

598 {
599  POINT3DZ p;
600  POINTARRAY *pa = line->points;
601  LWDEBUG(2, "lw_dist3d_point_line is called");
602 
603  getPoint3dz_p(point->point, 0, &p);
604  return lw_dist3d_pt_ptarray(&p, pa, dl);
605 }
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:83
POINTARRAY * point
Definition: liblwgeom.h:413
int getPoint3dz_p(const POINTARRAY *pa, uint32_t n, POINT3DZ *point)
Definition: lwgeom_api.c:205
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:714
POINTARRAY * points
Definition: liblwgeom.h:424
Here is the call graph for this function:
Here is the caller graph for this function: