** Returns a list of inner rings for ring r in shape (given a list of outer rings). */
| 269 | ** Returns a list of inner rings for ring r in shape (given a list of outer rings). |
| 270 | */ |
| 271 | int *msGetInnerList(shapeObj *shape, int r, int *outerlist) |
| 272 | { |
| 273 | int i; |
| 274 | int *list; |
| 275 | |
| 276 | list = (int *)malloc(sizeof(int)*shape->numlines); |
| 277 | MS_CHECK_ALLOC(list, sizeof(int)*shape->numlines, NULL); |
| 278 | |
| 279 | for(i=0; i<shape->numlines; i++) { /* test all rings against the ring */ |
| 280 | |
| 281 | if(outerlist[i] == MS_TRUE) { /* ring is an outer and can't be an inner */ |
| 282 | list[i] = MS_FALSE; |
| 283 | continue; |
| 284 | } |
| 285 | |
| 286 | list[i] = msPointInPolygon(&(shape->line[i].point[0]), &(shape->line[r])); |
| 287 | } |
| 288 | |
| 289 | return(list); |
| 290 | } |
| 291 | |
| 292 | /* |
| 293 | ** Add point to a line object. |
no test coverage detected