Oracle® Spatial Topology and Network Data Models 10g Release 1 (10.1) Part Number B10828-01 |
|
|
View PDF |
This chapter describes operators that you can use with Spatial topology data. For the current release, the only topology operator implemented is SDO_ANYINTERACT.
To use any topology operator, you must understand the following:
The conceptual information about topology in Chapter 1
The information about Spatial operators in Oracle Spatial User's Guide and Reference
Table 5-1 lists the topology operators.
Table 5-1 Topology Operators
Function | Description |
---|---|
SDO_ANYINTERACT |
Checks if any geometries in a topology geometry layer have the ANYINTERACT topological relationship with a specified topology geometry layer. |
The rest of this chapter provides reference information about this operator.
Format
SDO_ANYINTERACT(tg1, tg2);
Description
Checks if any geometries in a topology geometry layer have the ANYINTERACT topological relationship with a specified topology geometry layer.
Keywords and Parameters
Value | Description |
---|---|
tg1 | Specifies a topology geometry layer. The topology geometry column must be spatially indexed. Data type is SDO_TOPO_GEOMETRY. |
tg2 | Specifies either a topology geometry layer or a spatial geometry layer. (It cannot be a transient instance of a topology geometry layer specified using a bind variable or SDO_TOPO_GEOMETRY constructor.) Data type is SDO_TOPO_GEOMETRY or SDO_GEOMETRY. |
Returns
The expression SDO_ANYINTERACT(tg1,tg2) = 'TRUE' evaluates to TRUE
for object pairs that have the ANYINTERACT topological relationship, and FALSE
otherwise.
Usage Notes
See the Usage Notes for the SDO_RELATE operator in Oracle Spatial User's Guide and Reference.
Examples
The following example finds all street geometries that have the ANYINTERACT relationship with the land parcel named P3. (The examples for SDO_ANYINTERACT use the data from Example 1-8 in Section 1.11.)
SELECT c.feature_name FROM city_streets c, land_parcels l WHERE l.feature_name = 'P3' AND SDO_ANYINTERACT (c.feature, l.feature) = 'TRUE';FEATURE_NAME ------------------------------ R1
The following example finds all land parcel geometries that have the ANYINTERACT relationship with the traffic sign named S1.
SELECT l.feature_name FROM land_parcels l, traffic_signs t WHERE t.feature_name = 'S1' AND SDO_ANYINTERACT (l.feature, t.feature) = 'TRUE'; FEATURE_NAME ------------------------------ P1 P2
The following example finds all street geometries that have the ANYINTERACT relationship with a query window.
SQL> SELECT c.feature_name FROM city_streets c WHERE 2 SDO_ANYINTERACT( 3 c.feature, 4 SDO_GEOMETRY(2003, NULL, NULL, 5 SDO_ELEM_INFO_ARRAY(1, 1003, 3), 6 SDO_ORDINATE_ARRAY(5,5, 30,40))) 7 = 'TRUE'; FEATURE_NAME ------------------------------ R1 R3 R4