Definition at line 742 of file ptarray.c.
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 lwcompound_contains_point(), and ptarray_contains_point().
753 if ( check_closed && !
p2d_same(seg1, seg2) )
754 lwerror(
"ptarray_contains_point called on unclosed ring");
756 for ( i=1; i < pa->
npoints; i++ )
761 if ( seg1->
x == seg2->
x && seg1->
y == seg2->
y )
771 if ( pt->
y > ymax || pt->
y < ymin )
793 if ( (side < 0) && (seg1->
y <= pt->
y) && (pt->
y < seg2->
y) )
803 else if ( (side > 0) && (seg2->
y <= pt->
y) && (pt->
y < seg1->
y) )
812 if ( winding_number )
813 *winding_number = wn;
int p2d_same(const POINT2D *p1, const POINT2D *p2)
const POINT2D * getPoint2d_cp(const POINTARRAY *pa, int 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()
void lwerror(const char *fmt,...)
Write a notice out to the error handler.