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

Function msOCIGet2DOrdinates

maporaclespatial.c:802–828  ·  view source on GitHub ↗

get ordinates from SDO buffer */

Source from the content-addressed store, hash-verified

800
801/* get ordinates from SDO buffer */
802static int msOCIGet2DOrdinates( msOracleSpatialHandler *hand, SDOGeometryObj *obj, int s, int e, pointObj *pt )
803{
804 double x, y;
805 int i, n, success = 1;
806 boolean exists;
807 OCINumber *oci_number;
808
809 for( i=s, n=0; i < e && success; i+=2, n++ )
810 {
811 success = TRY( hand,
812 OCICollGetElem( hand->envhp, hand->errhp, (OCIColl *)obj->ordinates, (sb4)i, (boolean *)&exists, (dvoid *)&oci_number, (dvoid **)0 ) )
813 && TRY( hand,
814 OCINumberToReal( hand->errhp, oci_number, (uword)sizeof(double), (dvoid *)&x ) )
815 && TRY( hand,
816 OCICollGetElem( hand->envhp, hand->errhp, (OCIColl *)obj->ordinates, (sb4)i+1, (boolean *)&exists, (dvoid *)&oci_number, (dvoid **)0 ) )
817 && TRY( hand,
818 OCINumberToReal( hand->errhp, oci_number, (uword)sizeof(double), (dvoid *)&y ) );
819
820 if (success)
821 {
822 pt[n].x = x;
823 pt[n].y = y;
824 }
825 }
826
827 return success ? n : 0;
828}
829
830static int msOCIGet3DOrdinates( msOracleSpatialHandler *hand, SDOGeometryObj *obj, int s, int e, pointObj *pt )
831{

Callers 6

osPointClusterFunction · 0.85
osPointFunction · 0.85
osClosedPolygonFunction · 0.85
osRectangleFunction · 0.85
osCircleFunction · 0.85
osArcPolygonFunction · 0.85

Calls 1

TRYFunction · 0.85

Tested by

no test coverage detected