get ordinates from SDO buffer */
| 800 | |
| 801 | /* get ordinates from SDO buffer */ |
| 802 | static 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 | |
| 830 | static int msOCIGet3DOrdinates( msOracleSpatialHandler *hand, SDOGeometryObj *obj, int s, int e, pointObj *pt ) |
| 831 | { |
no test coverage detected