2 Replies Latest reply: Dec 14, 2012 12:39 PM by tobonale RSS

    How to get all the values of the SDO_ORDINATE_ARRAY of a Oriented Point

    tobonale
      Hi,

      I'm trying to get the values of a Geometry wich is an Oriented Point. To that, i'm using SDO_UTIL.GETVERTICES, but this utility only obtains the point X,Y, it doesn't obtain the values of the orientation vector.

      The Geometry is this:
      MDSYS.SDO_GEOMETRY(
           2001,8307,NULL,
           MDSYS.SDO_ELEM_INFO_ARRAY(1,1,1,3,1,0),
           MDSYS.SDO_ORDINATE_ARRAY(-75.586088632813272,6.1794352615514194,0.57278169530235967,-0.81970795380217887,0)
      )

      The query is this:
      SELECT c.ipid, c.nombre, t.X, t.Y, t.Z, t.W
      FROM Hidrantes c,
      TABLE(SDO_UTIL.GETVERTICES(c.geometria)) t
      where c.ipid = 4691117
      ORDER BY c.ipid, t.id;

      Result:
      4691117          -75,5860886328133     6,17943526155142          (null) (null)

      As you can see, it only obtains the X,Y values but not the values of the orientation vector, how can I get the values?.

      Thanks in advance
        • 1. Re: How to get all the values of the SDO_ORDINATE_ARRAY of a Oriented Point
          NoelKhan
          Tobonale,

          Sql-Only approaches:

          *[1] Return Oridinate Array*

          Append .SDO_ORDINATES to your geometry object or column name:
          SELECT MDSYS.SDO_GEOMETRY(
               2001,8307,NULL,
               MDSYS.SDO_ELEM_INFO_ARRAY(1,1,1,3,1,0),
               MDSYS.SDO_ORDINATE_ARRAY(-75.586088632813272,6.1794352615514194,0.57278169530235967,-0.81970795380217887,0)
          ).SDO_ORDINATES
          FROM dual
          Result:
          SDO_ORDINATE_ARRAY(-75.586089, 6.17943526, .572781695, -.81970795, 0)
          *[2] Return Flattened Oradinate Array*
          SELECT * FROM 
          TABLE (
               MDSYS.SDO_GEOMETRY(
               2001,8307,NULL,
               MDSYS.SDO_ELEM_INFO_ARRAY(1,1,1,3,1,0),
               MDSYS.SDO_ORDINATE_ARRAY(-75.586088632813272,6.1794352615514194,0.57278169530235967,-0.81970795380217887,0)).SDO_ORDINATES
          )
          Result:
            -75.586089
            6.17943526
            .572781695
            -.81970795
                     0
          Regards,
          Noel
          • 2. Re: How to get all the values of the SDO_ORDINATE_ARRAY of a Oriented Point
            tobonale
            Thank you very much Noel, it works perfect