MCPcopy Create free account
hub / github.com/MapServer/MapServer / osShapeBounds

Function osShapeBounds

maporaclespatial.c:1282–1308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1280}
1281
1282static void osShapeBounds ( shapeObj *shp )
1283{
1284 int i, f;
1285
1286 if ( (shp->numlines > 0) && (shp->line[0].numpoints > 0) )
1287 {
1288 shp->bounds.minx = shp->line[0].point[0].x;
1289 shp->bounds.maxx = shp->line[0].point[0].x;
1290 shp->bounds.miny = shp->line[0].point[0].y;
1291 shp->bounds.maxy = shp->line[0].point[0].y;
1292 }
1293
1294 for ( i = 0 ; i < shp->numlines; i++)
1295 {
1296 for( f = 0; f < shp->line[i].numpoints; f++)
1297 {
1298 if (shp->line[i].point[f].x < shp->bounds.minx)
1299 shp->bounds.minx = shp->line[i].point[f].x;
1300 if (shp->line[i].point[f].x > shp->bounds.maxx)
1301 shp->bounds.maxx = shp->line[i].point[f].x;
1302 if (shp->line[i].point[f].y < shp->bounds.miny)
1303 shp->bounds.miny = shp->line[i].point[f].y;
1304 if (shp->line[i].point[f].y > shp->bounds.maxy)
1305 shp->bounds.maxy = shp->line[i].point[f].y;
1306 }
1307 }
1308}
1309
1310static void osCloneShape(shapeObj *shape, shapeObj *newshape, int data3d, int data4d)
1311{

Calls

no outgoing calls

Tested by

no test coverage detected