852 lwerror(
"ptarrayarc_contains_point called with even number of points");
859 lwerror(
"ptarrayarc_contains_point called too-short pointarray");
866 if ( check_closed && !
p2d_same(seg1, seg3) )
868 lwerror(
"ptarrayarc_contains_point called on unclosed ring");
887 else if ( d < radius )
899 for ( i=1; i < pa->
npoints; i += 2 )
924 if ( (pt->
x > gbox.
xmax || pt->
x < gbox.
xmin) &&
934 if ( (side == 0) &&
lw_pt_in_arc(pt, seg1, seg2, seg3) )
940 if ( side < 0 && (seg1->
y <= pt->
y) && (pt->
y < seg3->
y) )
946 if ( side > 0 && (seg3->
y <= pt->
y) && (pt->
y < seg1->
y) )
952 if ( pt->
x <= gbox.
xmax && pt->
x >= gbox.
xmin )
978 if ( winding_number )
979 *winding_number = wn;
int lw_arc_calculate_gbox_cartesian_2d(const POINT2D *A1, const POINT2D *A2, const POINT2D *A3, GBOX *gbox)
double distance2d_pt_pt(const POINT2D *p1, const POINT2D *p2)
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.
double lw_arc_center(const POINT2D *p1, const POINT2D *p2, const POINT2D *p3, POINT2D *result)
Determines the center of the circle defined by the three given points.
int lw_arc_side(const POINT2D *A1, const POINT2D *A2, const POINT2D *A3, const POINT2D *Q)
int lw_arc_is_pt(const POINT2D *A1, const POINT2D *A2, const POINT2D *A3)
Returns true if arc A is actually a point (all vertices are the same) .
int lw_pt_in_arc(const POINT2D *P, const POINT2D *A1, const POINT2D *A2, const POINT2D *A3)
Returns true if P is on the same side of the plane partition defined by A1/A3 as A2 is.
int p2d_same(const POINT2D *p1, const POINT2D *p2)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.