Definition at line 740 of file ptarray.c.
751 if ( check_closed && !
p2d_same(seg1, seg2) )
752 lwerror(
"ptarray_contains_point called on unclosed ring");
754 for ( i=1; i < pa->
npoints; i++ )
759 if ( seg1->
x == seg2->
x && seg1->
y == seg2->
y )
769 if ( pt->
y > ymax || pt->
y < ymin )
791 if ( (side < 0) && (seg1->
y <= pt->
y) && (pt->
y < seg2->
y) )
801 else if ( (side > 0) && (seg2->
y <= pt->
y) && (pt->
y < seg1->
y) )
810 if ( winding_number )
811 *winding_number = wn;
const POINT2D * getPoint2d_cp(const POINTARRAY *pa, uint32_t n)
Returns a POINT2D pointer into the POINTARRAY serialized_ptlist, suitable for reading from.
#define LW_INSIDE
Constants for point-in-polygon return values.
int lw_pt_in_seg(const POINT2D *P, const POINT2D *A1, const POINT2D *A2)
Returns true if P is between A1/A2.
int lw_segment_side(const POINT2D *p1, const POINT2D *p2, const POINT2D *q)
lw_segment_side()
int p2d_same(const POINT2D *p1, const POINT2D *p2)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
References FP_MAX, FP_MIN, getPoint2d_cp(), LW_BOUNDARY, LW_INSIDE, LW_OUTSIDE, lw_pt_in_seg(), lw_segment_side(), lwerror(), POINTARRAY::npoints, p2d_same(), POINT2D::x, and POINT2D::y.
Referenced by _lwt_AddPoint(), _lwt_CheckEdgeCrossing(), lwcompound_contains_point(), lwt_ChangeEdgeGeom(), and ptarray_contains_point().