PostGIS  2.1.10dev-r@@SVN_REVISION@@
int lw_dist3d_line_poly ( LWLINE line,
LWPOLY poly,
DISTPTS3D dl 
)

line to polygon calculation

Definition at line 460 of file measures3d.c.

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

Referenced by lw_dist3d_distribute_bruteforce().

461 {
462  PLANE3D plane;
463  LWDEBUG(2, "lw_dist3d_line_poly is called");
464 
465  if (dl->mode == DIST_MAX)
466  {
467  return lw_dist3d_ptarray_ptarray(line->points, poly->rings[0], dl);
468  }
469 
470  if(!define_plane(poly->rings[0], &plane))
471  return LW_FALSE;
472 
473  return lw_dist3d_ptarray_poly(line->points, poly,&plane, dl);
474 }
#define DIST_MAX
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:50
#define LW_FALSE
Definition: liblwgeom.h:52
POINTARRAY ** rings
Definition: liblwgeom.h:413
int mode
Definition: measures3d.h:29
int define_plane(POINTARRAY *pa, PLANE3D *pl)
Here we define the plane of a polygon (boundary pointarray of a polygon) the plane is stored as a pon...
Definition: measures3d.c:923
int lw_dist3d_ptarray_ptarray(POINTARRAY *l1, POINTARRAY *l2, DISTPTS3D *dl)
Finds all combinationes of segments between two pointarrays.
Definition: measures3d.c:630
int lw_dist3d_ptarray_poly(POINTARRAY *pa, LWPOLY *poly, PLANE3D *plane, DISTPTS3D *dl)
Computes pointarray to polygon distance.
Definition: measures3d.c:840
POINTARRAY * points
Definition: liblwgeom.h:378

Here is the call graph for this function:

Here is the caller graph for this function: