| 262 | } |
| 263 | |
| 264 | int msIntersectPolylinePolygon(shapeObj *line, shapeObj *poly) { |
| 265 | int i; |
| 266 | |
| 267 | /* STEP 1: polygon might competely contain the polyline or one of it's parts (only need to check one point from each part) */ |
| 268 | for(i=0; i<line->numlines; i++) { |
| 269 | if(msIntersectPointPolygon(&(line->line[i].point[0]), poly) == MS_TRUE) /* this considers holes and multiple parts */ |
| 270 | return(MS_TRUE); |
| 271 | } |
| 272 | |
| 273 | /* STEP 2: look for intersecting line segments */ |
| 274 | if (msIntersectPolylines(line, poly) == MS_TRUE) |
| 275 | return (MS_TRUE); |
| 276 | |
| 277 | return(MS_FALSE); |
| 278 | } |
| 279 | |
| 280 | int msIntersectPolygons(shapeObj *p1, shapeObj *p2) { |
| 281 | int i; |
no test coverage detected