I I II' !\ .p,l.e. S(~li(";
The.; A.P.I.c. SERlliS (;('I/I' /(/{ I~di/()/s: M . .I. R. SII;\VEand I. C. WAND
N l llld ...
51 downloads
1530 Views
79MB Size
Report
This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
Report copyright / DMCA form
I I II' !\ .p,l.e. S(~li(";
The.; A.P.I.c. SERlliS (;('I/I' /(/{ I~di/()/s: M . .I. R. SII;\VEand I. C. WAND
N l llld )(' r I. Some COllllllcrcii.d !\utocodcs. !\
Study·l. t:: I.. Willey. A. d'Ag!.S . I C()nllIl CIT i;d sjlali:d informati on sys te ms software exa mpl es 461 1'.) :;.2 N,iI ili nal ca rtographi c dat abases 467 1 ' .(' Iss lI e,' in rcprese ntati o ns and conceptual mo dellin g 468 12,(,. I Met ,-1 . I Spatial referencin g of hyperd ocuments I h -1 ,2 Spati al queries for ret ri ev ing h yperm ap nodes 11> .-1 ..1 E ncoding hyper map spatial references by Pea no relati o ns I il.4 .4 R-trees and map pyramid s
Ifl .'.! .) Navigation in hypermaps If, " ,') '"111n ;lry I" I, I tihl iogr'lphy
557
S58 559
562
563
507
569
57 1
573
575
576
576
577
578
581
582
583
584
586
586
589
590
592
'l.Iplc ' l 17
I'
Spat ial Knowledge: Intelligent spatial information
systems
I 'j'nwdrLis intellige nt spatial info rmation sys tems I I j I, "III record-orient ed to obj ec t-oriented databases 1/ ..2. I Rati ona le and object i ves 1 7 , ~ . 2 Classes , subclasses and instances 17.2 .3 Attributes and data types 1/.2.4 Inh eritancc 11. 2..) Links between cla sses and instance s 2.(, Methods I lIi1i za tion for geomatics i ' ( )h iccl-ori ented databases and spatial information sys tems I J , \ II ificial intelli ge nce and expert sys tems 11. -' . 1 F , 1 Inference engin e
I / S -I Metarules 1/ (, " 1':lli;Ji knowledge representatio n I I /) , I Spat ial facts
I / 11 , .2 Spatial relations 11 .. 1 Spatia l meta rule s I I (" ,1 Fuzzy spat ial knowl edge I I II , ~ Spa ti al knowledge from logica l deduction
1/ (,,(, Spat ial knowledge derived from numerical formulae
594
594
595
597
600
600
601
604
604
607
6 12
6 12
6 13
6 14
614
616
617
6 18
620
621
62 1
022
624
626
628
630
63 1
632
635
639
639
641
642
644
644
645
645
646
646
646
648
( (l1I/"/,h XIV
17 .6.7 I-:x'llnples 0\ spdi"d pi ()cess represe ntation 17 .6.K Visual k'Hlwlctil,!.e enc()ding 17.6.9 Examples in s paii ~d kn()wledge e nginee ring 17.7 Spatial reasoning in spa lial infurrnation sys tems 17.7.1 Learning possibilities 17.7.2 Logico-ded uctive and spatial reasoning 17.7.3 Example of districting 17.8 Summary 179 Bibliography
AFTERWORD i NDEX
reface
649
651 653 657 658 659 660 665 667
671
673
II " ,. IHHlk came about because the physical separation of the two authors lit e Atlantic Ocean was a surmountable space in the pursuit of a IrI ," 172, 173, 17.4,17 .5 , 17.6, 17.7, l7.8 , 17.9, 1725,17.26, and 1/ ;, ', Tilese se minars were deliv e red under the auspices of the European , " "lllIlIlily Programme on Cooperation between Universiti es and III.!II',II V (COMETT) , and organized by Nicos Polydorides of the I 1 II I ': I ~ il y of Patras , Greece. 1IIIlllIgllOlit this book we refe r to several commercial products and 11 1111 I,d go ve rnment products. Our mention does not constitute an I lill" l ~ l' IlICl1t, or, indeed, the opposite, a refutation ; we refer to the ite ms dlil ~ lldti()ns of different a ppro ac hes or concepts. Even though some . 1" .111 ', IIl c l1tioncd may soon be out of date, we arc not concerned with 11 !' ld, 11I~ 'l l(;llion speciflcs of the so ftware; we offer the exa mples so that I . ,,1" 1, ,': 111 relate somewhat more easily to the practical world. We I Iii I t' lil:lt the progress mad e by many software , and other, companies I I ill" p:lc.t decad e is one of the cxciting aspects of spatial information I f 111 \.
\ 1'1( ' is d trademark for th e software of the company APIC Systemes, .1 .., uilsidiary of Lyonnaise des Eaux, Pari s, France. \ I, ( I I N N ) is a rcgistered trademark , and ARC/INFO NETWORK ,lI ld ;lI?CIINFO TIN arc trademarks of the Environmental Systems I ~\'''' ~'drch Institute, Inc., Redlands, California , USA. ESRI is the 1' ) 'i slCred co mpany name. I II (. i.., thc abbreviation for th e official name of the Digital Line (;I :lpll data of the US Geological Survey, R esto n, Virginia, USA. I I, 'I!H·..,d:IY Disks are a reso urce produced by the British Broadcasting ( "I poration , London, UK. i. ii I I 11 )( M C is the acronym for the official name of the G eographic II .",' h ie /Dual Indepe ndent Map Encoding compute r system and ,I,iI:lil;ISC of the US Census Bureau , Washington, DC , USA. f t! \/\'{ 'ONE is the name of software marke ted by Se rviologic, i '''').',(1I1, USA. 11 ( )/ ,, ( ) t , is a trad e mark for software of G e neration 5 Technology, III, , We stminster, Colorado, USA. f i I ( I\' /I '.'W is the name of a database design created at th e I I I 1',llllIlc nt of Geography, University of Edinburgh, UK. I iI~ I I\ I S i,s a trademark for software of GIMMS Ltd. , Edinburgh, '., "11,11((1 , UK.
XXII
1\, {,n"w{" '/I" "II}('llh
\If., jI )\ \ Ji 'I 1.1:1 ' II/I 'J! [',
xxiii
GIRAS is the official )WIlIC or tlte (ieographic Information Resources Analysis System or the US (;cologieal Survey, Reston , Virginia. GRASS is the official name for the Geographic Resources Analysis Support System created by the US Army Construction Engineering Research Laboratory, Champaign , Illinois, USA. GTV is a trademark for the videodisk resource produced by the National Geographic Society, Washington, DC, USA HBDS is a data structure devised by Fran is ;, II ;1
f-
x
L.U
ct:
o z
u..
II ..' "
".v'!:P' . I
I '
.!> ~ H"
.
:i iJ.i
:
'I ' J v/ ~
1
.g 5. E~n~
- ':.-,1,
~ ;~'-"
.'~ .; ::
:-
:;~~ ;;::'
~ ~;~
!,- . ~ ,:-: •• : , ';_1
..... ~'
::-~
.
~
~~o~:;E -5~ V> ~~~ :::l~i5.o.uo.
='
~_ ,_ c::
("!j
'11
V'"J
0> g
'" u
0
>-.
~~ .c 0>
.......
vEu~~.c
~ Q.) s;..- .~
~ ~-5 ~.~:s
"""
u::::
,~
~ .c ,g,g
n
I,
0..
oQ)Q)~-o"'"
." ,
,
)
--:
..
V>
c::
0.. ""0
'"
E
0>
~
~
'"
-'-'
....; 6 . . . . ~
· .9
C:H-.o~..c
Ec
.. ~'O
0>00>- 0 > " , 0
~.~ ~ c:: f:l ~ c::.co ;3'':::.n
0>'- '"
(" /
'" -
'" g. VJ 0 ,~ E E -0 0 ~2--:' ~ ~u.. co VJ 0
'I ' ",:, ~
.' '..
~c;; _...l;:: t.n c:: c.n" t.n c:: ~ ~ v >-.';::; U
i\~I (~ I~
.
~ .~ &-0.":
~ro~5:C~ (1) ~c::~.:;l-g~
;:J::
'C
Because the different domains of use of automated spatial information systems have particular needs, it appears at a general level that there are many, perhaps too many, commercial software systems or theoretical models to establish principles or order. The language confusion that can, and does, arise from the use of similar tools in different fields, in part a reflection of the development of the contemporary information systems from different roots over a twenty-five year history, adds to the difficulties in understanding, evaluating, and discussing these automated
spatial data with names such as:
'I , II
]'1
• ~ : .. " 'I
'1
I:
.
II "
~ -.......,I
00 U'V) C ..0 ;{j ~::l tVJ .V) H~-
o>'~
roc...c .......
..... -
\C
>.
~ :::2'"
'-Cl-<
.....l 0.",C:: 0 - '" 0
E'- 13 c:: 0> E'~ (;; v>
... 0 ;>
~~'28~U)~
:s .£. ~ l-< G 0 ~ .~ ro ~ _~ _ (l)' oj
~~ 5.2)
1-;'=
w~
~c
ClI ,g
.::~
"
Ceomatics 14
Assuming that national legislation allows ve hicles to carry visual display devices to aid in thi s task , then imagine a small television display screen at the front of the vehicle. The monitor shows a detailed map of part of the city, with a blinking cursor identifying the vehicle location (Figure 1.8). The screen also has a small-scale map inset for a much larger area. A destination address or eve n place name is entered by some means , and the on-board computer determines a good route to get to that d estination . Assuming that national laws allow drive rs to activate video displays while vehicles move , as the vehicle moves a long streets , the map changes, showing only features necessa ry to help in the driving task, for example by signalling when a turn should be made, and identifying temporary barri e rs like road works. Rather than co nsider the electronic d ev ices needed - a nd th ey all exist today _ let us focus on the data require ments (White , 1987). We need coordinate inform a tion to draw detailed maps revealing the shapes of the roads along which a journey might be m ade . We need to know street addresses , names of locations , possibly important features that can be used in a landmark oriented guidance system, and street names (recognizing that in some countries one street can have many names). Some ancillary data, like the existence of traffic works, might be helpful in choosing a route, or knowing the aver age trave l times. Also , it will be important to know if and how particular streets are connected , in order to indicate the sequence from origin to destination o r for determining how
15
and where to make a turn. Some filtering tools will be necessary for prod uctidn of the right kinds of map for assisting the navigator , for not all dcta ils are needed for following a pa rticular route. Many data ite ms, appropriat~ s tructured, are thus needed for effective and efficient (timely responses to the user) vehicular based way-finding. Consider, nex t, a research problem: analysing the impact o f the pattern of land uses of a landscape on th e amount of chemical nutrients Ih a t are disc hargcd into streams (Fi gure 1. 9). Sin gle event o r long-te rm p,ltterns of precipitation create conditions of oversurface wash , channel i/,ltion , seepage and underground flow . The amount and speed of exodu s 111/0 the river o r stream channe ls is affected by many factors includin g ~ I ()pe angle , soil perm ea bility , underground hydrology and type of wgctation (for exa mple, forested or not) . It is therefore importa nt to 1i ;lvc information abo ut re la tive elevations, surface g radients a nd aspects , ;IIHI the sequence of land uses along the rive r courses. It may also be Ill"Ccssary to know what is under the surface , in case so me underground d r: linage causes flows to bypass the study area . To dea l effectively with Ilie ,lJl a lysis may necessitate certain kinds of data structuring; not simply Illl' Clcquisition of information.
.
l5l}
Cinemas
YOU
are
HERE
~
Heterogeneity of uses
~OME)
~Inset
Barriers
map for larger area
Base map
"'i~lIn' 1.1\ Mal' loob
r(11
w; ly-lilltlilll~.·
The route is:
I "'f':"
,...
I">.J
~
~
.
",.
.f137~:a"
., Agricultural
production
FiJ.:llre 1.9 A view of overland \lows. A simplified diagram showing slllLlce and suilsllrL,cc condil iOlls allcclillg overland flow of water :1I1t1 othel maltcr. (11;lscd Oil a diil gJ"il lll originally in Haber and Sch;lIkr , cilcd ill ('h;IJl\cl 2. illld 1'1I"li.-; Il('l1I ;IIIY lIalion;d frontier.
(b)
Figure 1.10 A toolbox approach. (a) The toolbox concept. (b) Different use r needs for data in a shared database. (Figure I. IOb is a Slightly modified version of an original diagram of the Environmental Systems Resea rch Institute, Inc. , Redl a nds, California. The diagram is lIsed with the permission of that company.) (Ii rhe information system may be oriented to producing information,
1'(' lll aps in th e form of maps or tables, for subsequent study. PrOducts
111. 11' he detailed mars for rub/ic brichng purposes in a re-zoning case, Or
li lol l' hI.' Ihc C()mp/elc sct of possihle roulcs through a city street system.
W/I:ill'vcr rhe mediulll, Ihe ourpul is designed for furth e r study, is
/'1111' 1:lIly eXlcllsivc ;111(1 is II()I desig llcd lor ililillCdiil(c consumption. In i " "r':lsI, Ihe quny IIIOdc PI'OVilil- , quick n '.'pOIl,\CS to highly focused 1/111 ''' lioIiS If'; II :lI/y i,1I rhe 101'll! (II :-; 111 :111 :1111111111/" or ill/OI'lIl;llioll.
III providillg I!J L""L' (':IP:lhilll ;,' ,\ I" ril l' 11' 1(' 1, rhl' "' p;IIi;1I ili/(IJIIl ;llioll
I he role of automation
Geomatics
18
systems must, at a general level of detail , fulfil the following:
1. Provide tools for the creation of digital representations of the spatial
phenomena, that is, data acquisition and encoding.
2. Handle and secure these encodings efficiently, by providing tools for
editing, updating, managing and storing; for reorganization or
conversion of data from one form to another, and for verifying and
validating those data. 3. Foster the easy development of additional insight into theoretical or applied problems, by providing tools for information browsing, querying, summarizing and the like: that is to say, facilities for
!orester, politician). Then the information subsystem itself has a physical component (the hardware and data encodings), the documentation component describing the characteristics of the spatial information system , alTd the guid a nce component (the person who looks after the database and tools , and solves malfunctions). Consequently , beyond a general level of the domain of the use of spatial information systems, we can begin to appreciate differences in lerms of General purposes Themes of information Types of data Particular tools Specific processing requirements Specific forms of data organization
analysis, simulation and synthesis. 4. Assist the task of spatial reasoning, by providing for efficient retrieval of data for complex queries.
5. Create people compatible output in varied forms of printed table , plotted map, picture, scientific graph and the like. In a sense, the spatial information system lies within a larger framework of information requirements of the human world (Figure 1.11). Just as the plumbing system in a house has se parate but functionally related wate r, odour and waste subsystems monitored by the householder with the aid of a se t of plans (or the map in the plumber's head) , so there are physical, informational and guidance systems for phenomena at large. In a spatial information system context, there is the component of observable phenomena, the component of 'knowledge' about those phenomena , and the component of guidance (the planner,
PHYSICAL SUBSYSTEM
- transportation - hydrology - buildings
/
1
Physical subsystem
/
Information subsystem
INFORMATION SUBSYSTEM V
/ ......
Guidance subsystem
...... .......
- documentation - database manager
~
1,:1. 2 The physical components
/\ sp.
* * *
Spacing 01 administrative centres
Size 01 barrier islands
Network distances
*
(a)
Iran
Neighbours
Cognitive map
a nd spati al re lations- (a) Figure 2.4 Some types of measure me nts kinds of ph e no mena. (b) Ex amples of measurements for diffe re nt Ex amples of spatial relationships.
The first of these, representative also o f spatial decision making pro ble ms , may include a variety of ph e no me na with diffe re nt spatial form _ de te rminin g th e best location for a hospit al or rest aura nt , finding a path through a maze , creating a path ove r mo unta ino us terrain , deciding which childre n go to which school , layin g o ut the a ttractio ns in an amusement S = school A = farm boundary
==---
~
~* . bl oullng pro em R
*
L' ocallon probl em
"i,'.\1.... l.S
S()l\l l'
33
p a rk , o r all ocatin g differe nt types of land to parti cul a r fa rm e rs (Figure 2.5) . ( Spatial inference ma y be necessary for domains lik e min e ral prospect ing whe re..- it is impossible to ha ve many direct o bse rv a tio ns, or for inte rpre ting digita l da ta tra nsmitted from sate llites. Fi gure 1. 9 s uggests th e conditio ns th a t might need to be assessed to be a ble to de te rmin e th e e xiste nce o f a n aquife r based on limited info rm a ti o n fo r s urface wate r hydro logy, a nd a fe w bo reholes or tunnels , pe rh aps a lso na tural ca ves , pro vidin g subte rra nea n data . It is not inco nceivable that children could a lso e ngage in more challe ngin g activiti es like making maps th a t re prese nt so me vi ew o f the future, o r maps that represent the combin a ti o n o f specified co nditions. Th a t is: PREDI CTIVE SPATIAL MODELS
shOpS
(b)
Loca tion and character
Thi s ca tegory includes activities like answe rin g 'wh a t if'? ' questions or und e rta kin g simulations of known processes to produ ce different o utcom,e s . Fo r e xampl e, the best places for building mo re houses in a region in th e urba n pe riphery of Washing ton , D C (Figure 2. 6) may bc diffe re nt according to the specific perspectives o f a n e nvironm e ntalist, co nstructio n compa ny or local governm e nt ho us in g a uth o rity . This cate go ry o f acti vity also includes sci e ntific simul a tio ns to unde rstand be tte r th e e xisting o bserved phenom e na o n the ea rth ; fo r exa mple, that of pred ictin g pa tterns of rural land use o r o f mode lling th e deve lo pment o f rive rs in a ge ol ogic time span . Figure 2 .7 provides one summary of th e va ri e ty o f spa ti al situations lh a t a rise. D e te rmining position and cha racte r a re pe rha ps th e most basic geogra phic a nd spatial questions. Th e y ca n, h o we ve r, be ve ry different d e pe nding o n the restrictions or qualificati o ns of th e qu e ry . Measuring , prope rties of spatial entities or rel a tion ships a mo ng se ve ral objects ttnd e rli es much scientific endeavour. Choosing pl aces or other spatial l' ntities by comparison of alternatives re fl ecting diffe re nt opportunities or l'l lll straints is a major type of public or priva te d ecisio n problem. Spatial plcdicti o n , pe rhaps used for inferring the loca tio n o r existe nce of objects, ,I I ide ntifyin g and assessing different sce narios, ca n be p art of many tasks. 1.. 1. LOCATION AND CHARACTER
All oc~lli on and d1" lrtcll.nq pro t)I1) 01
I
IYIH' S of "1':11; :11 11IO\lklll.
. 3yOU\
I prob em
ril e th e mes of locati o n ,lIld c har:tell'l' , fllnd :lI11 c ntal to Ihe o ther activities l' lesc nl ed ah(lve , rc preselll Iwo di I'i'c rl' 11 I views . (W(l c(lntrasting thought IlI llCCSS.CS. In a praclic:d Sl' nSl·. III\' Y , ': 111 1)(' dinin"l 10 handl c. Fo r 1' :-;; lllIplc , illl :tglllC :I hlindrol l
11 11I1i 1' 1I
Iltilli"lll:tl i "l1
flllill
jW;1
:1 11"1\1
l"l\dllll,' ~ ,
1\
cO i1lilin:lliOIl
of
50
Needs
Urban or bUl l l - IJD land
203
res Idt'M la] parII llil' n,llme or spatial inform;ltion. L et LI S now trea t the topic of the IIW;llIll1g associated with phenol1lena 1ll oF6..._directly. In simple terms , 1III:I,I,.ill(; I Ii;} I I()r S()llle pllrpose we h;lve gO!le through a process of t1" llllil ioll, till' COllCcptll ;d descr iptloll oj" ..-pil enomena , fo r cxa mple , " I ' i" ' i ryilil~ tli(' pmJll'rt i,'S IILII ;Ii"t' IH 'l"("S';, 11 y ,lIld slifli cic lit I()r identify ing a 1011. ,', 1,"('ol'lli l,i()ll , 111(' OI'Sl'IV;IIIOII 01 IIIl" ,. , is\(" 11("( ' or 111()se prope rti es
62
Seman tics
such th at a claim can be made that so mething obse rv ed is a lake; and demarcation, th e delimitation of th e feature on th e gr ound or a representation of it as in a photograph.
Th e information in a spa tial informalion system
'-~--------------------------------
63
3.1.1 Spatial entities We use the term entity to refer to a phenomenon th at ca n no t be subdivided into like units . A ho use is no t divisible into houses, but can be split into rooms. An entity is refere nced by a single id entifi er , perhaps a place name, or just a code number. Even though it may be composed of seve ral pieces, it does have an overall identity , for exa mple , a city or a watershed. The entity may be a mappab le feature like th e lake, but perhaps not readily mappabl e, like the salt dome, beca use it ca nnot be seen o r because it is an arbitrary unit like a statistical unit. It m ay also be a co nceived unit , necessary for argument or imagining, but not yet ha ving an ex istence in the real world. The indivi sibility is based o n th e properties used in the definition, and there is no t a necessary implication of co mpl ete hom oge neity within the spatial extent of the entity because so me characteristics, such as depth of lake , are not included in the criteria use d to defin e and demarcate the entity. In the spati al infor matio n systems field, there is no comparable standard structurin g of ph eno mena as in th e physical world's molecul es , atoms and quarks , to help us in id entifyin g th e scale of pheno mena as impli ed by divisibility. Whil e in everyday language th e terms entity and obj ec t (or thing) are sy no nym ous, we shall follow th e terminology of th e field of inform atics to use entity when spea kin g of th e conceptual organi zat ion of phenomena, lind object when referrin g to th e digital represe ntation . H owever, as the cho ice of term is co ntex t dependent , we will occas io nall y use entit y and obj ec t interchangeably . At tim es, oth er terms like geo-object or fea ture may be encountered. The former term impli es ph enomena pertaining to th e earth . The latter, a mo re confusing term in th e context of spatial info rm ati on systems, has th e connotation of geo-obj ects th at are show n o n maps. Because of cartographic conventions used to ameli orate the difficulties of show ing the large curved ea rth o n small flat pi eces of paper, features o n a map may not be positioned as the y arc on th e eart h , and so me rea l entities may not appea r at all as features on lll ;lP S. The phenomena exist as perceived by people (Figure 1.1) , so th ere may be different definitions for lakes. Hut there Illa y ,tiS() he dirferent demarca ti ons on th e ground or in th e ,1\Jstract as;1 restllt or ' n,tture' heing at odds with th c int ell ec tual de lillitioll s. hll' IIlSI,I Il ("C , til l' krritori,d ex tent o f ;1 hod y or wall: r (:,I n v;lry ;11 dilkll'llt lilllt'S -. 11111(( '11 lor ollil"l"s, involving 11111("1:1 InliH"lioll 011111 '1('; 1.'.1' III dlllll ' II·.II)II : IIII v. ,'()illis olliliVs 111:1\1 slalld
"--
Se mantics
85
Combinations o f entity types
84 Darwin /" ,
Oslo
/
L.onOOn ___ ---
/~
~ -h~dam \\'''~
"Moscow
--.
/
'~"'" ~ranklurl
Paris
/'" , /
'-....
I '\\.---""'"
\
\ ___ ~\i J-
o/~
\
ot o'r.-/\
o \. ..... I ./
. Zunch
sidewalk
DYADS
(a)
COMPLEX OBJECT
NETWORK
~
TESSELLATION
(f)
(C)
m
~
I
~
Trees in orchard
0
0 0
( d)
LATTICE
-
I
(e)
,
'-.~y,
0, !Adelaide
\.
Canberra (b)
,
..........
I
Sydney
0 I Melbourne
(c)
Figure 3.14 Substitutions and du als for spati al objects. (a) Centroids for polygons. (b) Prox im al areas for points. (c) Points and polygons for a graph.
:b~VJ'SERVE Bouodary 01 pnvale property
= house 101 wilh ilT4>ffivemenls
.... _Brisbane ,
/
I
.....
Rome
parking spaces
--I
'
0
~
e\~~~ I , __ _
0
,I
-I
P rth
(a)
Madrid
(b)
.....
0
CONNECTED POLYHEDRA
Figure 3.13 Complex and com pound spa tial objects. (a) Complex obj ects. (b) Dyads. (c) Network. (d) L att ice and mesh. (e) Tessellation. (f) Connected polyh ed ra.
The rev erse, an in crease in dimensionality, sometimes o ccurs . There are ways to create proximal areas from data for only po ints (Figure 3.14b). That is, territory about specific points is demarcatcd so that all possibl e location s defined by the areas are associated with the nea rest spec ific point. Such a tec hnique has been used for de m(lfcatillg sLllislic;d units representing th e postal areas based o n zip codcs or th e LJllilL'd St.a tes Posta l Service, because few postal areas are delimited. The post;d units are see n by th e Postal Service more from th e po int of view of streets followed by walkin g or drivin g mail carriers, not fo r obtai ning sta t iSI ics ror zones . Simil arly, in th e N etherl ands, the postal zones are the set of street s m aking up a daily workload of a single postperson. I n some cases , point and area spatial units are duals for each other (Figure 3.14c) , that is, pairs of m atching entities. In o ther word s, there ex ists a set of polygons for a set of points, as in the exa mple of the postal I.o nes created from points for post offices . For transportati on networks, line el em ents, a set of polygons and m atching po ints can be defined as dual s. Imagine European countries with capital cities, m apped as points with in polygo ns, The citi es can be connected by links, and po lygons pmdu ce d for those points. ",
:L4.:~
for area units, although in practice it is usually a point lik e a m athematical centroid o r an arbitrary loca tion within or without the spatial extent of the area that represcnts the two-dime nsional ohject , rather th an the boundary line (Figure ~. 141(·: tl< or di sco ntinuity is gcn c rall y assulllcd , with(lut any possibilit y o f 1>l'Ov idin g in misk;td;lll', Li~lli()lIs , ;\., II;I.~ 1);I[llh'II(,l :ill ' lil'lciJlI l'. :1 jlosition ill rl';t1i1 y. say 11)(' ( 0 . 0) 1;llilIHic- lull giIIHk IHlilll , 11>11'11 , 11".1 Willi il.~ wilcl'c;ill(lIlh Oil ;t 1I !: '1 I . h ';I IIII'l 's III:I V
(d)
37074-AI
Coordinates
co nverging meridians
prime meridian
oLI_
37
So uthPol e~
(e )
}j
ChillcOicaguc
(b)
30 N,
\
'~ ~ }{/
38 °1
Loca l origin as in street atlas
(Lati tude = 35 north , longitude = 75 east)
o
'1,/
Grid origin
y
(a)
~,
39 °1
·;C I II·II '
II(' 1()(,;Iil'111101 (\1'.1.111, I ( \ ' ) SI·dll'l i, ';d. (1') 1'1"1,', '111"' .
136
Geometries
Di st ances in planar C arte si a n coordina te syste ms use the data for coordinate pa irs, o ften co mpu tin g th e stra ight line distance as the le ngth of a diagonal of a right angled trian g le (Figure 4 .11 a). Howeve r, there are o the r possi bilitie s, o f which the most intriguingl y na m e d is the Manhattan , taxicab o r c ity block distance (Figure 4.11b). Thi s computes distance by summing the le ngths of the sides o f th e triangle. Algebra ically, it is based on absolute distances rather than on the square d distances for the stra ight lin e be twee n two points based o n the Pythagorean theorem. Th e distance measures may be m a de over a s urface or ma y be computed for th e a ss um e d real cha nn e ls o f move m e nt. Real network distances or driving routes (Figure 4 . 11c) a re a lmost a lways greate r than the dire ct s tra ight line distance. A continuou s fi e ld model for s patial e ntiti es facilitates o bta ining direct po int to point distances , but will underestimate th e reality by ignorin g channels for and barriers to move me nt. Discrepancies between direct distance and 'real ' dist a nce will tend to be higher if ne tworks for mo ve ment are sparse or irregula r , but e ffective distances should also co ns ider the re la tive costs of move m e nt on netwo rks (o f diffe rent kind s) as opposed to simple ove rland journeys. D e ter minati o n o f accurate non-planar distances req uires e leva tion coordinates so that m eas ures may recognize gradients of the earth's surface . On-gro und di stances will also be underestimate d if the te rrain conditions are no t consid e red (Figure 4 .1ld). And , as noted ea rli e r , false impressions or data will be obtained for global dista nces if w ron g map pro jec tions are used (Figure 4.1 J e a nd f). In the human wo rld th e effort to mo ve over th e earth's surface is often tho u ght o f in te rm s of cost, e ith er in time o r mon ey. Transportation planners , urba n geographers , a nd others have d e vel o ped m a ny m eas ures of spatial impedance , and cartographers have devised various teChniques to re prese nt the re lati ve positions o f pl aces in diffe rent m e tri cs. Ind eed unless a s ingle co mposite arithmetic m eas ure is designed for combining diffe rent metrics , it is diffi c ult to de a l with the inh e re nt conflict of pl ace ment of points according to different m eas ures. Sometimes dis ta nce is dea lt with as proximity zones, ge ne rally for simplicity assuming an azimuthal base (Figure 4.12a). For ex ampl e, dista nce ba nd s ma y be c reated for seve ral market centres to show the re lative ease for a farmer to get to e ac h. A comparison of values for each di sta nce zone a t a given po in t m ay be achieved by overlaying the differe nt se ts of cirel es. Accumulations o f distan.ce from o ne point to reich t)
2
2 +(YC·YB )
o (b)
or, by the law of cosines: a
a
Y B
2
=
2 2 b +C
•
t· i)
0.2
0.00 0.02 0.000 0,002 0.020 0.022
2 bc cos a, and
2 = arccos « b +
0.0 0.200
0.22
0.202
0.220
0.222
etc.
I 2bc)
B
0.20
Figure 4.25 Ca ntor dust. (a) Genera tio n of th e dust. (b) Encoding method.
x
Xc
XA
XB
4.6.1 Creation of fractal objects
Figure 4.24 Intensional representa ti on-rules for a triangle . The third aspect is req uired for , among o th er things, asce rtainin g if a particular coord in ate position falls inside an obj ect (say a polygon) or ou tside, as well as on the boundary. Thus, as we discuss more fully later, there is a way to circumvent the practical difficulty in storing the infinite number of points that li e in side a polygon.
4.6 FRACTALS: A WAY TO REPRESENT NATURAL OBJECTS
Su far we hilve assumed that sharp boundaries or smoo th shapes exist for rca l ent iti es . This assumpt ion reflec ts a map model or geometric bias rat her than a necessa ril y approp ri ate model for nature. In spatial inform ation syste ms we have two kind s of entit y to model: 1. Natural earth feature s such as terrain and coast lin es. 2. Perso n-m ade objects like buildings and roads .
Fractal geometry has scope enough to represent more adequately than Euclidean geometry real world entities th at are not smoothly formed , as is the case with most natural objects. For examp le, a tree would be modelled in the latter domain by sets of co nn ected cy linders, cones ,Ind other regular geometric primitives; but fracl"al geometr y approachcs thc situ ation by a different route giving LIS more acceptable shapes, especi:dly for the leaves and bran ches.
Fractal geometry (Ma ndelbrot , 1982) is an atte mpt to synthesize v: lriou s mathematical work s at the turn of the twenti eth century. The word fractal implies properties as in fraction or fragmented; in esse nCe fract.I1 gco metry has ideas of fragmentation and se lf-s imilarity . Even though objects may be rough o r irregular, that is fragmented , Ihey may at the same tim e have so me similar se mblance of shape o r pattern whcn viewed from different distances. Self-similarity is symmetry across tlillcrent scales; th ere are patterns within patterns. Or, as Mand elbrot says, l!act,Iis are geo metric shapes that are eq uall y co mpl ex in th eir details as III their overall form. An appreciation for these concepts is best :Ipproached by seeing how particular types of obj ect can be crea ted, herore demonstrating th e use of fractal geo metry for natural landscapes. ('ollsider a line segment sp lit into three eq ual parts with the middl e "I'Clioll discarded (Figure 4.25a). An indefi nitely long co ntinued process pi splittin g th e lin e segmen ts will in the end produce a set of very small , ,dl )..'. lled segments ca ll ed Cantor dust. Since a point can be defined as a IlIll' wi lose len gt h is tending to ze ro. we ca n say that we end with a set of ;di!~l\cd (CI vi,l interval geometry rather than as a continuously retlned 1" \ ;1'-1III'IIIl'1l1 cOllcept. Scalc of observation, cmbodied in the concepts of II I,JIIIII!l1 ,111(1 precision, means that not all the digits for ;I,'e , ;tl so re presc nt a
5.2.2 Topological consistency Fo r planar graphs, recallin g that ea ch c dgc bas two vertices and separalcs two voids. wc now prese nt the con ce pts uscd by the Census Bureau or th e f
188
Topology
Graphs and areas 189
special condition of the duality of zero- and two-cells for the edges. The third and fourth conditions refer to the completeness of the mixture of entities: a cycle around every vertex should e ncounter a success ion of edges and spaces; a cycle around a polygon should consist of a series of alternating edges and nodes (Figure S.lOb). The fifth condition means th a t the geometry of the set of polygons does not contradict the topology: if two lin es cross, then there should be a one-cell defined. Otherwise, a non-planar condition exists, there is an erro r in position of one or more lines , or there is incorrect topological data e ncoding. This subject of error detection is developed fully shortly. Not all features on cartographic ma ps are topological. The curvature of lines, the shape of polygons, and the labe ls for places are not. More over, several different maps may have the same topological structure. A s Figure 5.3 demonstrates, sha pe can vary, and the absolutc, but not relative, placements of points can differ. The properti es of rclati ve position are said to be invariant under change (deformation) in the base. For exa mple, the writing on an inflated balloon alters shape as the balloon is stre tched and twi sted , but still retains its pa ttern. Lengths and angles can change, but four e lements must not be altered:
1. 2. 3. 4.
From To Left Right
line node node polygon polygon
A B
c
(a )
1
2
2
1
Q
0 \I
2
IT
c
•
Polygon 0
0
be)
II
1
(i) ~
(three
coincident lines)
2
(e)
Polygon"
2
2
11(-
o(
)I
c
A
(b)
GJ o
B
I (d)
5~11 IB'~4 (e)
These properties arc referred to as the map properties that are invariant und er continuous deformation of a surface , the map basc. Notice that tearing and puncturing can alter some of these in . particular cases , but stretching will not do so. This state of affairs proves quite valuable for map transformations of certain kinds and for substantiating checks on the integrity of data. The topology may not necessari ly be logically inte rnally consistent. For instance, an edge may be missing for two ve rtices, or there may be no occupied area within three edges , as in, by analogy , a badly treated umbrella that has a panel of cloth missing. We defi ne a topologically consistent map (or database) as having all spatial entities projected upon a plane surface, with no freestanding fe a tures, and having complete topology. That is, the five rules identified above are obeyed. Complete ness of inclusion means that there are no iso lated non-connected points and that all lines are parts of boundaries of polygons. The completelless of incidence means that lines interse ct only al points ,Issoci,ilcd wilh the ends of lines. These cOllsistency condilions m;IY he see ll ;IS cOllSlr
illiti;d PI(h'c'dorc til,1I l'(lIli1' :II\'~, tlil' COllldinates lor till' L'(IIlH.: rs or l'lld()sillg rL'l'I'lIlg!cs. (Tlii s L'OIlL'l' pt is disclissed in section 4.2.2.) II' the !lolilidilig rcc Llngles do not ()verLlll ,It all , th e n the lines contained within tlielll C
(JI)('I,r/I11'"
From Tol
(b)
•
Traffic light
Recall that transpo rta tion and hyd ro logy ne tworks, or th e cabl es a nd pipes used for water, electricity, gas , sewerage or telephon e se rvices, are structurally id e ntical to graphs and ne tworks . For SLlch entities, tas ks like the following arise:
1. Find all path s for a huge lorry in a road ne twork among all origins and destinations. 2. Find the place a t which service is disrupted becausc of a hrea kage or malfu nction . :1 Find a best ro ute to pick up more passe nge rs . 4. Find thc nea res t e lcctricity or telep ho ne pole for a new custome r for thosc scrvices. 5. Locate a service facility on a highw ay ne twork. 6. Allocate children to their nearest schools defined on th e basis of minutes of travel along the city stree ts. A primary processing require me nt is to create a chain from the line segments of th e graph. Na viga tion through th e set of tabul a r re cords for line sege me nts co uld be done by m a tching end points o r th e ir coordinates , or by using a tabl e in which links associated with nodes a re stored explicitly. In earlier days of so lvin g routing probl e ms, da ta were stored as coord in ates, not for topological re lationships , so th at th e con nectivity conditions had to be de rived from the geometry in the o riginal data ta bul a tio ns . Othe rwise, a grap h st ru ct ure better matches th e need for quic kly finding chains (Figure 5.29), although this req uires the tabulation of the spatial impeda nces - th e attributes m eas uring friction
1 2
3
4 5 6
7 8
1
o 8.2 SOME OPERAliONS FOR PLANAR NETWORK ENTITIES
:111
/111,,/,111,1/ (/( ' 11 1'' ' ' '' "lillil''''
t@
3
Building
S
m
Y
X
2 3
X
Y
4
Y
X
Y
X
5 6 7 8
Y X Y
Y Y X
X Y X
X
X
y
Not allowed Allowed
Not applicable
Stop sign School
Pair of node Control Time Available Traffic volume in seconds segments type
Traffic flow at intersections with restrictions
2-3 2-5 4-1 4-5 6-1 6-3 7-3 7-5 8-1
Intersection X IDs of streets at this intersection
(al (el R
R Light Light Light Light Light Light Light
60 30 30 90 30 120 30
R
Turn allowed on red light for intersection
Figure 8.2 Network turn restrictions. (a) Map of some cit y stree ts. (b) Turn matri x for inte rsection X. (c) Turn tab le for street p.I'II11\'f"S (0 scrvice ccnlrcs (l-'igllrl' K.II). !-'irst il11"gillC a distriilutioll oj Ill'o ple "l'cording (0 houses ilnd street dddresses. (ile location or schools with a fixed size, information about (ravcitimes on city streets, and a target number of people to be contained within the legislative district. If the data are structured according to city strcets. population is associated with the graph edge representing the street, possibly recognizing one or the other side, the school is a node on the network , and the individual graph edges for the streets have attribute data for tra vcl times. An intuitively based procedure for routing the school bus would be to follow the streets, accumulating traffic time along the way , by different paths to find acceptable routes. If the number of schoolchildren are assigned to the street links, without recognizing on which side of the street they live, then the number of children along a route can be accumulated (Figure 8.11a). Indeed, the process of accumulation can begin nearest the school and work outwards to collect thc ' resources', the schoolchildren, and then compare to the maximum allowed at a school (Figure 8.11b). If a district is to be created, then the city blocks mus! be joined - the population associated with the street segments h,IS !lOW to he known for each sid e of the street , or the aggregations have to usc Ihl' ~ v
'\
\l
("\
I
)
I /l / \ 1\ / /\ . j ' \)~ \&
IE External I l ,, ,model 1 I
' ~
I
-I
External model 2
-',
-~
)"
' ",
r -External model 3
\
.---
I Conceptual 1 model
Logical model
L
[ ,nternal
~Odel
IIN'> / " /'/ 11\( .I' ''.il :III"",I" " I' ./''! :1
:11,1
(lr).!,;lIli/. X(i)
Xo
X(i+1)
Figure 10.17 Bilinear inte rpolatio n to approximate eleva tion using th e point-in-grid rule.
\ 1"'1:/1ii, '.' :' .11 )1 1),
4 '1 :'
10.n BIBUOCRAPHY The rea der is relerred til severa l wllrb lor morc extc nsive reviews of geo metric modelling , cspeeia lly GL'lI1ther , and Kemper and Wa llrath. Gunther , Olivcr. Il)i{~, Efficient Siruclures for Geometric Data Management, Lecturc Notes in Computer Sciences, Ne th e rl ands: Springer-Verlag. Kcmper, Alfons and Mechtild Wallrath, 1987 , An ana lysis of geo metric mode lling in database systems, Association for Computing Machinery Computing Surveys 19(1): 47-91. Laurini, Robert and Franc;oise Milleret-Raffort. 1989, A primer of multimedia database concepts. In Robert Laurini (ed.). Multi-media Urban Information Systems. Urban a nd Regional Spatial Analysis Network for Educati on and Training , Computers in Planning Series (N,D. Polydorides, ed.), vol. 1, pp.7-75, Laurini , Robert and Franc;oise Milleret-RafforL 1989, L'ingenierie des Connais sances Spatiales, Paris , France: Hermes, Nagy, George and Sharad Wag le , 1979. Geographic data processing , Association of Computing Ma chinery Computing Surveys I 1(2): 139-181, Nyerges, Timothy L. 1989. Design conside rati ons for transportation GIS. P"rC!' presented at th e Annual Conference of the Association 01 American Geographers, Baltimore, Maryland, USA, Peuquet. Do nna J, 1984, A conceptual framework and comparison or spa tial da!;, models. Cartographica 2 1(4): 00-113,
/"'1_:111.11 ,.-II ,:fi,1 fl'1'fI " .,·fll. '{ fllfl
427
,
11 Pizza
Objects
~
j:=: C?
(a)
Conceptual modelling for areas and volumes After eating spaghetti , Franco Maragoni tastes a pizza and the marvellous colours on it suggest to him the various colours of a landscape a nd he says, 'Oh! Oh! I can use my pizza piece to model territories.' Antonella 8araldo cuts her pizza into little squares with different colours but Sa nan Hamet prefers sometimes to regroup various small squares into bigger ones. Mohamed Faroodi would rather climb up a pyramid 10 see whether he can spot some petrol in cubic barrels.
I
1- N
l Obje~ 1-N
+ INTENSIONAL-TOWARD EXTENSIONAL RULES
)
MULTIPLE REPRESENTATION
.) 1-N
In this chapter we present some area a nd volume based model s useful for geomatic objects. We present the quadtree fam ily , the pyra mids and the octtrees, and th e n provide examples from the field of geology. In the pre vious chapter we introduced the conceptual modelling of zero- and one-dimensional objects especially by means of segment oriented mode ls where geometric objects are defined by their boundaries. In a sense, they are always intensive models si nce eve n if we store their limits we have to take into account that we deal with objects of other dimensions. With the segment-oriented models we have to remind ourselves that we are dealing not only with the boundaries but, overall, a lso with the inner parts. That is, we need area l representations for areal objects and volumic representations for volumic objects; we also need the generation and membership rules to derive the ex te nsional data. The question , then , is whether it is possible to s tore areal and volumic objects with an exte nsive aspect, as treated in Chapter 6. It is feasible by using very sma ll two- or three-dimensional cell s; and in order to avoid dealin g with an i"nfinite number of ce lls, so me approximations can be used. In fractal geometry, a point can be defined as a small area (or a small volume) for which the size is tending towards zero. Consequently, this provid es a possibility for defi ning a so lid by a set of fractal points with a certain leve l of resolution, a nd those fractal points can be su bdivided into other smaller points (with bigger reSOlution). Thus , Figure 11.1 shows anothe r way to define so lids. In this case, the inten sive--ex tensive rule becom es an aggregation-disaggregation rule. The hiera rchical data struc ture approach of the quad tree and octtree is very nice in this domain.
I 1-1 (b)
(
---.---
;> -
...
SubdlvlSlon .J
+ AGGREGATION - DISAGGREGATION RULE
Figure 11.1 Ideal sche ma of a spat ial object and its prac tical equiva lent. (a) Theoretical mode l- impossible to implement. (b) Practical eq uiva le nt via fractal geo metry .
11.1 REGULAR CELL GRID REPRESENTATION
As exp lained in Chapter 6, it is possible to decompose space into tessellations based o n regular cells. Such a tessellation is based on regular sq uared tiles which can be organized as either opus quadratum or opus lareritum (Figure 6.5). Here we will examine only the former type of representation. An exa mple, covered in more detail in section 16.2, could be im age e ncoding in which pixels are the basic cells. The first alternative is to store each square cell with a locator, the (x , y) coordinates, a nd its attribute: GRID_CELL (X, Y, Attribute) This constitutes a matrix in which x and y respectively correspond to the
423
/'i//.I
41-"
( ) 11 , ' '/( /(,(, \
-)
T errain
I'
( r.-N
)
E
+ rule for
//
aggregation disaggregation
[ 'l 1-1
E
Squared chunks of spac e - Peano key - mean elevation
Figure 11.2 Re presentatio n of a terrain as a devil's staircase.
row a nd column numbe rs . In this mode l, ge nerall y speakin g, x a nd y are intege r coo rdin ates. Supposing we wa nt to know the valu e o f t he att ribute in the case o f a decim al coordin ate va lue, say x = 2 .427 a nd y = 9.083, a n intensio na l-towards-ex tens io na l rule can be employed , mea ning th at th e coo rd in a tes can be trun cated . For te rrain mo de llin g th e ce ll ma trix rep rese ntation will imply a dev il 's sta ircase approxim a tio n , as illustra ted in Fi gure 11.2. Wh e n the spatial di stribu tio n is such that som e ce lls have th e same va lu e as one or more ne ighbo urs, a row or a column reg ro uping ca n be do ne in o rder to de marcate a so rt o f range, usu a lly ca ll ed run-length encoding in the case of im ages. With row-wi se regroupin g we ca n have:
A
B
c
o
H
Conve ntio nally, the tree leaves - th e qua dra nt blocks - a re e ncoded usin g B for a black to indi ca te prese nce o f a n a ttribute conditio n, W fo r th e whi te (a bse nce), and G fo r a grey node, the interm e dia te ste ps before the bra nch te rminates (Fi gure 1 I .3). Th e initial squ a re, the compl e te la rge squ a re, is the neutral colo ur , grey. Th e n we have a grey sq ua re , mi xin g A , B, C and D, implyin g W BB B , fo llowed by E with o nl y the prese nce attribute . At this sam e, seco nd , level, the quadrant F has (l nly the abse nce state, encoded whit e, a nd fin a lly there is a grey squ a re with (;, H , I a nd J, giving th e cod e G WB B W . So the quadtree is e ll clll bi as ;1 cha in o f digits GGWB BBB W G WBBW. Since we havc (l ill y three . Qbj~ct
5
A A A A A
4
Pea no key
I
Side-l ength
6 7 8 11
1 1 1 1
12
2
III
o
(a)
.O~'_" H••,~k;, rd';'''''h 11.2 QUADTREES
A A A A
In this section we prese nt the classical hierarchical re prese ntation for qu adtrees a nd th e ir linear fo rms. Afte rwards , so me exte nsio ns will be prese nted .
7 8 12 14
1 2 1 1
(b)
11.2.1 Review of the concept of quadtrees To store a quadtree we gene ra lly use a hierarchica l da ta structure, with four links, as discussed in section 6.4 and de picted in Fi gure 6.13.
J
Figure 11 .3 Storing a quadtree as a tree.
RO W_REGROUPING (Y , >Lbegin , >Lend, Attribute) which X_begin a nd >Le nd are the co ordin a tes o f t he sta rt- a nd e nd po ints of the regroupin g. Simil a rl y a column- wise g ro u ping may be pe rfo rmed.
G
~l
Figure 11.4 A linea r qu ad tree o rdered by Peano and Hil bert keys. (a) Example of a blac k object e ncoded in a linear qu adtree ordered by Peano keys. (b) Exa mple of a black object e ncoded in a linear quad tree orde red by Hilbe rt keys.
430
"i;;,1
different symbols, lwo COllljllltl'l Ilits :Irc sullicienl, lor CX,llllplc, using 00 for black, 01 for whilc, ,lllll 10101 grey (II can possibly be used as a terminator), meaning that thc chain, and therefore the quadtree, can be encoded with only 26 binary digits. In contrast to this conventional hierarchical structure, Hilbert and Peano or other space-filling curves can be used to order the square cells; we call such a quadtree a linear quadtree. In Figures 11.4a and b, the Peano and the Hilbert keys, respectively, are used to organize linear quadtrees for the same spatial data. In the entity-relation modelling examples that follow, we use the space-filling curve ordered quadtrees. We emphasize, too, that the quadtree representation may be used either as an object description or as a spatial index. A great advantage of the quadtree concept for indexing is that we can remove the white and grey nodes, using only the black, thereby conserving storage space. For the moment we are concerned with only object description; the spatial index domain is treated in section IS.2. We use these spatial orderings extensively in Chapter 13, at which place their properties will be examined by means of Pea no relations and Peano tuple algebra.
11.2.2 Modelling polygons and terrains by quadtrees
( j ll,/(
4:11
Jill" ",
ZO!l es
- zone-tO - attributes
.. I'\ 1-N
( ,
r 1-1
Ouadrant
J
~
Figure 11.5 A conceptual model of zones described by quadtrees.
(a)
5 4
r Terrain i l~ (e)
I
l l-~
,8 I
~ pean~ key i
The conceptual model for the quadtree is sbown in Figure ll.S, and in this case, tbe aggregation-disaggegation rule is given by the decomposition of quadrants into smaller quadrants. In the alternative case, we have a region with three polygonal zones that will be modelled by quadrants by a staircase approximation of tbe main parts of tbe polygons. For allocating remaining edge quadrants to zones, we can follow common practice and use a majority rule for assigning cut squares based on their relative propor tions, as illustrated later in Figure 11.8. The relational model becomes:
- Peano-key
- side- length
- attributes
,
Returning to the use of quadtrees for spatial modelling, let us conider the representation of areal and volumic objects. Instead of employing segment oriented models (nodes and edges) for zones, we can also use quadtree models. When modelling a polygon by a quadtree, we have two possibilities: I. To model the polygon exactly in the vicinity of edges and vertices, getting squares and quadrants smaller and smaller, and so creating an infinite number of blocks, as demonstrated in section 6.4. 2. To approximate tbe polygon by modelling edges by staircases limited by the resolution level.
+ aggregation disaggregation rule
I
size l Elevation 2 1.35
1 4
~ 7
2.22
1 1 1 1 1 2
1.70 1.51 1.80 1.70
1.79 2.16
l 10 11
12 ~
C-)
Le 1
2.27
• 1 1
I
8 9
!
+ rule for aggregation disaggregation
Ouadrants
1.67
L
- Pea no key - side length - mean elevation
(b)
Figure 11.6 An example of terrain encoding. (a) Peano key encoding. (b) Entity-relation model for quadrants. (c) Example of tabulated data.
432
/'i/ /./
QUADRANT'
(/Olll'
II) .
I'(' ; III O J ; CY ,
Ou;tdr;t IlL_s il.c .
()u,/( Jill
4:11
'f ' "
OuaJranl_
(:1)
(b)
allrihllil's) ZONES (Zone-ID , Zo nca llribulcs)
where Zone-ID sta nds for the zone number , Pea no_key is the key fo r each quadrant , Quadrant-size is the side le ngt h of th e quadrant located via the Peano_key, and A ttributes, one or several no n-spatial attributes. A linear quadtree (Figure 11.6) may be an effective encoding for terrains , requiring three pieces of information in th e table (the space filling curve ind ex, th e quadrant size , and the elevatio n data , record ed as a mean elevation across th e block).
(a)
White quadrant
Black quadrant
iI
~
Edge quadrant
Vertex quadrant
POlygO~l 1 1-N (c)
0-1
/
, '
Edge quadrant
, , ' '' '' !'' , '
/ "i ' .."" :"' \'"'tI 1
\ \
"~"~I
"! "
'\ " i ' " ("
'\,
1" (
"
'1 '\ . I;
0-1
. ( )
/
Edges
I
1-1
12-2
(j
2-N 1Vertices
Vertex quadrant
I '
, ,~ .
Quadra: t
C/'
1-N
/':c}-., .( :lH~',~ I / :,.I' " ,·, :I'. .lif;-..... ' " " , )" 1
I
(r) 1-1
,
Black quadrant
, : I~::;'i!"
Figure 11 .8 A conceptual model combining quadtrees and segmc nl o riented representation. (a) Three po lygons, (b) Quadtree represe nt ation, (c) Conce ptual model (rules a re not mentioned,)
:' .. ';'
". < •• " •
"" ' ,,~
"/'
: • .:'
11.2.3 Extended quadtrees
"
(b)
Figure 11.7 E xtended quad trees. (a) Differe nt types of quadrants in extended quad trees. (b) Example of an extended quad tree for three levels.
To avoid multiplyin g excessively th e numbe r of small squares , an d in order to sto re also the edges, a nice represe ntation is to use an ex tend ed quadtree in which we have not only full sq uares but also squares cut by one edge or two edges , So , for this purpose, we can distinguish se veral kinds of qu adrants (Figure 11.7): full sq ua res (black quadrants) , white squares, edge quadrants and vertex quadra nts. In this way we are ab le to represe nt geome tric objects taking bo th th e inte rior and the boundaries into account. An example of a combined representati o n, based partly on segme nts and partly o n quadrants, is given in Figure 11.8. A ternary association links vertices and edges to the quadrants and to each other. Th e vertex to quadrant cardinality is one-to-on e, sin ce we have defined a vertex quadrant as hav ing o nly one vertex. Edges ca n cross several quadrants, but a quadran t ca n ha ve only one edge for a po lygon tessellation mode l.
434
/ '/ / / , 1
3-N .'
1- 1
"\ l - N
t\
}~;
ls~gmentJ
POLY 2-B1S (E uge -ID , Pea n(Lkey l , Pea no_key2)
1-1
Thirdl y, th e re are two relations desc ribing th e edge and th e ve rt ex quadrants:
Quadrant
etc..
Various types of quadrant (full, edge, vertex)
- -
3- N
~)l
0- 1
1
Full quadrant
,
(
r !0lygOn
~SI -N
T 0-1
l-N
"n ,
__
Edge quadrant
--r 1-1
1
1- 1
(~Ii
0- 1
I v~~ex qu~~ant -I J 1-1
~'-
~egment r2-2 ( ) -2-NI ve~
Figure 11 .9 A conce ptu a l mode l fo r a n exte nded qu adlree. (a) Conce pt o f th e ex te nd ed qu adtree . (b) Comple ted conceptua l model.
A more co mpl e te mode l (Figure 11. 9) d e picts the linkage of edge qu adra nts to segme nts, and th e linkage o f ve rt ex qu adra nts to verti ces. Fo r such a spati al representatio n, we have the fo llow ing re latio ns for th e relatio na l mo de L First o f all , fo r th e qu adtree: QU A DR A NT (Po lygo n-ID , Pe a no_key, Side_le ngth , T ype) in which Pea no_key refe rs to a ke y fo r full , edge o r ve rtex qu adtree blocks, and T ype is the type o f qu adrant. Th e exa mpl e has all three types. Next , there are three re latio ns giving the polygo n geom etry. using the segme nt-oriented approac h: POLY l (Po lygo n-ID , E dge- ID)
POLY2 (Edge-ID , Vertex l -ID , Ve rtex2-ID)
POINT (Ve rtex- ID , X , Y)
EDG E_QUA DR A NT (EQ_Pea no_key, Edgc-ID ), and VERTEX-Q U A DR A NT (VQ _Pea no_key, Edge l -ID , Edge2-ID, Vertex-I D ) in which E Q _Pea no_key and VQ_Pea no_key are so me Pea no keys fo r edge a nd ve rtex qu adra nts respec tive ly, E dge- ID , E dgel-ID a nd Edge2 ID are so me po lygo n segme nts, a nd Vert ex -ID is a po int num be r whi ch also can be re pl aced by its Peano_k ey.
(b)
-
4 :1';
ill whi ch I': dgc - ll) 111(' ;111 ', ;1 PUIVI ',/1I1 ~ "· ,! '"I e llt . ;lIld Vnk x II) . Vl'I ic XI-II) , ;uld Vc rlL'x 2- ID <Jr l ' SO li" , po illt 11l I/ ll be rs. If Pe an o keys /7"\>11)1
I
J
r_~~UbS~~N
Terrain 1
\) I
)
1-1
-- 1=1~yers
1- .. -
1- 10-1 O-N
1-N
~ 0-1
1-N
.' igure 11 .17 Conceptual mo de lling o f terrain a nd its geological laye rs.
O-N
A de tailed trea tme nt o f quad -, oct- , R-tree , a nd o the r hie rarchical dat a structures is pro vided by Sa met. Ga rgantini, Irene. 1982. An e ffecti ve way to re prese nt q uad trees. Communications of the ACM 25(1 2): 905- 910. Jo nes , Christoph er B. 1989. Data structures fo r three-dimension a l spa tia l info rmation sys te ms in geology. Infemational Journal of Geographical Information Systems 3(1 ) : 15- 32 . La urini , Ro be rt . 1985. G raphics da tabases built o n Pea no space-fillin g curves. Proceedings of Ihe Eurographics Conference , Nice. Am sterdam : North H olland , pp . 327- 338. Ma ntyla, Mariti. 1988. An Introduction 10 Solid Modeling. Sa n Fra ncisco: Computer Scie nce Press/W I H . Freema n. R equicha, Aristides A . G . 1980. Represe ntatio ns o f solid objects: th eo ry, me thods and syste ms. ACM Computing Surveys 12(4) : 437-464. Sa me t, Hanan. 1990. A pplica tions of Spatial D a ta Structure: Compute r G raphics, Image Processing and G IS. Reading, M assac huse tts, USA: Addison Wesley.
I
12
Spatial Object Modelling
Views, integration, complexities Eventually, Mr Cheese wanted to know what was the most adequate description of his city for pizza deliveries. He was told it was the spaghetti modelling of streets, exactly the oriented graph version. But Red Pepper disagreed, saying he was concerned about the analysis of sales in different districts; while Willie Makeit thought the speed of delivery was not good enough.
As the concluding element in Part Three, this chapter presents some topics of utility in the choice of data models adequate to use rs' requirements and orientations. It reviews criteria for se lection of represen tations and provides a basis for the sy nthesis of several external models. To illustrate the alternatives available in the marke tplace, one section provides brief descripti ons of some current commercial geographic information systems. Some of the characteristics and limitations of the en tity-relation and rel ational modelling approaches are then summaiized. In particular, the re is a discussion of se mantic data mode ls, the trends in working with complex features , and a review of the role of relational database management sys te ms for dealing with spatial problems.
12.1 SELECTION CRITERIA FOR A GOOD REPRESENTATION Out of the numerous criteria for selecting a good representation, we mention only three . First of a ll, the model must be appropriate. This implies that there is a matching between the use r's vision of the re al world and the vision offered by the spa tial information system. This aspect is generally not adequately met today by off-the-shelf systems because they impose a special representation form not convenient for users. For example, this happens when someone needs graph models but has available only a quadtree based spatial information system. Moreover, the multiplicity of users, each with a different vision, makes it
\/(·/lI.Ji
1I111e/,·'·.
44:;
dilficult for one system ildcqUjl '( I
tv/odd/ill!:
Hi ghe r o rde r fea tures Illay he c reated from co mpo ll e llt s hy refe re nce to named o bj ects o r specifi c a ttributes . T hus, a wate rshed may he assembled by co llectin g th e ri ve rs, und e rgro un d aquife rs, te rra in face ts and pipe lin es . Or , fo r a n example of co un ties, gro ups ca n be fo rm ed fo r low, middle a nd high degrees o f urba niza tion based o n the precomputed attribu te o f po pul a tion de nsity. An y spatia l da ta com bin a tio n is incide nta l to t he prim ary objective of a ttribute cluste ring. Th e case of creating gro ups of po lygons is a good exa mpl e of the co mbin ation of attributes a nd spa ti a l pro pe rti es . Geogra phe rs have trad itio nall y recognized three types of region: fo rm al, wh e re d iffere nt pieces o f te rritory a re gro uped o n the basis of ho mogeneity o f o ne or mo re a ttri b utes into large r uni ts, not necessa ril y co nti guo us; functi o na l, wh e re la rge r units exi st by reaso n of so me inte rd e pe nde nce a mo ng sm a lle r pi eces o f la nd , such as fo r newspa pe r circul at io n a reas; o r admini stra ti ve, in which sma ll e r uni ts a re co mbined to la rge r uni ts, usua ll y in a nested hiera rchy. fo r gove rn a nce purposes. C rea ting new fea tures lik e th ese requires a n ab ility to process both kind s o f dat a in o ne e nviro nme nt , a n unde rta king tha t may no t be easy if th e d a ta mode l is in a ppro pri a te . W e develo p thi s discussio n of mo re co mplica ted situ atio ns by go ing fu rth er into t he spa ti a l se mantic conte nt of the info rm atio n th a n is contain ed in th e basic e nti ty-re latio n mod el. Whil e dis tin ct spa tia l e le me nts may be asse mbled in diffe rent ways, it is impo rta nt to kn o w how they mi ght be co nnected . We ide ntify a few ways: 1. B y a functio na l asso cia tio n , fo r exa mpl e water fl ow . 2 . B y a computa tio na l associa tion , fo r exa m ple po pul a ti o n de nsity. 3 . B y groupin g, fo r e xampl e hum a n se ttl e me nts . Fo r the first ca tego ry , two spa tia l units a re associa ted by a ph ysica l or virtua l flow , cove ring ma ny phe nome na , lik e to uri sts , teleph o ne ca ll s, sewe rage or air masses. F igure ] 2.8 b sho ws fu nctio na l association s fo r wa te r flows. R eca ll the co ncep t o f the d yad as a necessary spatial unit re prese ntin g t his situ a ti o n. Whil e ma ny softwa re syste ms recogni ze th e edge o f a gra ph as a connecti on , th ey do no t usuall y prov ide fo r vi rtua l co nnecti o ns a mo ng po int positio ns. While a ttri butes may be combined co mputa ti o na ll y in ma ny ways , so me d e ri ved stat istics have implication s fo r spati a l re prese nta ti o n. Thu s p o pUl a ti o n d e nsity requires access not o nl y to th e num ber o f peopl e, which may be associa ted with o ne se t of po lygo ns, but a lso to la nd a rea, whi ch is a di ffe rent set a nd may very we ll not be a complete tessella tio n of space. Obtaining la nd a rea m ay requ ire special process in g such as hav ing to e rase the wat er a rea fro m administrati ve ly d efi ned polygo n units.
HI, "/,III): wil /, , "lIlp/' " "', l iI/I,",
4:;:;
I ,: IL-,Il e llt s () J" OIl C killli III:IY 1,(' " ,I (llIP L' d illt o large r scts O il the bas is of SOIIl C cr it e ri o n o r similarit y o r flillcti o n . Fo r exa mple. ham le ts, vill ages, tow ns ;..... ..··:..·-~,~,I)
'
J
!. ,.
t. ,.
..·..·--:i·i,:>i:!· y~~. ~ ...:..'..',: '::,' ' . ' .
.,., ,-
1 . :GherS;!?': ;~.'
',t. ,. T~PE1.
, _, • . / ~~'---.L...~ __ ._:_~=:::= :, :~.~.-L~:- ....-!--'"--~~-
.
,)
Class of objects
' -;:::-" I !:,:~:tl;';;::'~I:'[)!"l't l y -' , .' .
link to
As discusssed in Chapter 9, conceptual modelling tools developed in cognitive and information science fields can provide for effective procedures for sorting out complex situations. Our concern now is to present some matters that extend the e ntity-relation mode l to cover more semantic content. Using the term semantic data models as a general category for extended entity-relation models , let us look first at one particular model used for a spatial data context, and then present some organizing principles. Developed in the mid 1970s by Fran'- i I
Pl
L3 P3
L1
MaSler
",
~
L~ I
\ L1
PL \
L2
Detail 1 (lines)
P2 Detail 2 (lines)
Figure 12.11 Example of the SICAD data structure for stori ng polygons. (Based on a paper presented at the Conference on GIS Design Models and Functionality, Leicester University, UK, March 1990. )
12.5.1 Commercial spatial information systems software examples The SICA D system, created by Siemens AG, a German company , is a very commonly encountered system in Europe. It has its topological structure governed by a Master-Detail system; internal address mech1 ~ ~ ~ line
feature component
feature componen
~
-
7
,/, I/ . dl,/ loI ".
11..';.L N.llion.II c,Irlo).:I·,ll'hi( d.ILlb,IS('S
RIVER
~i
'\/,,(/,,/ . . II 'd·d
>1
~
>
I
rr===P=o=j=n=t==i] feature
~
>
(b)
I .ike U)llIp;lllies 1)I()dll C illg~()l'lw ; II'l': I'm spatial informatioll , so national !'OVellllllellt mg;IJlil.atiuJls, Irequently major builders of digital spatial (i;ILil)"ses, arc faced with {A} ---'> Y . Suppose thai , j'o r th e LOTS re la tio n , we have fun ctio na l de pe nde nc ies as g iven in Fig ure Il.2a, we ca n see that we mu st split it into two re la tio ns ( Fi g ure 13.211): LOTSI (Property-IO , Co unty_n a me, Lot-IO , Area , Price) LOTS2 (County_name , T ax-ra te )
(d) Result LOTS
/ LOTS 1
/ LOTS 1A
Relation in First Normal Form
'-..'-...,
.~
LOTS?
Relations in Second Normal Form
I
LOTS 1B LOTS2
Figure 13.2 E xample o f normalization. Navathe 1989 , with pe rmissio n.)
Relations in Third Normal Form
(From
Elm as ri
and
A second e xample (Elm as ri a nd Navathe, 1989) , de picte d in Figure
13.2, is : LOTS (Property-IO , County_ na me , Lo t-IO , Area, Pri ce, T a Lrate) This describes pa rcels fo r sa le in various countie s o f a country . Suppose that we have two ca ndida te ke ys: Property-IO a nd {Co unt y_name , Lot IO}; that is, th e L o t-IO co de numbers are unique o nl y within e a ch county, but the Prope rty-IO values are unique across countie s for the
in o rd e r to meet the prope rty of seco nd normal form , beca use th e tax ra te is a co nsta nt for a particul a r co unty. That is, all prope rti es in o ne co unty have a n identical tax rate. So county A has $4.15 per assessed va lue unit, a nd count y B has $3 .85 pe r unit. A re la ti o n sche ma R is in 2NF if e ve ry non-key a ttribut e in R is not p a rti a ll y de pendent o n an y key of R . This condition is me t by th e re mo val o f T a Lrate to a sepa ra te ta ble . Fo r a pol ygon spati a l d a ta mode l: POLYGONS (Ch a in-IO , Po int-IO , X , Y) th e re is a joint key of cha in a nd po int, but X and Y coo rdin a tes a re the mse lves dependent on o nly the point element. Beca use a po int m ay be sha red by two or more cha in s , it is necessary to ha ve two re la tions: CHAIN (Chain-IO , Po int-ID) POINT (Po int-IO , X, Y )
496
11I,I:d)f.l ,
13.3.5 Third normal forlll The third normal form (3N F) is based on the concept of a transitive dependency . A functional dependency X -> Y in a relation R is a transitive dependency if there is a set of attributes Z that is not a subset of any key of R , and both X -> Z and Z -> Y hold. In this case we must split this relation into two new relations and a join between both will recover the original relation. In the case of our example, for LOTS2 there is no problem, but for LOTSl there is a transitive dependency: Property ID -> Area , and Area -> Price. So we need to change LOTS1 into (Figure 13.2c): LOTS1A (Property-ID , County_name, Lot-ID , Area) LOTSlB (Area, Price) The resulting rearrangement to satisfy the three normal forms is a set of three relations as shown in Figure 13.2d.
13.3.6 Other normal forms and implications for spatial data In some special cases, some other norm al forms can be defined - the Boyce-Codd normal form which is similar to 3NF, and fourth and fifth normal forms that take multi-valued dependencies into account, but we do not discuss them here. Instead, we examine briefly some implications for spatial data , although the implications in the design of geomatic databases are more or less the same as for other databases . We have already noted in Chapter 9 some circumstances in which non first normal form may arise for spatial data . Another aspect is the necessity of dealing with positional information, or locators. Even while identifiers are well treated in the relational model, locators are absent except if they can be written by alphanumerical strings, which is not always the case. Normalization can be seen, then, to have several benefits even for spatial data. The process reduces unnecessary duplication, fosters integrity and encourages thinking about well-formed databases, if only to produce a healthy respect for the difficulties inherent in building large databases . At the same time, normalization has costs like the extra effort required to use or keep track of many tables, the cases in which non normalization may be preferred for spatial data , and the difficulties in knowing enough about enterprise rules to establish functional dependen cies or other kinds of association. The relative benefits and costs also
\( )/ ,·\. 1111/,1, ... ,II
!:""III.,I/c
10
AND Po pul atio n < 50
QU ERY 3
Suppose we have a lso a re lation CITY_ POP giVIn g th e popula ti on of so me cit ies:
QU ERY:1
So me tim es we nee d to work with seve ral insta nces o f the sa me relatio n. III thi s case, th e prefix is also a mbiguo us an d thus, ali ases, declared in the FROM cl ause, a re used as prefi xes. Suppose we have a se t o f lin es and we are loo kin g for segme nts in which o nl y o ne e nd -point must lie in a specific spa ti a l ra nge, say x > 5 (Figure 13.3a). Th e tab les to be utilized a re: SE GME NT (Segment- ID , Po intl -ID , Po int2- ID ) POINT ( Point-ID, X, Y ) which are full y illustrated in Fi gure 13.3a.
CITY_POP (Ci ty_name, C ity_ popul a tio n) Le ttin g A a nd B stand for two tupl es o f th c PO INT relali o n , we hilve Suppose also th a t we a re loo kin g fo r an y Eu ro pea n co untry ca pit al city wi th mo re th an 5 millio n inh abita nts. Fo r such a que ry we nee d to use also th e re latio n E C (Country_name , Ca pita l) , specify in g th at the Cap ital is also a City_name. T echnica ll y, we must jo in the re latio ns. Fo r th a t we nee d to have a co mbin ati on of re latio ns as fo ll ows: SELECT Ca pital, City_po pul a tio n
FROM CITY_POP , E U R O P_COUNT
WHERE City_na me = Capital
AND City_po pul atio n > 5
SELECT Segme nt-ID FROM SEG MENT, PO INT A , PO INT B WHERE (A. Point-ID = Pointl -ID AND B.Point-1O = Po inI 2- ID ) AND «A.X > 5 A ND B.X < 5) OR (B.X > ) A ND A.X < (i))
In a sense , do ubl e access to th e ta bles is req uired to rctri eve begi nnin g a nd e ndin g po ints, as sho wn in Figure 13.3a. Fo r thi s exa mpl e, o nl y o ne lin e segme nt o ut of the three matches th e do ubl e co nditio n .
QUERY 4
Q UE RY 6
T o re trieve Spa nish spea king co untries having mo re th a n 10 milli o n inh ab ita nts we also use th e OFF_LA NG (Coun try_name, La nguage) re la tio n. Th e que ry will dea l with a mbiguo us attribu tes names; indeed, Country_n a me is a n a ttri bu te of both OFF-LA NG a nd of CO UNTRY_PO P. In o rde r to ove rcome this a mbi guity , the re lati o n na mes are include d as prefixes to the attribu tes:
Turnin g back to th e Spa nish speak in g countries, this type o f que ry ca n be solved also by nes ting th e SElECT state ments. In o the r words, in th e crite rio n we ca n compare so methin g with th e res ult o f ano th e r SElECT o peration:
SELECT OFF_LANG .Co untry_n a me, Po pul at io n, La nguage
FROM OFF_LAN G, CO UNTRY_POP
WHERE La nguage = "Spa ni sh"
AND Po pul atio n > 10
SElECT Country_na me, Po pul a ti o n FROM C O UNTRY_ POP WHERE Country_name = SElECT Co untry_name FROM OFF_LAN G WHERE Language = " Spa nish "
By nestin g SELECT ins tructio ns, we ca n ofte n avoid usi ng prefixes.
/ I/! :, " II , /"
500
\ (2'
QUERY 7
OWIl Uf
STREET OWNER PARCEL BLOCLPARCEL STREET-SEG MENT PARCEL-SEGMENT SEGMENT-ENDPOINTS COORDINATES OWNE~PARCEL
(Street-ID , StreeLname)
(Owner-ID, OwneLn ame , Address)
(Parce l-ID, Address)
(Block-ID , ParceJ-ID )
(Street-ID , Seg ment-ID)
(Parcel-ID , Segment-ID)
(Segment-ID , Pointl -ID , Point2-ID )
(Point-ID , X, Y)
(Own e r-ID, Parce l-ID )
Table Access
A B
..
10
x< s
for one end
(a)
x >5 lor Ihe
olher end
1 2
2 3
3
4
~~
Seg menl Point1 Point2
Table Access
A
B
5 3 ~ 10 8
C
3
4
"-
\ Poinl2·ID
Poinl1·ID
c! rdlnales
(C)
I I I :
5 3 10 8
1487
111 111 123
123
123 123
Ii k
9
u w
487
487 487 487
za zb
987
zd
z
k
-I I
(b)
I
I
I
-I I
I
I
I
( c)
(d )
1'+-
--1
u w
I: I I 1II II
~ I
I I
' .t - --I zb 1- -
r-
-1 564
t
~-
I I
-1678
I'
I... -
1--'
[-
-1987
zb
I" -
I
L _________ _ _
I
OWNER. PARCEL I
I
Owner Parce l·IO
I
I
r- -
10
6
I
1 8
u
Segm en t·tO
111 1123 123 123 123
_
I I l
Y
III III
PARCEL·SEGMENT Parcel·IO
2 3 4
Point X 1 2 3
I 1-
~; ~' U lrH i llI 1 0
r------------------ - -~
I I I
1
I I
(b )
A ,Parcel-ID; vi a OWNER-PARCEL to get the Owne r-ID before ide ntifying and retri eving th e parcels , for which in thi s exa mple there a re two , as shown, numbers 123 and 487 , 2. Secondly , join to PARCEL-SEGMENT: A.Parcel-ID = C.Parce l-ID . 3 , Then fiind the corres po nding segme nts: c.Segme nt-ID . Here the re are four fo r each of the two parcels (Fi gure 13.3c) . 4. Loo k for the parce ls B sh arin g this segm ent: B.Seglll e nt-ID c.Segment-ID , but we mu st eliminate the case B.Pa rce l-ID C.Parcel-ID , th e situation o f adjacent parce ls also owncd by Ann (if the re are any ).
2
98 7 34 6 678 111 564
PARCEL·SEGMENT
1-
A B
tl! It)
I I I L.. - . I
OWNER· PARCEL
1. First retri eve tuples with the name Ann: A.Owne Lname = ' Ann ' , so:
SEGMENT ( Segment · ID, PointHD, Point2· ID) POINT (Point·ID, X, Y )
I' Jl I I
G54
Lewis Mark
Mary Paul Peter
A ga inst these relations , we will pose some more complex qu eries, As a fi rst example (Figure 13, 3b), let us retrieve the addresses of the neighbours o f th e landowne r, Ann, This is a topologica l query takin g account of the adjacency property . In thi s case , we mu st:
10
Parco I II)
Alan
Now let us again utilize th e toy cauastre example give n in Charte r 9 , including the following relatio ns:
.'tnl
,'\ , 11 11,,/,", 11 11 : (111 1, 1111
"
-
-
-
Alan Ann Ann John
654 123 487 345
Lew is
Mark
987 346
Mary
Paul
Peter
678 11 1 564
,----- -
OWNER Owner_n ame Owner·IO
Address
I
j :
Alan Ann
5667 344 5
John LeWIS
1888
3459
6 Churchill SI.
I I ( f) I' -
,..::M""a"-'rk'---_~52::;.;1~0-_:_::_--....,....-~
I- -
r-p~e~,e~r--:;.:007--=-::-: l ~~ 56 9"':'0-;S"...I.-::P,....a-,ul-:S,....tr~
Mary Paul
6089 4529
24 Eliz abelh SI.
8734 Ki ng Street
- - ______ 1
Figure 13.3 Two queries using spatial data, (a) Coordin ate value for one end o f a line segm e nt. (b) Parcc: ls ow ned by specific owne r. (c) Boundary segme nts, (d) Adj ace nt p
AND ( '. l'oillt 2 II)
OUERY
This qu e ry can be schemati zed as follow s:
SQR((D .X - E ,X)
, ( 1/
I)
I'"illl II)
I ~ .I'oilll - JI)
I)
As another exa mpl e, let us retrieve the address of the parce l 345. Thi s can be co nsid ered as a topological que ry usi ng a segme nt as a boundary be twee n a parcel and a street.
SELECT Street-ID FROM PARCEL-S EGMENT , STREET-SEGMENT WHERE Parcel-ID = 345 AND PARCEL-SEGMENT.Segment-ID = STREET-SEGMENT. Seg me nt-ID
TRAFFIC FLOW EXAMPLE
Othe r geom atic que ri es can be posed aga inst a spa tial dal 'lil;lse . I ,l'l li S me ntion the determination of areas of zo nes based on the cross-proullcls of coordinate segments, using the formula given ill sec tioll 7 ..1.. 1. However , this computation of a rea is quite difficult to UO via Ih e SOl , One o th e r exa mpl e is given he re for a mo re co mpl ex situation in more complete fo rm , covering data, re latio ns , a nd que ri es . A toy traffi c town is depicted in Figure 13.4 as an ex pressio n of the co mmon occurre nce of one-way streets and turning limitatio ns . In order to study o r simul a te traffic conditions, especially the traffic regulations , it is necessa ry to distingui sh seve ral e ntiti es: roads, road sections, roadways a nd c ross road s, with th e following pa rticularities : 1. A road mu st be constituted of seve ra l road sections, each of them limited by two crossro ads. 2. Roads cross at so me crossroads. 3. Road secti o ns can be one- or two-way roa ds. 4. Traffic vehicles in a roadway can go to other roadways (to-roadways) and can co me through differe nt other roadways (from-roadways).
In som e applications, it is also necessa ry to split roadways into seve ral lanes for some needs , a nd in thi s case, vehicles come from and go to different la nes. The conceptual model of Figure 13 .4 can be mapped into the following relation s:
504
/ \I.1.1 ',
512
13.6 CONFORMANCE UVllS ANI) [XTENSIONS
Suppose we ha ve a se t of tupl es as ca ndid ates for describing a n o bj ect . The proble m is to know whether this object is correctly defined in ordn to deal with consis tent Pea no relations. As an exa mple, le t us exa mine the following instance: Obj ect-ID A A A A A
Pea no_key
0 1 2 3 9
Side-.Jength
1 1 1 2 1
( (111101111,""
f ' "
.\
;; 1:\
(.j.. ,1/11/ . , \ 1. ' /1 '0111 11 ',
;)
,
-~
///
2t 23 ::>9
6
110
20 22 28 :30
5
101
17 19 25 27 49 51 57 59
~? ~4
100
16 18 24 26 48 50 56 58
3
all
05 07 13 15 37 39 45 47
2
010 001
The first thing to check is whethe r each tuple co rrespo nd s to a rea l qu ad tree quadra nt. Accord ing to the quadtree defi nitio n , no t any qu ad ra nt is possible; these mu st be arra nged in a special hi e rarchica l structure even though they a re linearly e ncoded . It ca n be estab li shed th at a se t of tuples de noted R(P , A) co rrespo nd to a well-positioned object if and o nl y if:
r{r
~I
,)nnn nnrn Innr tnlf.
OC 00 11 00
'2
I(W
1010
1700
1 007
1
1
0/1
I
2'
!
1"-...
1"0
107
I '"
000 001 010 all 100 101 110 111
(b)
-~
0'234567
00 02 08 10 32 34 40 42 I
000
48 O( 11 00 00
-fal
04 06 12 14 36 38 44 46
aIDc I a'" Inl I I I
01 03 09 11 33 35 41 43
~
60
~
~
0001 0011 100 1 1011
o
. . ,,v
I
0101 0111 110 111
2 1_ 1
i'
PI tuple (A, 3, 2 )
o
20 2'
22
2
0
3
7
4'
40
4 7. 1
0
r =7; n
1. Good positio nin g of quad ra nt s: first co nfo rm ance leve l (lCL). 2. A bse nce of ove rlappin g quad rants: seco nd co nfo rm a nce leve l (2CL) . 3. Maximal quadra nt co mpacti o n: third co nforman ce leve l (3CL).
13.6.1 First conformance level: well-positioned object
00 11 11 00
60 62
4
In order to o bta in a co nsiste nt descriptio n , three steps a re necessary, each of the m consisting o f checking what a re know n as consistent conformance levels (CL):
With rega rd to th e exa mpl e (Fi gure 13.7a) , we find th a t there is an overlap of ce ll 9 reco rded as a singl e tupl e (A, 9, 1) and as pa rt of tuple 3 (A. 3, 2) . In additio n, tuple (A, 3. 2) is misa li gned (Fi gure 13.7b); that is, it crosses over th e axes used for quadra nt deco mposition, assumin g thi s begins a t the middl e. The deco mpos itio n of tuple (A, 3, 2), as sho wn in Figure 13.7c, will be necessa ry, and , of course, now clearly shows duplicaton o f th e cell with Peano key = 9. In ge ne ral, a co nfo rman ce leve l is a co nsiste nt sta te in a d a tabase, tn the sa me sense as no rm a l fo rms and integ rit y co nstraints.
:"':1 t,tJ ti, 63
7
4I
4
2
3
43
4-' '6-' 64-'
';8
< P < 4r . ,
2 n _ 21 ~ 2 E.g. 0 < ' 2 < 64
2 2 or PI 1'1 . .11)1'"
1. Di saggregation, the fael tllal onc luple (qu adra nt) ca n be di saggregated into its four equivalent tuples (subquadra nts) , except wh e n the minimum resolution is reached. 2. Aggrega tion, the fact that four consecutive tuples (quadrants) can be aggrega ted to a single one provided th a t so me eq ualities hold. The performance procedure is like a spatial integrity constraint checking process, appropriate for linear quad trees ordered by Pea no keys. The processes of aggregation and disaggregatio n are illu strated for a simple quadtree in Figure 13.9. The homoge neous block of four tuples at th e top-right fits into the regular deco mposition a nd can be a malgamated to prod uce a higher level quadrant of Pea no key 12 , and side le ngth of 2 Figure 13.9b). The block at the top-left s imil a rl y occupies a space fitting into the Peano key multiples of 1 or 2 and can be split as shown (Figure 13 .9c).
13.6.4 Extension beyond two dimensions It is poss ible to extend the previous d efin itions in several ways. On the o ne hand, they can be used for high e r dime nsi o ns; o n the other, space filling curves and keys in addition to the Pea no type can be employed. Now , a three-dimensional Peano re latio n tupl e will re prese nt an octant a nd the recursive splitting will imply e ight subocta nts or eight tuples: PR3D (Object-ID, 3DPeano_key , Side_l ength , Attributes) For in stance , PR3D (A, 16 , 2) is eq uiva le nt to the eight tuples by disaggregation: PR3D PR3D PR3D PR3D
(A, (A, (A, (A,
16, 18, 20, 22,
1) 1) 1) 1)
PR3D PR3D PR3D PR3D
(A , (A, (A, (A ,
J\., ; 111 eXil mple , dc scribe it by :
19, 1)
Similarly, other forms of three -dim ensio na l Pea no re lations can be defined: PR3D1 (Object-ID, (3D_Peano_k ey, Side_le ngth, Attributes) ") or by using the runlength encoding scheme: PR3D2 (Object-ro , 3DP" 3DP2 , Side_le ngth , Attributes)
c ncodlll g
;1
so lid made of several materials, we ca n
SOLID (Object-ro, (3D_ PeamLkey, In geology, strata can be modelled corresponding Peano rel a tion is:
Side~ength ,
by
Ma te ria l) *)
octtrees, for
which
the
STRATA (Layer-ro, (3D_Peano_Key, Sidclength , Laye Ltype)*) Similarly, the three conformance levels must hold: I. Badly positioned octants must be split into eight othe r octan ts,
possibly recursive ly. 2. Ove rl ap mu st be re moved: the integrity constraints must ta ke three dim e nsio nal aspects into account. 3. Max im al compaction must be examined, with possibly e ight octants being regro uped to be replaced by a new octant. All th ese d efi nitions and procedures can be extended 10 higher dim e nsio ns . At four dime nsions the Peano keys can be generalcd hy inte rleav ing x, y, z a nd t (time) - in this way we can e ncode movin g objects.
13.6.S Hilbert keys Hilbe rt or o the r keys may be used instead of Pea no keys. As note d ea rli e r in Chapter 4, the Hilbert key is also a good ca ndidate. So we ca n have : PRHK (Object-lD, HilberLkey, S, Attributes)
17 , 1)
21, 1)
23, 1)
101
SidcJength, A[lrihllks)')
or PRHKl (Object-ro, (HilberLkey, S, Attributes)") or, with HI a nd H2 standing for two Hilbert keys such th at HI < H 2 : PRHK2 (Object-ro, H" H 2, S, Attributes) or PRHK3 (Object-ro, (H" H 2 , Attributes)*) Th e sa me properties hold : a tupl e is equiva le nt to four tuples,
520
II/j:('/",,\
/" '. 11111
;,21
1111'/" . .1/:"/,1.1
conformance levels CIII 1)(' dclillcd similarly, alld (hrc e-dimcnsion:" Hilbert keys can be uscd (0 dc/inc lhrcc-dimem;ional objects . For this context Pea llo and Ililhcrt kcys have the same charactcristics. However , recall from section 4.8. 2 th a t Hilbert keys are more difficult to compute and are not stable when th e occupied space is extended. Thesc properties suggest avoidance of the Hilbert keys , especially when union operations have to be considered . It should be possible simila rly to definc Hilbe rt relations, but the characteristics are practica lly the sa me as Peano relations . We propose to call them Pea no relations with Hilbert keys, knowing that the algorithm to generate Hilbert keys is different from that for Pea no keys.
The role of the Pea no-tuple a lgebra is to offer some too ls to ma nipulate Peano rel ations in the same vein as relational algebra operators. Three general kinds of operator can be e nvisioned, including some that dea l explicitly with spatial prope rties:
1. Boolean operators: union, intersection , difference. 2. Geometric operators: transl ation, rotation, scaling, symmetry, window extraction , replication, simplification. 3. Relational operators: geometric projection and Pe a no join. Eve n though in this chapter we speak abo ut quadtree-based Peano relatio ns, all the ideas can be extended to octtree-based Peano relations. In the ensuing discu ss ion we employ the exa mple , Figure 13.10, containing two areal objects A and B .
13.7.1 Boolean operators
By performing the union of two objects A and B desc ribed by quadtrees or octtrees, we obtain another object, C, for which the second conformance level is not satisfied due to overl aps (Figure 13.11). This operation can easily be done by merging the two sets of tuples , and while it is performed , conformance normalization ca n also be done. In other words, the union of two spatial objects is realized by tuple union, and not by geometric considerations. Figure 13.11a has the union: C = UNION (A , B)
Peano key
A A
3
8
1
A
9
1
A
11
1
A
12
2
p"" k,y
Sid",,,,lh
Obi,
l
13.7 THE PEANO-TUPLE ALGEBRA
I Side length I (a)
Object
B B B
0 4 10
(b)
2 1 1
_ _ _L - - -
Figure 13.10 Two objects described by Pea no-base d 4uadtrccs. (a) Object A, ma p and tabulated da ta. (b) Object B, map and tabulated data.
of the objects depicted in Figure 13.9. Since R(3, I) is ove rlappcd by R(O, 2), it must be cancelled (2CL). Mo reover , R(8, 1), R(9, I) , R(IO, I) and R(ll , 1) must be aggregated to give R(8, 2), to satisfy the third con form ance leve l condition. The intersection of two spatial objects is performed by a tuple intersection . If a n object tuple is overlapped by another one, the second object tuple needs to be disaggrega ted until intersection is achieved. The result meets the second conformance leve l specification. The intersection of objects A and B , producing D via: D = INTERSECTION (A, B) is shown as Figure 13.l1b. In this case, R(O , 2) must be disaggregated and only R(3, 1) is kept. The geometric inte rsection of two quadtrees, then, is performed by a tuple intersection without using any geometric a lgorithm . We take the two lists of tuples and we compare them, keeping only tuples in common, possibly after disaggregation. The difference is performed similarly. In this case, we have to remove parts of object B which are also present in A (Figure 13.11c) : E = DIFFERENCE (A, B)
522
III}:, ./" .• '. UNION BEFORE CONFOHMANCE Object
', , L]
I', '.•111 I III/II" .•/1 i' ./" .•
I :L7.:! C('onwlri(
op('r,llor~
Peano key Side length
o
C C C C C
3 4 8 9
2 1 1 1 1
C C C
10 11 12
1 1 1
Any ohject A C;11l he translated IIOJIl
oj
!
J
What do we have . in this region?
\"/
Figure 14,3
An example of a region query.
540
",) ,Iti," (J I/('Ii""
1\1 'J:IC
)/1
(/I/( '/ /I
:'41
" ,
In spatial informatillil SyS klll~, olll oj all spati;d queries, the two dimensional region queries ; Irl' Ih:rhaps the most use d . We melltioll typical tasks like the followi ng :
... Plant A
/
1. The retrieval of point encoded entities within a regIOn. 2. The retrieval of lines within a reg ion. 3. The retrieval of areas within a region .
.
(x - xc)2 + (y - Yc)2 < r2
/
_ I . /;;::>-7 ' . ....F 1.1
/11'/. ·' /11/ :
13261 ----15 - 27
-??
28
/ 89 46 . .
Figure 15.4 Hierarchy of indices .
~
hhhh kkkk
562
' \' ,,",\ ,1/111 ()/I , . The main challenge is to determine rapidly the convex polygo ll lor \)ounuing the objects, especially the number of siucs. Also quite recentl y, Faloutsos and Rong (1989) have combined the R tree and fractals by a so-called double transformation (Figure 15.17). Rectangles, defined by minimum a nd maximum x and y, can be represented by a point in a four-dimensional space (th e min_X, min_Y , max->( and maLY); this represents the first tra nsformation. Th e n, all 40 points representing rectangles are ordered by four-dimensional Hilbert or Peano keys, being the second transformation . Their results show that 40 Hilbert keys give the be tter performance for their criteria.
~/
'
15.2.5 Some practical aspects of spatial indexing
,,~
-------Figure 15.15 Indexing with sphere trees.
\- -
)
/\_--1 \
As a practical matter , only a few commercial spatial information systems today provide spatial indexing capabilities. Some system s allow access 10 database obj ects via mouse or othe r graphic cursor input for points or boxes or other shapes. Otherwise there is access via names or llllillerical identifiers in the attribute data tables . Sometimes topological neighhour hoods provide a means of access, by following lin e segment or graph links for a specified polygon or line. Indexing cap a bilities arc much rarer. For one commercial system in which indexing tools are made availabl e, the user manuals for the ARC/INFO system (ESRI) indicate that indices for both attributes and the spatial domain can be created. The latter indexing Max-Y
Y
'\:Eg
;;7:;
" (I,lli,I/""I"\lII!:
\~)
111\\ / \IE
w~ ~ ~@ \i.~7
Figure 15.16 Exa mple of indexing with a cell tree.
t
1 t
t
(Max-X Max-Y)
+
Max-X
4D Space
(Mm-X, Min-Y)
{
f-- f- + -f
,
,
,
~
X
/ /
/
..
~-------
~ Min- X
Figure 15.17 R e presentation of a rect angl e by a point in fOUf dimensional space.
Min-Y
576
\1 I I ". ··• .
11,,1 ()"."','
flll"!:",)'
process uses adaptive grid lc lls , Ihe lormer lise ,I hilLlry sC; II\'1,ill /' mechanism, operating on data slored ,IS modified binary (I~-) trees , The task of spatial indexing is very challenging. At present then; :11, ' several techniques but none emerges as the best ; although some lor II I 01 hierarchical organization is generally advantageous, Moreover, two IlIalll secondary issues must also be solved: multi-layer indexing, and taking th\' physical disk structure into account. In several practical situations , sp;ili;iI databases are split into several layers , each of them conccrning a particular theme , for instance, a layer for streets , a laycr for g:IS networks , a layer for sewerage , and so on. For this type of databasc it is inte resting to create as many indices as the re are layers and , for practicil reasons, different indices may be established for diffe rent types of spatial unit. But when it is desirable to work with severa l thematic laye rs within one cover area, then the layers must be combined adequately. With a structure such as Peano keys it is simple to merge two indices, but for R trees and cell trees, the tree branches must be redetermined , a time consuming task.
15.3.2 Spatial data checking
15.3.1 Basic integrity constraints
1. Checking whether an attribute value is consistent with its domain . 2. Checking wheth e r an attribute value fa lls within an appropriate range , for example, a month number must be in the interval 1-12. 3. Checking the existence of another tuple in the same or in different
!'i7 7
Somc inconsiste ncics may relate to attribute data; others may arise for spatial elements. Spatial information typically is characterized by the existence of many consistency rules in order always to deal with valid geographical objects; for example , triangular cells in a tessellation must have three sides. Here we shall first define the set of rules necessary for spatial consistency, and then examine how to utilize them vis-a-vis different geometric representations. We treat thi s topic at this point only for spatial databases that are implemented via the relational database model.
The quality of the data obtained from a database, whether in direct form by retrieval of stored records , or resulting from some data manipulation procedure , reflects many considerations. For our purposes, we isolate here only the one aspect of spatial data consistency for some detailed treatment. Inconsistencies in data perh a ps are logical defects within the spatial structure, or perha ps reflect a conflict with external validation rules,
111:
1I1/·.I).IIIlI·.
n;latioll.s, such :IS 111(' ,'il:,(' IIf il :1 poillt IS 11I1'llliollnl, w\' IIIUSt have either its eoonlill:llcs (ll :, 1'1':1)' 10 deduce thUII. 4. Checking the clrdill:tiilic.s, lor instance a segment mllst have two end points.
15.3 INTEGRITY CONSTRAINTS
The idea of integrity constraints, mentioned earlier in discussions of topology (section 5.3) and entity-relation modelling (section 9.3) can be invoked practically for different purposes in ascertaining consistencies, as
I
I
In the spatial information systems world, some commercial and public domain products have error-checking procedures undcrtakcn by special purpose computer programs. For instance, the database creation stage 01 the TIGER project of the United States Ce nsus Bureau has somc editing progra ms for quality control of the digital version of the topogr;lphical and other maps used (Marx and Saalfeld , 1988). This chec king is ac hicvcd by several tests for tracking topological inconsistencies a nd the like , as discussed in section 5.3. We mention , too, one software system, SYSTEM 9, which advertises that automatic topological checks are executed eithe r during data capture or editing. The product description for this software indicates that there are topological checks for geome tric primitives , range checks for attributes, as well as semantic topographical checks, such as a house cannot be in a river. However, it seems that nothing has been done regarding checks on the declarative statements, that is using explicit statements via the database system, except perhaps the work of Pizano et al. (1989). They examine some spatial constraints, for example ' automobiles and people cannot be in a crosswalk at the same time' or 'state highways must not cross state boundaries'. Even so, it appears there is nothing quite so valuable as the topological nature in order to confer consistency on the geometric represe ntations of spatial objects . In a spatial database, integrity constraint checking can be performed at two times: 1. At database creation, especially when incorporating huge line segment files.
; 1, , ,". ,
578
2. In crementall y at each s p;lti;ti U\lILTt inse rtioll , de le liull
;11)(1
,III
,~
~
.'.117
A varia nt of R2 adds the triangle neighbours to the po int information; this can be useful for checking the convex hull of th e triangulated network: R 2' (Edge-ID, Pointl-ID, Point2-rD, Tri a nglel-ID , Triangle2-ID) The true d a ta for this relati o n are:
RI
Tri a ngle-ID
Edge l-ID
Edge2-rD
Edge3-ID
1
a
2 3
e
b c h
d f
e
g
4
g d
I
I R2'
Edge-ID
Pointl-ID
Point2-ID
a b c d e
A A
B C F C E F E E B
g h
C B
C E B D D
Tri angle I-ID
Triangle2-ID
1
Null
Null
Null
2 1
2 Null 4
Null 3
4
4
2
3
3
Null
588
.. I, , ' '',',
Data sto re d in the
;I~
d;\Llh ; i S\ ' ; 11
HOME_NODE (Use r-lD, D oculllcnLnode-ID) Th e m ain realiza tio n s o f th e hyper co ncepts are:
1. A hype rte xt is a ne two rk of co nte nt po rtions which a rc a lwa ys lcx tu ,i! 2. A hype rdocum e nt is a netwo rk of conte nt po rti o ns whi ch ca n a lwa ys be di splayed o n a scr ee n or presented via a lo udspea ke r. 3 . In hype rme di a, the content po rtions a re like th e h ype rdoc umcnt hUI ca n a lso include digitized speech , audio reco rdings , mov ies , film c1irs and pres um ably tas tes, od o urs a nd tactil e se nsation s. L e t us use th e te rm hypermap to refe r to multime dia hype rdocum e nts with a ge ogra phic coordinate based access vi a mo use clic king or its equivale nt. It is the o bj ective of this cha pte r to de fin e exactl y th e prin ciples o f hype rmaps, their a pplicatio ns, and give so me hig hli ghts o n the ir physica l structures. First , though, we discu ss th e re prese nta ti o n of multim edi a d a ta a nd th e o rganiza tion of ma ps and re late d d oc um e nts into libra ri es.
16.2 MULTIMEDIA IMAGE DATA
Im ages, th a t is, aerial a nd land sca pe pho tog ra phs, infra-re d im ages, film based pictures , satellite da ta a nd o the r kind s o f re mo te ly se nsed d igita l d a ta , a re pe rha ps so me o f the most im po rt a nt kind s o f multim e di a info rm a tio n . Fo r them the most complex m a tte rs to dea l with a re:
1. Image re prese ntati o n , esse ntia ll y in o rd e r to re duce sto rage space occupa ncy. 2 . Th e re prese ntation o f dynamic images like m o vies . 3. M o de llin g and retri e ving picture obj ects. 4 . The crea tio n o f ope rators for e ffici e nt im age m a nipul a tio n . Sin ce much data capture and storage of im age info rm atio n requires specia lized e lectro nic ha rdware, an a logue o r digita l fo rm , o ur re vi ew will no t be compre hen sive as it conce ntra tes o n the d a ta mode llin g a nd d a ta orga ni za tion as pects.
16.2.1 Image modelling
W e approach th e topic of image re prese nta tion via re la tion a l mode llin g,
-
I oq ll ;; "
f'I'Y !,IC, Ii
Pic1 Uf O
P iC lufO
image- IO addr ess atlributes etc ..
I
I
1-1
For querying purposes
- image- IO - physical encoding
For display purposes and pattern recognition
Figure 16.4 Re la ti o nships be twee n logical and ph ys ica l pictures .
thinkin g o f logica l pi ctures a nd e le ments. A gen e r al re la tio na l logica l mode l is: IMA G E ( Im age- ID , Fo rm at , R esolutio n , C apturc d a te, (X , Y , Co lo ur),) in which we ha ve a ma tri x of picture column ide ntifie rs , Y a nd X, a nd th e ir or a g rey sca le va lu e , a nd a ncill a ry condition s . A mo re co mpact fo rm supple me nta ry d ata is:
e leme nts id e ntifie d by row a nd co nte nt re p rese nted hy a co lour , info rm a ti o n as to da ta ClpturC of the re lati o ll , ignorill g 111\:
ABBREV_ IMAG E (Im age- lD , (X , Y , Col()Ur) ") A co mm o n im a ge archite cture splits th e picture into two parts (Fi gure 16. 4). Th e first , ge ne ra lly fe asible for integra ti o n in to a re la ti o na l d a ta bases, refe rs to th e im age ide ntifiers a nd some a ttributes . Th e second corres po nd s to physica l sto rage, possibly on an an a logue videodisk o r a n optica l e rasable dis k . Whil e the first of th ese is used fo r qu e ry purposes , th e o th e r is th e bas is for pa tte rn recognitio n processin g o r picture displ a y.
16.2.2 Physical encoding
The ph ys ica l picture ma y be e ncoded in seve ra l fo rms, o f which th e co mm o n a re: ras te r o r bitmap , run len gth , qu adt ree a nd pyr a mid . The bitmap , th e easiest ph ysica l e ncoding technique, sto res each picture e le me nt o r pi xel va lue in consecutive o rd e r, usua lly ro w by ro w , beginnin g in th e to p-left co rner ( Fig ure 16.5 a) . Since a ll e le me nts a re me ntio ne d with o ut a ny regroupin g, no coordin ates a re necessar y: BITMAP (Im age -ID , X-form a t , Y_form a t , (Colo ur) *) in whi ch th e form a t re fe rs to th e ho rizonta l a nd ve rti ca l sizes , in numbe r
602
11)'/"'1111"1/1.1 (a)
I'dll/I'II""/'"
h(U
1I11,'}:" ,/,I/.I
(b) '-":"'"'1
~I
WBWWWUWW BBBWBWWW WWWBBBBB WWBWBBBW BBBWWBBB BBWBBBBB BBWWWWWB WBWWWWBW
1W1B3W1B?W 3B1Wl1:l3W 3W5B 2W1B1W3B1W 3B2W3B
I
Jj)j CICf)~ rJ---nm,
2B1W5B 2B5W1B
lW1B4W1B1W
W = white cell
B = black cell
3 = number of cells in a run in a row
Figure 16.5 Bitmap and run-length encoding. (a) Bitmap. (b) Run length.
n ' f ' 8j ..':.
.
1 1 1 1
0 1 2 3
Image White CO"",
White White Black
tE
:~, '
,magJ
K"
ICo'oo'
33
O1~'k Black
3 3
2 3
Third image
.";
'
,
2 2 2 2
Key
Colour
0
1
2
3
White Black White Black
Key
Colour
0 1 2 3
Black White White Black
Second image
Starting image
Wise:
This representation is valuable if we deal with only a few categories (colours) and have homogeneous blocks. A run-length encoding is fine for the Great Lakes, all bodies of water, or the dese rt of Australia , but is not so good for checkerboard patterns. Instead of grouping along a line or column, two-dimensional blocks, of which the quadtree is the most well-known, may be used. The pyramid model can be used to convey different levels of resolution, perhaps for having alternative representations of all details and general patterns. Usually applied to bitmap encoding, this structure increases the occupancy by only one-third, so that the extra costs here may be offset by the benefit of having different resolutions available. At times it may be necessary to have overlapping pyramids, and sometimes there are difficulties regarding continuity at boundaries of the pyramid blocks.
x/
(a)
of pixels. Customarily, arrays are 512 x 512 for a satellite image, or 1,9S0 x 1,980 for an air photograph. To solve the query as to the content (colour) of a pixel we search by a direct addressing system such as via arrays at the bit level. Run-length encoding recognizes that there may be stretches of like content in either horizontal or vertical dimension s (Figure 16.5b) , so it regroups runs of pixels with the same colour, generally operating row RUNLENGTH (Image-lD, (Y , (MiILX , Max->::, Colour) *)"')
Y
White White
Image
EB
~ .
4 4 4 4
Final image
(b)
Image
J~~~~
1 1 1 2 3 3 4 4
_
Key
0 1 2 3 1 0 3 1 3
.
Colour Duration W W W B B B W W B
-
2 1 4 2 2 2 1 1 1
.
(c)
Figure 16.6 Example of image sequences encoded by linear quad trees. (a) Sequence of cubes with a 3D Peano curve with breakpoint (temporal octtrees). (b) Example of succession of images . (c) Example of image sequence encoded with a linear quadtree.
604
11\11"'11""'/;.,
16.2.3 Dynamic image
III(HI.-I ..
Allilnlic World
Movie s, dynamic im age models, or animation s arc re prese fllcd as 'lin'. · dimensonal images with a time clement:
I Ireland
FILM (Film-ID, (Time, Image-ID , (X, Y, Colour)")"') Encoding may use methods previously discussed, but the quadtrce North (X , Z). However, if we have: Neighbour (0, E)
and
Neighbour (E, F)
we cannot deduce that 0 is a neighbour to F. Le t us tak e another example:
Spatial Rule A Spatial Rule B Spatial Rule C
As an example, the following transitivity rule hold s:
(c)
(b)
(a)
PR-fuzzy (Peano_ key, (Object, Membership_degree) *)
17.6.5 Spatial knowledge from logical deduction
Ee
L~
North (A, B)
17.6.4 Fuzzy spatial knowledge
G e
De
I,
I
\
)
Spatial Rul e [)
:
=---- s7~ ~ '
rJ~
Fi~lIn' 17.lli Correspondence between spatial rules and zones.
648
', / " ,/ " ,/ 1",,1\'/" '/1/1
Between (1 , I, K)
Pos ition (1 ,3,2)
Position (K , 4 , 3)
(,4'1
\ 1',I li, ,//dl"W/,"/!:" '1,/,,,,,,,'/11,""'11
whe re a , h ;llld c ; lr ~· ... q ',1I1('111 kll ,I',lli s, a lld a ngle s , (IS illu strat ed ill h glln: 17 .'20 ;
;111'11 ;1, 1)('(;1 ; 1I1t!
g; lIl1ll1 a ,Ire
\
R 3 (Tri a nglc- ID , a , b , c) R4 (Tri angle- ID , alpha , be ta , ga mm a)
where the numbe rs a re (x , y) coo rdin a tes, we ca n d educe: North (K, J)
The re a re rules to co mpute segme nt le ngths:
The role of deducti o n can be seen in ano th e r e xample , Imlll cartography. An impo rt ant problem in map design is the task or Ilallll ' place ment. Ind eed , the pos iti o ning of th e na mes o f cities , ri vers, s (;11 l' ,'-I , a nd so on must be do ne acco rding to seve ral rules such as a vo idin g it ;lvi ll ); mo re than o ne name at the sa me place, a nd avo id ing putting nilllll'S Oil the top of objects, especiall y point fea tures. Th e process or 111 ;111 co mpilation a nd des ign ca n possibly be e nh a nced by e xpe rt sys ll:IlI techniques, provided tha t the rules ca n be well codi fied (Cook a nd J () II l' ~ , 1990).
17.6.6 Spatial knowledge derived from numerical formulae Suppose we have a se t of tri a ngles defined o nl y by ve rtex coo rdin a tes a lld th e query is to retri eve a ll tria ngles with a 30° angle. To answe r thi s qu e ry we need to sto re so me geo metric or tri go no me tri c rul es, as foll ows. So me da ta are sto red in the d a tabase , whe re A , B , C a re ve rtex identifiers : R1 (Triangle- ID , A , B , C)
R2 (Point-ID , X , Y)
o r not s tore d in th e data base, but are possibl e to access through rul es, y /
Fuzzy boundary of a chunk of spatial knowledge
Rule 1:
a2
=
Rule 2:
b2
Rule 3:
c2
= (Xc - X A ) 2 + = (X A - x Bf +
(XB - X c? + (YB
(Yc - y A ) 2 (Y A
y B)2
and rul es to compute a ngles:
+ c2
-
a2 )/2b c 1
a rccos [(c 2 + a2
-
b2 )/2ca]
ga mma = a rccos [(a2 + b2
-
c2 )/2ab 1
Rule 4:
a lph a
= a rccos [(b
Rule 5:
be ta
=
Rule 6:
2
These rules a re sufficie nt if we need o nl y th e a bso lute value of th e angles, Sh o uld we require the angle o ri entatio n, we have to use o th e r tri gono metric rules to derive sin es . On e exa mple of this need is the appli ca tio n o f th e re fractio n law to de te rmining the pa th of a ro ute across diffe re nt tra nspo rta tio n medi a , as prese nted lale r in sectio n 17.7 .2.
17.6.7 Examples of spatial process representation In thi s secti o n we will prese nt the xG E M2 syste m fo r spa ti al kno wle dge e ngin ee rin g , a method deve loped in Au strali a (D avis et al., 1990) . Oth e r me th ods ca n be seen in Pe uqu e t (1984) o r We bste r (1 990) . Th e xGEM2 syste m is based o n producti o n rul es such as: IF pre mi ses THEN co nclusio n Or mo re precise ly, fo rm e d with qu adrupl ets :
100 % /
80% 60 % 40 %
c
.,x
Figure 17.19 Fuzzy boundary of a chunk o f spatial knowledge.
Yc f
-
-
A
.....
B
"-"
/ /" -- " -beta /"", ,a
't.,..
\
a!Ph9~:
gamma ,l __ b
c
Figure 17.20 Exa mple of a tria ngle and deriva tio n o f certain other fea tures.
•
650
" ,J , JI/' ,I " /I' HI/I 'I/) 'I
IF (parameter rcLllIOl1 "\1",''':-'1')11 Sp;t1I ;ti-exprt'.,:-.i()II)
THEN (parameter reLlli(III "xprcssloll sp;lli;d I.:X llIl'S:-.i')II)
The first term (paramcter) corresponds (0 tite Ilaille or all "lllily I,'iL'I ':IIII to the problem, such as geology or vegetation cover. TilL' Sl'C()I,,1 1"1.111 (relation) gives the type of relation between the paralllclL' 1 dl,,1 III. expression, which is the third element, defined below, ICL'( S. :lIld
Image segmentation
HYPOTHESIS
\/,,111.11 Idll)\fV/('fl):(' /(·ll/f".~·III.J/I( )/1
TypelIType2 Zone/Zone Zone/Zone City/City Building/Road Coastline/House Farm/Farm Road/Road
THEN flower = gagea THEN flower = gagea
IF soil = humid IF neaLchalet
~
meagre meadow
,.......,
Rich meadow Meagre meadow
Scree Rich meadow
I i(a)
=-' ~~~, Scree :.:-}:.
illill
O Soi(with miscellaneous t;:;=:;:;Y.0'DEl (b)
characteristics
Figure 17.23 Example of soil characteristics and flower location. (a) Geographical data, (b) Quadtree representation.
654
IF IF IF IF IF IF
"1) , 111,"
neaLstrea m soil = deca lcified soil = scree dry_stream soil rich_meadow soil = meag re_meado w
"III) WI" " n"
'1'111 ':N !lowe r = cpil o hillill
'1'111 ': N !lowe r = cpilohiulll
TH L N !lowe r = rum cx
II : ljll :l dll\'l' ( I ', {I" ':III() key , Side kll glh ))
'I'III ': N !l()WC I 1I1111 t'X
II" quadllec (1" , {l'e;IIH L kcy , Sid c_kll gll1 })
THEN fl owe r = rum ex
THEN flow e r = ra nunculu s
TH E N flow e r = o rchis
TH L N /l owe l := laJlulleulu s
IF qu adlrcc (G, {Pe. ~I" . ",,', ' "/"'(1 Topology Nct WO I k . ,\ I() " datab;lSc 111Odcl. 1';4. :174 gcolllet ry. 177-1) Nod e, 76, 51)7
Node chaining algorithm, 194
Nontopological data model , 206-7
No rm alization, 374, 390-1,490--2
Null data, 480
Object
c ha rac teris tics. 65--6
com plex, 452
ide ntifie r , 64
orientation. 459.621,635
pair, see Dyad
pictorial. 508
spat ial, see also Spatial Object
Octahed ron, 245
Octant, 242, 436-8
Octt rees. 242, 437
extended. 438
lin ea r, 438, 518
O ne-ce ll , 187
Operators
Boolean , 520-22
geometric, 423
relational , 483 , 526-8
Ordering
pat hs. 159
stability , 166
Orientation. 224
Overshoot. 11)7
P,lckil1g ,"pacc. 22S
Paralllct lic ICPICsc lltal ion. 145-6, 265
Path , IXI . I,'il)
oric lIl l' d . IXI ::>. (11I'0lll:1i Sp:Il'C. l'i l ) (!O
P;lth lilldill l~' 'i,ll, 7
Pcallo
Hilhl'lt,'\IIVI', II, \
ke ys, 1/1 ,' -I. ,I I() , "lil/. ) I,X
N ,:IIIVC, 1(.,1 \
Pca iiO 11'1'''' !iI )'I ' I\I :1, ~ .) II
01"'1 ai'" " , "> .'() t)
rc I: It i(lll , " II 1 ')
I'h ys ic:d clll'()dilll~' hOI
I'hysic;d ICPICSCIII;lliol) . I)
Pipe Illodelling, 410, 422
Pictorial informatioll , 604, 652
Picture objects, 613
Pizza modelling, 427, see also Grid cell,
Raster
Photograph, 610
Planar enforcement, 188
Pl a tonic solids , 244-5
Point. 74
centroid. 84, 269
Point-in-polygon algorithm , 267
Points dictionary data model , 206
Polygon, 79, 198
chaining edit, 11)5
clipping, 277
data model. 206-7
intersection, 272
modelling, 403
orientation, 408
overlay, 280
shape , 276-7
slivers , 283
union , 272
Pol yhedron, 417
Polylines,399
Position , 36 , 65
Positioning, 116
Postal zones, 124-5
Precision, 104, 300
Problems, 27
Projection
map, 128
octtree,530
re la tional, 41)1
Proximal region (zone), 246
Proximity , 136
Psuedo record , 377
Pyramid , 234, 436
Quadrant, 238, 322, 429
Quadrat, 89
Quadtree, 235-40
ex tended,432
indexing, 569
lin ea r. 430
modelling, 429
operations, 321-3
678 Quadtree (coni .): rotation, 324
Quaternary triangular mesh, 133
Query, see Spatial qu e ry
Raster, 233, see also grid ceJJ ra steriza tion , 292-3
Rea l world , 5, 359
Reasoning, 642-3
Rect a ngle, 296,614
minimum bounding, 127 , 297
R-tre e ,298
Recursive process, 153
Region qu e ry, 538-9
Relation ,
definition, 366. 479
normal forms, 493
nor mali za tion, 390, 491
operator, 526
R e lational
algebra , 483
data table, 353
model, 366
operators, 483
Relationships, implied, 384-5
Representation
geome tric represe ntation , 446
multiple, 333,334 , 400,427,448
rul es, 469
standardization, 447
Resolution, 221,226, 230, 301
Resource inventory, 4