25.04.2013 Views

View PDF

View PDF

View PDF

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Examples<br />

Related Topics<br />

Figure 24–3 SDO_GEOM.SDO_INTERSECTION<br />

SDO_GEOM.SDO_INTERSECTION<br />

An exception is raised if geom1 and geom2 are based on different coordinate systems.<br />

The following example returns a geometry object that is the topological intersection<br />

(AND operation) of cola_a and cola_c. (The example uses the definitions and data<br />

from Section 2.1.)<br />

-- Return the topological intersection of two geometries.<br />

SELECT SDO_GEOM.SDO_INTERSECTION(c_a.shape, c_c.shape, 0.005)<br />

FROM cola_markets c_a, cola_markets c_c<br />

WHERE c_a.name = 'cola_a' AND c_c.name = 'cola_c';<br />

SDO_GEOM.SDO_INTERSECTION(C_A.SHAPE,C_C.SHAPE,0.005)(SDO_GTYPE, SDO_SRID, SDO_PO<br />

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

SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARR<br />

AY(4, 5, 3, 3, 5, 3, 5, 5, 4, 5))<br />

Note that in the returned polygon, the SDO_ORDINATE_ARRAY starts and ends at<br />

the same point (4, 5).<br />

■ SDO_GEOM.SDO_DIFFERENCE<br />

■ SDO_GEOM.SDO_UNION<br />

■ SDO_GEOM.SDO_XOR<br />

geom1<br />

geom2<br />

SDO_GEOM Package (Geometry) 24-25

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

Saved successfully!

Ooh no, something went wrong!