10.12.2012 Views

Oracle Spatial User's Guide and Reference - InfoLab

Oracle Spatial User's Guide and Reference - InfoLab

Oracle Spatial User's Guide and Reference - InfoLab

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Examples<br />

SDO_TOUCH<br />

The following example finds geometries that have the TOUCH relationship with a<br />

query window (here, a rectangle with lower-left, upper-right coordinates 1,1, 5,7).<br />

(The example uses the definitions <strong>and</strong> data described in Section 2.1 <strong>and</strong> illustrated<br />

in Figure 2–1.) In this example, only cola_b has the TOUCH relationship with the<br />

query window geometry.<br />

SELECT c.mkt_id, c.name<br />

FROM cola_markets c<br />

WHERE SDO_TOUCH(c.shape,<br />

SDO_GEOMETRY(2003, NULL, NULL,<br />

SDO_ELEM_INFO_ARRAY(1,1003,3),<br />

SDO_ORDINATE_ARRAY(1,1, 5,7))<br />

) = 'TRUE';<br />

FROM cola_markets c<br />

MKT_ID NAME<br />

---------- --------------------------------<br />

2 cola_b<br />

<strong>Spatial</strong> Operators 12-45

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!