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

Function osRectangle

maporaclespatial.c:1417–1450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1415}
1416
1417static void osRectangle(msOracleSpatialHandler *hand, shapeObj *shape, SDOGeometryObj *obj, int start, int end, lineObj points, pointObj *pnt, int data3d, int data4d)
1418{
1419 int n;
1420
1421 if (data3d)
1422 n = msOCIGet3DOrdinates( hand, obj, start, end, pnt ); /* n must be < 5 */
1423 else if (data4d)
1424 n = msOCIGet4DOrdinates( hand, obj, start, end, pnt ); /* n must be < 5 */
1425 else
1426 n = msOCIGet2DOrdinates( hand, obj, start, end, pnt ); /* n must be < 5 */
1427
1428 if (n == 2)
1429 {
1430 shape->type = MS_SHAPE_POLYGON;
1431 points.numpoints = 5;
1432 points.point = pnt;
1433
1434 /* point5 [0] & [1] contains the lower-left and upper-right points of the rectangle */
1435 pnt[2] = pnt[1];
1436 pnt[1].x = pnt[0].x;
1437 pnt[3].x = pnt[2].x;
1438 pnt[3].y = pnt[0].y;
1439 pnt[4] = pnt[0];
1440#ifdef USE_POINT_Z_M
1441 if (data3d||data4d)
1442 {
1443 pnt[1].z = pnt[0].z;
1444 pnt[3].z = pnt[2].z;
1445 }
1446#endif /* USE_POINT_Z_M */
1447
1448 msAddLine( shape, &points );
1449 }
1450}
1451
1452static void osCircle(msOracleSpatialHandler *hand, shapeObj *shape, SDOGeometryObj *obj, int start, int end, lineObj points, pointObj *pnt, int data3d, int data4d)
1453{

Callers 1

osGetOrdinatesFunction · 0.85

Calls 4

msOCIGet3DOrdinatesFunction · 0.85
msOCIGet4DOrdinatesFunction · 0.85
msOCIGet2DOrdinatesFunction · 0.85
msAddLineFunction · 0.85

Tested by

no test coverage detected