|
Returns the maximum value for the specified ordinate (dimension) of the minimum bounding rectangle of a geometry object. |
|
Returns the minimum value for the specified ordinate (dimension) of the minimum bounding rectangle of a geometry object. |
利用以上兩個 Function 可利用 Geometry Column 得到所要的四角座標
使用方法
SDO_GEOM.SDO_MAX_MBR_ORDINATE(
[geom] IN SDO_GEOMETRY,
[ordinate_pos] IN NUMBER
) RETURN NUMBER;
說明
[geom] - Geometry Column
[ordinate_pos] - 坐標位置; 1 即是 X; 2 即是 Y
使用範例
SDO_GEOM.SDO_MAX_MBR_ORDINATE(geo, 1);
SDO_GEOM.SDO_MIN_MBR_ORDINATE 使用方法一樣
取得四角坐標範例
SELECT
SDO_GEOM.SDO_MIN_MBR_ORDINATE(a.geom, 1) as XMIN,
SDO_GEOM.SDO_MIN_MBR_ORDINATE(a.geom, 2) as YMIN,
SDO_GEOM.SDO_MAX_MBR_ORDINATE(a.geom, 1) as XMAX,
SDO_GEOM.SDO_MAX_MBR_ORDINATE(a.geom, 2) as YMAX
from TABLE a
SDO_GEOM.SDO_MIN_MBR_ORDINATE(a.geom, 2) as YMIN,
SDO_GEOM.SDO_MAX_MBR_ORDINATE(a.geom, 1) as XMAX,
SDO_GEOM.SDO_MAX_MBR_ORDINATE(a.geom, 2) as YMAX
from TABLE a
參考網址
文章標籤
全站熱搜
