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

◆ lw_dist2d_tri_circstring()

int lw_dist2d_tri_circstring ( LWTRIANGLE tri,
LWCIRCSTRING line,
DISTPTS dl 
)

Definition at line 946 of file measures.c.

947{
949 if (ptarray_contains_point(tri->points, pt) != LW_OUTSIDE && dl->mode == DIST_MIN)
950 {
951 lw_dist2d_distpts_set(dl, 0.0, pt, pt);
952 return LW_TRUE;
953 }
954
955 return lw_dist2d_ptarray_ptarrayarc(tri->points, line->points, dl);
956}
#define LW_TRUE
Return types for functions with status returns.
Definition liblwgeom.h:93
int ptarray_contains_point(const POINTARRAY *pa, const POINT2D *pt)
The following is based on the "Fast Winding Number Inclusion of a Point in a Polygon" algorithm by Da...
Definition ptarray.c:755
#define LW_OUTSIDE
static void lw_dist2d_distpts_set(DISTPTS *dl, double distance, const POINT2D *p1, const POINT2D *p2)
Definition measures.c:81
int lw_dist2d_ptarray_ptarrayarc(const POINTARRAY *pa, const POINTARRAY *pb, DISTPTS *dl)
Test each segment of pa against each arc of pb for distance.
Definition measures.c:1246
static const POINT2D * lw_curvering_getfirstpoint2d_cp(LWGEOM *geom)
Definition measures.c:883
#define DIST_MIN
Definition measures.h:44
int mode
Definition measures.h:54
POINTARRAY * points
Definition liblwgeom.h:507
POINTARRAY * points
Definition liblwgeom.h:495

References DIST_MIN, lw_curvering_getfirstpoint2d_cp(), lw_dist2d_distpts_set(), lw_dist2d_ptarray_ptarrayarc(), LW_OUTSIDE, LW_TRUE, DISTPTS::mode, LWTRIANGLE::points, LWCIRCSTRING::points, and ptarray_contains_point().

Referenced by lw_dist2d_distribute_bruteforce().

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