Sdo filter

From Wikivyuka
Revision as of 07:22, 22 March 2012 by Dur30 (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Dotaz na interakci prostorové složky z tabulky cola_markets a dotazovacího okna. (zde obdélník)

SELECT c.mkt_id, c.name
FROM cola_markets c
WHERE SDO_FILTER(c.shape,
SDO_GEOMETRY(2003, NULL, NULL,
SDO_ELEM_INFO_ARRAY(1,1003,3),
SDO_ORDINATE_ARRAY(4,6, 8,8))
) = 'TRUE';

Obdélník, kterým zjišťujeme jakoukoli interakci (v podstatě "dotazovací okénko") je možné zadat jako další geometrii - pak ji i ve stejné vrstvě uvidíme v GeoRaptoru.

INSERT INTO cola_markets VALUES(
1122,
'pokusny',
SDO_GEOMETRY(2003, NULL, NULL,
SDO_ELEM_INFO_ARRAY(1,1003,3),
SDO_ORDINATE_ARRAY(4,6, 8,8)
));