MCPcopy Index your code
hub / github.com/MapServer/MapServer / msIntersectPointPolygon

Function msIntersectPointPolygon

mapsearch.c:221–231  ·  view source on GitHub ↗

** Instead of using ring orientation we count the number of parts the ** point falls in. If odd the point is in the polygon, if 0 or even ** then the point is in a hole or completely outside. */

Source from the content-addressed store, hash-verified

219** then the point is in a hole or completely outside.
220*/
221int msIntersectPointPolygon(pointObj *point, shapeObj *poly) {
222 int i;
223 int status=MS_FALSE;
224
225 for(i=0; i<poly->numlines; i++) {
226 if(msPointInPolygon(point, &poly->line[i]) == MS_TRUE) /* ok, the point is in a line */
227 status = !status;
228 }
229
230 return(status);
231}
232
233int msIntersectMultipointPolygon(shapeObj *multipoint, shapeObj *poly) {
234 int i,j;

Callers 8

msRasterQueryByRectLowFunction · 0.85
msIntersectPolygonsFunction · 0.85
msDistanceShapeToShapeFunction · 0.85
msPolygonLabelPointFunction · 0.85
shapeObj_containsFunction · 0.85

Calls 1

msPointInPolygonFunction · 0.85

Tested by

no test coverage detected