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

Function msGetInnerList

mapprimitive.c:271–290  ·  view source on GitHub ↗

** Returns a list of inner rings for ring r in shape (given a list of outer rings). */

Source from the content-addressed store, hash-verified

269** Returns a list of inner rings for ring r in shape (given a list of outer rings).
270*/
271int *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.

Callers 6

processShpxyTagFunction · 0.85
gmlWriteGeometry_GML2Function · 0.85
gmlWriteGeometry_GML3Function · 0.85
msOGRWriteShapeFunction · 0.85
msSOSAddGeometryNodeFunction · 0.85

Calls 1

msPointInPolygonFunction · 0.85

Tested by

no test coverage detected