DH UN << (D
m MM
Te UC
P$ MEETS-PART !
iff (P$ MEETS ]) AND
(BOUNDARY(P8) OVERLAPS | )
MEETS-0 MEETS-1
Figrue 4. Two specific cases of the MEETS relation.
pg1 MEETS-0 pg2
iff (pg1 MEETS pg2) AND
(BOUNDARY(pg1) MEETS
BOUNDARY(p¢2))
pg1 MEETS-1 pg2
‘sa 3b 4a 4b iff (pel MEETS pg2) AND
(BOUNDARY(pg1) OVERLAPS
BOUNDARY(pe2))
Figure 3. Topological relations between a line and a polygon.
The relation 3a is described by the operator E E
6. Spatial queries
S COS T SK el )AND Suppose that a spatial database consists of three
(BOUNDARY(3) OVERLAPS 1 ) spatial relations:
: : Towns(Pt:POINT,
and the relation 3b is detected by the operator Name: TEXT,
Population:INTEGER)
P$ BOUND-COVERS |
iff (pg COVERS 1) AND Roads(Li:LINE,
(BOUNDARY(/8) COVERS 1) Class:INTEGER,
No:INTEGER)
The relations in group 4 can be respectively
distinguished by the operators ENTERS and Provinces(Pg:POLYGON,
PASSING defined as Name: TEXT,
Population:INTEGER)
l ENTERS P8 :
iff (Pg OVERLAPS 1) AND Here, POINT, LINE and POLYGON are spatial data
(P$ CONTAINS SP()) OR pres
GS CONTAINS EPOD Query 1: Find towns inside province B passed by
second class roads.
I PASSING pg
iff (PS OVERLAPS /) AND Roads2 «- *(a:Roads,b:Provinces)
(P8 DISJOINT SP(]))) AND WHERE[(a.Class = 2) AND
(P$ DISJOINT EP()) (b.Name = 'B') AND
((b.Pg OVERLAPS a.Li) OR
Example 7: Operators for checking topological (b.Pg COVERS a.Li) OR
relations between two polygons pgl and pg2. (b.Pg CONTAINS a.Li))]
All the topological relations in table 1 are defined as [Lia li Noa Nok
fund 1
undamental operators for two polygons. Two Towns1 <- *(a:Towns,b:Provinces)
polygons, however, can meet, cover, or overlap in WHERE[(b.Name = 'B') AND
different ways. These specific relationships can be (b.Pg CONTAINS a.Pt)]
distinguished by combinations of fundamental
operators and other predefined operators and [Pt:a. Pt, Name:a.Name,
functions. The following is the meets-0 and meets-1 Population:a.Population];
examples (Figure 4).
Towns2 <- *(a:Towns1,b:Roads2)
WHERE[b.Li COVERS a.Pt]
[Pt:a.Pt,Name:a.Name,
Population:a.Population];
277