How to get the x and y coordinates from sdo_geomerty for a point >SORTED
690787Nov 18 2009 — edited Nov 20 2009Hi all
a very noob question:
I have a table with points with their point geometry in sdo_geometry column called shape. I can see their coordinates like this:
SQL> select shape from g090151_00_p where rownum<10;
SHAPE(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
--------------------------------------------------------------------------------
SDO_GEOMETRY(2001, NULL, SDO_POINT_TYPE(34.643089, 31.507509, NULL), NULL, NULL)
SDO_GEOMETRY(2001, NULL, SDO_POINT_TYPE(34.657799, 31.515909, NULL), NULL, NULL)
SQL>
Is there a way to select only the x and y coordinates so I get this:
34.643089, 31.507509
34.657799, 31.515909
Thanks a lot
FOUND IT:
get a point's X,Y values
select p.SHAPE.SDO_POINT.X, p.SHAPE.SDO_POINT.Y from randompoints p
Edited by: garnet on Nov 18, 2009 10:11 AM
Edited by: garnet on Nov 18, 2009 10:24 AM