如何将geom拆分为lat

时间:2017-02-16 13:03:04

标签: sql oracle

我有一个包含列GEOM的表,数据如下所示

Geom

MDSYS.SDO_GEOMETRY(2001,32638,MDSYS.SDO_POINT_TYPE(732321.244349674,2669885.06999747,NULL),NULL,NULL)
MDSYS.SDO_GEOMETRY(2001,32638,MDSYS.SDO_POINT_TYPE(732561.034224563,2671216.49530935,NULL),NULL,NULL)
MDSYS.SDO_GEOMETRY(2001,32638,MDSYS.SDO_POINT_TYPE(732420.714474628,2671059.35918443,NULL),NULL,NULL)

我想查看上面的数据,如下所示

LAT_LONG
732321.244349674,2669885.06999747
732561.034224563,2671216.49530935
732420.714474628,2671059.35918443

1 个答案:

答案 0 :(得分:0)

您可以从geometry.sdo_point.x和y获取值。

Select table_alias.geometry_column.sdo_point.x,
       table_alias.geometry_column.sdo_point.y
from your_table as table_alias;

或者你问的形式:

 Select table_alias.geometry_column.sdo_point.x||','||
           table_alias.geometry_column.sdo_point.y as lat_long
    from your_table as table_alias;