PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ lw_dist3d_line_poly()

int lw_dist3d_line_poly ( const LWLINE line,
const LWPOLY poly,
DISTPTS3D dl 
)

line to polygon calculation

Definition at line 837 of file measures3d.c.

838{
839 PLANE3D plane;
840 LWDEBUG(2, "lw_dist3d_line_poly is called");
841
842 if (dl->mode == DIST_MAX)
843 return lw_dist3d_ptarray_ptarray(line->points, poly->rings[0], dl);
844
845 /* if polygon does not define a plane: Return distance line to line */
846 if (!define_plane(poly->rings[0], &plane))
847 return lw_dist3d_ptarray_ptarray(line->points, poly->rings[0], dl);
848
849 return lw_dist3d_ptarray_poly(line->points, poly, &plane, dl);
850}
#define LWDEBUG(level, msg)
Definition lwgeom_log.h:101
int lw_dist3d_ptarray_ptarray(const POINTARRAY *l1, const POINTARRAY *l2, DISTPTS3D *dl)
Finds all combinations of segments between two pointarrays.
int define_plane(const POINTARRAY *pa, PLANE3D *pl)
int lw_dist3d_ptarray_poly(const POINTARRAY *pa, const LWPOLY *poly, PLANE3D *plane, DISTPTS3D *dl)
Computes pointarray to polygon distance.
#define DIST_MAX
Definition measures.h:43
POINTARRAY * points
Definition liblwgeom.h:483
POINTARRAY ** rings
Definition liblwgeom.h:519

References define_plane(), DIST_MAX, lw_dist3d_ptarray_poly(), lw_dist3d_ptarray_ptarray(), LWDEBUG, DISTPTS3D::mode, LWLINE::points, and LWPOLY::rings.

Referenced by lw_dist3d_distribute_bruteforce().

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