Definition at line 281 of file lwalgorithm.c.
290 if ( memcmp(first, last,
sizeof(
POINT2D)) )
292 lwerror(
"pt_in_ring_2d: V[n] != V[0] (%g %g != %g %g)",
293 first->
x, first->
y, last->
x, last->
y);
298 LWDEBUGF(2,
"pt_in_ring_2d called with point: %g %g", p->
x, p->
y);
303 for (i=0; i<ring->
npoints-1; i++)
312 ((v1->
y <= p->
y) && (v2->
y > p->
y))
314 || ((v1->
y > p->
y) && (v2->
y <= p->
y))
318 vt = (double)(p->
y - v1->
y) / (v2->
y - v1->
y);
321 if (p->
x < v1->
x + vt * (v2->
x - v1->
x))
330 LWDEBUGF(3,
"pt_in_ring_2d returning %d", cn&1);
const POINT2D * getPoint2d_cp(const POINTARRAY *pa, uint32_t n)
Returns a POINT2D pointer into the POINTARRAY serialized_ptlist, suitable for reading from.
#define LWDEBUGF(level, msg,...)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
References getPoint2d_cp(), LW_FALSE, LWDEBUGF, lwerror(), POINTARRAY::npoints, POINT2D::x, and POINT2D::y.