Represening Topological Relaionships for Moving Objecs Erlend Tøssebro 1 and Mads Ngård 2 1 Deparmen of Elecronics and Compuer Science, Universi of Savanger, NO-4036 Savanger, Norwa erlend.ossebro@uis.no 2 Deparmen of Compuer and Informaion Science, Norwegian Universi of Science and Technolog, NO-7491 Norwa mads@idi.nnu.no Absrac. Several represenaions have been creaed o sore opological informaion in normal spaial daabases. However, no ha much work has been done o sore such relaionships for spaioemporal daa. This paper eends he represenaion of moving objecs from [7] so ha i can also sore and enforce some of he opological relaionships beween he objecs. This is done in a fashion similar o he Node-Arc-Area model for normal spaial daabases. One use of such a represenaion is soring a changing spaial pariion. 1 Inroducion For purel spaial daabases, here are several was o represen opolog. One such wa is he Node-Arc-Area represenaion [13]. Each line segmen sores a link o he wo regions ha i borders, each poin sores a link o each line segmen ha begins or ends in ha poin and each face (conneced region) sores a link o a leas one of is border curves. This ensures ha if he border of one region is updaed, he borders of all oher regions are auomaicall updaed as necessar o mainain known opological relaionships. An imporan use for opological informaion is soring a spaial pariion, since wihou opological informaion i is difficul o conrol wheher a given se of regions forms a pariion or no. [5] presens an absrac model for spaioemporal pariions called he honecomb model. This is called an absrac model in his paper because i is based on infinie poin ses. A discree model, b conras, is based on consrucs ha one could realisicall sore in a daabase such as sraigh line segmens. Boh raser and vecor models are discree models. The honecomb model represens ime as an era dimension and represens a spaioemporal pariion as a hreedimensional pariion wih he limiaion ha a an ime insan he pariion should be a legal wo-dimensional pariion. However, no discree model for spaioemporal pariions is known o he auhors. Nor is a discree model of spaioemporal informaion ha akes opological relaionships ino accoun. M. Raubal e al. (Eds.): GIScience 2006, LNCS 4197, pp. 383 399, 2006. Springer-Verlag Berlin Heidelberg 2006
384 E. Tøssebro and M. Ngård 1.1 Eamples of Moving Pariions Here is a collecion of eamples of where he abili o sore a spaioemporal pariion migh be useful. The firs was also menioned in [5]. Eample 1: Subdivision of he world ino counries: The counries of he world make up a pariion because he cover all he land and do no overlap each oher. The borders of counries ma also change (such as when eas and wes German merged or when Yugoslavia spli apar), bu onl in discree seps. Eample 2: Land cover: The pe of vegeaion ha covers differen areas changes coninuousl over ime. I would be heoreicall possible o monior hese changes ver ofen, bu he mapping agencies do no have he manpower for his. So insead snapshos are creaed ha ma be decades apar. To visualize he changes in land cover i is beer o produce an inerpolaion ha ields a bes guess as o how he borders moved han jus do discree jumps. Land cover wihin a given area migh be updaed simulaneousl. However, land cover regions neighbouring his area ma be updaed a enirel differen imes. Eample 3: Soil pe classificaion: All land regions have a soil pe and he classes are usuall disinc, hus making his ino a pariion. Soil pe ma also change coninuousl in ime. Usuall his change is ver slow, measured over millennia or more, bu in some cases changes ma happen far more rapidl, such as when fores cover is removed and erosion becomes much higher han i was. 1.2 Eamples of Topolog No Involving a Pariion Here are some eamples of siuaions in which soring eplici opolog migh be useful even hough he do no involve pariions: Eample 4: Visualizaion of how he landscape has looked in he pas. Landscapes change. Rivers aler heir courses and lakes grow smaller or larger over ime. Glaciers grow and shrink. In his case one no onl needs o creae emporal version of he objecs, bu one also needs o glue hem ogeher o avoid noiceable inconsisencies. For insance, if a river flows ou of a lake, i should end a he lake raher han jus ne o i or slighl inside i. Eample 5: In an ordinar map daabase, one migh have a glacier ha ends over a lake. Boh he glacier and he lake ma grow or shrink over ime, bu he ofen border each oher. Eample 6: When a major oil spill occurs, one migh wan o find ou if an animals for which is posiion is known were inside he spill area a an ime. 2 Relaed Work Represenaions for opological relaionships have been sudied eensivel for purel spaial daabases as well as for spaioemporal daabases wih sep wise discree changes. This secion describes hose earlier works ha his paper direcl builds on. [10] describes a emporal opolog ha he calls ropolog. This ropolog describes he possible chains of evens ha ma occur for a single objec. I does no,
Represening Topological Relaionships for Moving Objecs 385 however, deal wih muliple conneced objecs and does no assume an paricular sorage model. A ssem for reasoning abou changes in he opological relaionships beween moving objecs is described in [3]. [7] describes a discree model for independen spaioemporal objecs. This model is based on ime slices. A ime slice is a period of ime in which he objec moves according o a simple funcion. Poins move linearl. The end poins of line segmens can move like oher poins ecep ha he line segmen is no allowed o roae. Area objecs are represened b heir border lines. A roaing line segmen is represened as wo line segmens ha shrink o poins in one or he oher end of he ime slice. [12] describes a mehod for generaing he represenaion of faces (area objecs ha consis of onl one conneced componen) from [7] using snapshos of he faces. For pure spaial daa several vecor represenaions have been creaed ha represen opolog eplicil. The Node-Arc-Area (NAA) represenaion ha is presened in for insance [13] is one of hem. In he NAA represenaion, lines sore he area objecs ha are o he lef and righ of he line as well as heir sar and end poins. The border of an area objec is hus defined in he line objecs. Thus if he border of an area is updaed, he borders of is neighbours are also auomaicall updaed. [11] describes how o implemen opological relaionships on comple regions using plane-sweep algorihms on a realm. Tha paper sas nohing on how o make ha realm accurae from he ouse. [6] formall describes how o handle opological predicaes in spaioemporal daabase ssems. Their basic mehod is o lif spaial predicaes o he spaioemporal case. Lifing a predicae convers a spaial predicae ino a spaioemporal one wih a emporall varing oupu. For an ime insan he oupu of he lifed predicae is he same as for he spaial predicae wih he same objecs a ha ime insan. The hen define quanificaion on hese such ha one migh ask wheher he predicae is rue a some poin in he ime inerval or over he whole ime inerval. The hen use he universall quanified operaions o define emporal aggregaions, for eample Eners. A poin p Eners a region R if p sars ouside he region, hen mees i and hen is inside i. The furher show ha such lifing and defining emporal predicaes gives a far more epressive language han using he basic Egenhofer relaions from [4] on 3D objecs. [2] defines spaioemporal objecs b an iniial snapsho and a ransformaion funcion. Some closure properies of his model are hen analsed. For insance, for a linear ransformaion funcion, he model is closed under union, inersecion and difference for recangles, bu onl under union for arbirar polgons. [1] and [8] define discree models for spaioemporal daa based on consrains. A conve region is defined as a se of linear consrains (such as: + 2 5). A nonconve region is defined as a union of conve regions. The advanage of such a ssem is ha i can be easil eended o arbirar dimensions and can use ordinar relaional algebra operaions o epress man spaial operaions ha need special operaors in absrac daa pe approaches. One disadvanage of his approach is ha i does no ake opolog ino consideraion. A region is sored as a se of linear consrains, bu heir model has no wa of indicaing eplicil ha a given region shares a se of line segmens (equivalen o linear consrains) wih anoher region. This means ha if one updaes one of he regions, here will be an inconsisenc unless he relaionship is somehow sored
386 E. Tøssebro and M. Ngård eplicil. One can onl rea opological relaionships indirecl and his makes inconsisencies much more likel. Anoher problem is ha i is ver difficul o find he border of a region from he region represenaion. Changing he consrains from + 2 5 o + 2 = 5 is no enough as a conjuncion of such consrains is, in general, unsaisfiable. Raher he individual consrains mus be convered ino line segmens, each defined b hree consrains (one for he infinie line and wo for he end poins). The border line is he disjuncion of hese line segmen consrains. 3 Possible Models In his secion hree models for soring opological informaion for moving objecs are described and analsed. The firs subsecion discusses which relaionships o sore and sas somehing abou wha needs o be sored for poins, lines and regions. The subsequen hree subsecions describe hree differen models ha migh be used o sore he shared boundaries given in he firs subsecion. 3.1 Which Relaionships o Sore The relaionships ha need o be sored eplicil are hose which involve he borders of regions or lines as he borders are infiniel hin and even in errors ma change he resul of he corresponding predicae. The following definiions of he relaionships from [4] will be used: Table 1. Topological Relaionships Operaion Disjoin Mee Overlap Overlap wih disjoin border Cover CoveredB Inside Conain Equal Meaning The wo objecs do no share eiher border or inerior The wo objecs share borders bu no ineriors The wo objecs overlap. This means ha he ineriors overlap and he borders cross each oher The ineriors of he wo objecs oevrlap bu he borders do no cross One objec is inside he oher bu shares a par of is border The reverse of Covers One objec is enirel inside he oher The reverse of Inside The wo objecs have equal shapes For a pair of regions he relaionships mee, covers, coveredb and equal involve he border and herefore mus be handled eplicil. The oher predicaes (overlaps, overlaps wih disjoin border, inside, conains and disjoin) deal onl wih he ineriors of he regions and can herefore be compued using he geomer of he objecs.
Represening Topological Relaionships for Moving Objecs 387 a) Original snapshos of O1 and O2 b) Sliced represenaion of O1 and O2 Fig. 1. Time slices wih meeing relaionship For a poin and a region, mee needs o be sored eplicil while disjoin and inside can be compued from he geomer. Mee 1 can be compued from he geomer if he poin moves from ouside he region o inside. However, he poin ma also sa on he border of he region for some ime, or i ma graze he region. In hese las cases he relaionship mus be sored eplicil or he daabase migh no recognize i. For a pair of lines boh overlap in he end poins and ineriors mus be sored eplicil as in boh cases even in errors ma cause a differen answer. For a poin and a line, one mus sore eplicil an period of ime in which he poin lies on he line. Crossings can be compued from he geomer. The onl wa o idenif shared borders reliabl is o sore he shared par in a shared locaion like i is done in he Node-Arc-Area represenaion. For spaioemporal daa, i herefore becomes imporan o sore shared boundaries beween spaioemporal objecs. Line crossings are poins and should herefore be sored as a shared moving poin. Poin crossings ma eiher be a shared moving poin (if he poin remains on he line or region border over ime) or a single spaioemporal poin (wih a single ime locaion raher han moving) if he crossing occurs a a paricular ime insan. 3.2 Time Slices To mainain he spaial opolog in a ime slice model, all neighbouring objecs mus have he same ime slices. Inside a ime slice he shape of he objec is linearl inerpolaed. Therefore, for each ime here is a new snapsho for one of he neighbouring objecs, he inerpolaion of all mus change if he borders are o remain equal. Changes in opolog should onl be allowed beween ime slices. The main problem wih his approach is ha i resuls in a lo of ime slices ha are unnecessar for each region bu necessar for he whole. One canno assume ha all he regions are updaed a he same ime (If he were, he ime slice approach would work fine). This problem in illusraed in Figure 1. A parial soluion o his problem is as follows: Whenever one objec has a snapsho and herefore begins a new ime slice, make a new ime slice for all neighbouring 1 A poin mees a region when i is on he border of he region.
388 E. Tøssebro and M. Ngård objecs as well, bu no objecs ha are furher awa. This means ha no all objecs mus have all ime slices, bu i does mean ha each objec mus have one ime slice for each ime one of is neighbours is updaed as well as for when he objec iself is updaed. If an objec borders four oher objecs, i will have 5 imes as man ime slices as if i were isolaed. In he land cover pe his problem migh be reduced because land cover is usuall updaed in large areas raher in individual regions. All land cover regions wihin a given saellie image is probabl updaed a he same ime. Thus his problem onl occurs for hose land cover regions ha lie on he border beween differen saellie images. A ime slice model in which all objecs have he same ime slices ma use a basic node-arc-area model in each ime slice as opolog onl changes in he insans beween ime slices. One problem wih a pure ime slice approach is handling emporal opological relaionships like eners and crosses. As he ime slices of he wo objecs are probabl differen, he canno be used direcl as a basis for he opological relaionships. 3.3 3D Model One wa of avoiding he problems of ime slice models is o use general 3D daa pes o sore moving objecs. However, his would require a new model for moving objecs as well as a new algorihm for creaing moving regions from snapshos. One drawback of 3D pes when compared o a sliced represenaion is ha ou lose he direc correspondence beween he non-emporal and moving objec pes. However, one needs onl fairl simple operaions o erac snapshos from he 3D daa pes. Time slices have one oher advanage: When ou quer abou a ime insan or shor ime inerval, he daabase onl needs o fech hose ime slices ha are relevan for he quer, which ma be onl a small fracion of he oal. For a pure 3D model, on he oher hand, he enire geomer of he objec needs o be feched. 3.4 Hbrid Model This las advanage of ime slices ma be reained if one defines a hbrid model ha looks as follows: A cerain insans in ime (picall when here is a snapsho available) he shape of he objec is sored. The inervals in beween hese ime insans are ime slices in which he shape of he objec is inferred. However, raher han using jus a linear funcion o infer he shape, he shape ma be represened b an 3D surface ha can be represened b a se of 3D riangles and ha ields a legal 2D objec a all ime insans in he ime slice. The sliced represenaion described in [7] would be a special case of his represenaion.
Represening Topological Relaionships for Moving Objecs 389 4 Defining he Hbrid Model In his secion, he hbrid daa model is defined in more deail. In Secion 4.1, a se of 3D daa pes is defined. These are hen used as building blocks for he hbrid model. The hbrid daa pes are defined in Secion 4.2. 4.1 Building Blocks of he Hbrid Daa Tpes In his secion, daa pes for 3D poins, lines and riangles are defined. Addiionall, pes for ime inervals and emporal line segmens are defined. 3D Poin: A 3D poin is defined b is coordinaes: 3DPoin {(,, ) ( R R R) 3D Line Segmen: Each line segmen has wo end poins: 3DLineSegmen {( s, e) ( s 3DPoin e 3DPoin) 3D Triangle: To make he algorihms for compuing inersecions easier, surfaces should be piecewise sraigh. The onl wa o ensure a piecewise sraigh surface is o creae i as a se of riangles. Therefore, he 3D surface elemen of his model is a riangle: 3DTriangle {( p 1, p 2, p 3 ) ( p 1 3DPoin 3DPoin p 3 3DPoin) p 2 Time Inerval: A ime inerval is a conneced se of numbers wih a given sar and end: Inerval {( s, e) ( s R e R s < e) Temporal Line Segmen: A emporal line segmen is a 3D line segmen where he end poins have ascending imes: TempLineSeg { s ( s 3DLineSegmen s.s. < s.e.) 4.2 Definiions of Spaioemporal Daa Tpes Tha Sore and Enforce Meeing Relaionships In he hbrid approach oulined in Secion 3.4, moving objecs are represened b ime slices. However, he inerpolaion beween he snapshos is more general han he one given in [7]. For mos of he pes, all ha needs o change is sill he definiion of he uni, or ime slice. The overall pe can in mos cases remain unchanged from he pe from [7]. In hese definiions, he unis are given a semanic meaning of heir own. A uni is assumed o be he period beween wo updaes of he objec. Thus for ever ime a moving curve is updaed, a new curve uni is added. The same applies o poins and regions. Eamples of he poin and line pes are given in Figure 2 and Figure 3. Eamples of he face pes are given in Figure 4. 4.3 Moving Poin The moving poin ma be modelled as a se of pollines ha for each ime insan gives onl a single poin.
390 E. Tøssebro and M. Ngård Poin Uni Moving Poin Curve Uni Moving Curve Fig. 2. Moving Poin and Curve The moving poin ma serve wo funcions: I ma be an independen daabase objec in is own righ (such as a car, building or marked animal), or i ma represen he meeing poin of several moving curves or regions. These wo funcions have differen sorage needs. In his definiion, boh hese pes are combined ino he single moving poin, bu i migh be argued ha he should be differen pes. The are defined as he same pe here o keep he pe ssem small and herefore manageable, and because hese wo roles are no muuall eclusive. The following hree opological relaionships mus be deal wih for moving poins: On line: If he poin remains on a given moving curve (including he border of a region) over ime, his mus be sored eplicil as onl minor inaccuracies can make he poin be ouside he line. In mos cases he poin will be on onl one line a a ime and for he oher case one can conclude ha he lines have he same locaion. The poin herefore onl needs o sore a link o a single line. Since a poin is no necessaril on he line during is enire lifeime, his relaionship should be sored wih he poin unis raher han in he main poin objec. End poin of curve: A moving poin ma serve as a meeing poin for several moving curves or regions. The mos efficien wa o sore his relaionship is o sore i in he curves as a curve can have onl wo end poins bu a poin ma be he end poin of an arbirar number of curves. Discovering which curves end in a given poin can be done b quering a spaial inde wih he posiion of he poin. This is guaraneed o reurn all he curves ha end in he poin. An oher curves reurned can be filered ou b checking heir end poins. Mee: Two moving poins ma have he same posiion a a paricular ime insan or in a paricular ime inerval. This relaionship ma be sored b having he wo moving poin objecs share poin unis when he are a he same posiion. Meeing a a ime insan can be sored b leing hem share a degenerae poin uni ha is valid onl a ha ime insan. Temporal mee: Moving poins ma be conneced in ime. If for insance one moving poin splis ino several, here are moving poins ha mee in ime. A he end ime of one poin i is a he same place as anoher poin objec begins.
Represening Topological Relaionships for Moving Objecs 391 The Poin Uni is herefore defined as follows: UPoin {( s, c) s TempLineSeg c MCurve In his definiion, s defines he movemen of he poin and c represens he on line relaionship. An MCurve is a moving curve and is defined laer. The Moving Poin is defined as follows: MPoin {( U, M) U UPoin M MPoin ( a, b U): ( a b) empoverlap( a.s, b.s) ( p M):empMee( his, p) Where empmee(p1, p2) is rue iff he valid ime of p1 mees he valid ime of p2 and he wo poins are a he same locaion a ha ime. empoverlap(s1, s2) is rue iff he valid imes of s1 and s2 overlap. In his definiion, U is he se of poin unis ha make up his moving poin and M is he se of poins ha emporall mee his poin. 4.4 Moving Line The moving line pe from [9] is defined as a se of moving curves. According o [7], an se of moving line segmens makes a valid moving line according o his definiion. However, i would be ver difficul o deal wih opological informaion wih such a consruc. I would have no end poins, and he border curve of a region is he ideal place o sore a poiner o a neighbouring region. As for a moving poin, a moving line ma serve wo purposes. I ma be an independen daabase objec in is own righ, or i ma mark he border beween wo paricular regions. A simple and sraighforward definiion of a moving curve would be his: A moving curve is a 3D surface consising of planar faces whose inersecion wih an plane parallel o he - plane would be a valid curve (coninuous se of line segmens). A moving line could hen be defined as a se of moving curves. The moving curve ma addiionall have o sore he following opological informaion: Fig. 3. Moving Line Bordering regions: The curve ma be a par of he border of up o wo regions. This is sored in he main curve objec. This makes a curve ha serves as a border represen he border beween wo paricular regions.
392 E. Tøssebro and M. Ngård End poins: An curve has wo end poins in space. However, hese poins onl needs o be sored eplicil if he serve as meeing poins for several curves. Poins on line: If one wans o quer which cars are on a paricular road, one ma wan o sore which cars are on he road a an given momen. However, his informaion ma ake up a lo of sorage space and can also be discovered hrough a spaial search of he poins combined wih he on line relaionship for poins. I is herefore no necessar o sore direcl. Mee: Two moving line objecs ma share moving curve objecs. If his relaionship changes over ime, i is handled he same wa as wo regions ha sop bordering one anoher. Temporal mee: If wo area objecs ha used o border each oher no longer do, hen he border curve should spli ino wo new curves, one for each area objec. These new curve objecs should sore he fac ha he are coninuaions of an old curve. The curve uni can be defined as follows: UCurve {( v, T) v Inerval T 3DTriangle ( v): ( AInsan(, T) Curve) The AInsan funcion creaes he inersecion beween a fla plane a a given ime and a given se of 3D objecs. The Curve pe represens a non-emporal curve. The moving curve is a se of curve unis: MCurve {( C, e1, e2, f1, f2, TM) C UCurve e1 MPoin e2 MPoin f1 MFace f2 MFace TM MCurve ( a C) ( b C): ( Overlap( a.i, b.i) ( a = b) ) endpoin( e1) endpoin( e2) borderface( f1) borderface( f2) Overlap( f1, f2) ( mc TM):TempMee( his, mc) In his definiion, endpoin(p) indicaes ha he poin is an end poin of his curve, and borderface(f) indicaes ha he face is bordered b he curve. The MFace pe represens a moving face and is defined laer. The moving line is a se of moving curves. I does no require ha hose curves have he same ime slices. The reason for his is given in he ne secion. In he eample in Figure 3 he differen dash paerns indicae differen moving curves. 4.5 Moving Region MLine { C C MCurve The moving region pe from [9] is defined as a se of non-overlapping faces. A face is a conneced area objec ha ma have an number of holes. The main opological relaionship beween faces ha should be handled eplicil is bordering, ha is, which regions border his region. This relaionship can be deduced from he bordering regions relaionship for moving lines.
Represening Topological Relaionships for Moving Objecs 393 Face Uni Moving Face Fig. 4. Moving Face A moving ccle is a se of moving curves ha for an ime insan in he ime period ha he ccle objec is valid forms a ring. In he models from [9], a moving ccle is considered o consis of onl one curve. However, when one wans o sore opolog i is beer o hink of a ccle consising of a se of curves. Each curve in he se represens he boundar beween wo paricular regions. The moving ccle is herefore defined based on he moving line pe. MCcle {( l, v) l MLine v Inerval ( v):ainsan(, l) Ccle The curve unis in each moving curve represen he boundar beween wo paricular region unis. Since he regions bordering a paricular ccle ma be updaed a differen imes and herefore have snapshos a differen imes, he curve unis in each curve in an line mus be allowed o have differen ime slices. A moving face consiss of one moving ccle represening he ouer boundar of he face and N moving ccles defining he holes. Discree changes in he moving face are assumed o happen in he insans beween ime slices. All he ccles in a given face uni should be valid in he ime ha he face uni is valid because changes in opolog such as he appearance of new holes should onl occur beween ime slices. The face uni is herefore defined as follows: UFace {( oc, HC, v) oc MCcle HC MCcle v Inerval ( hc HC): ( Inside( hc, oc) ( hc.v v) ) ( oc.v v) In his definiion, Inside(a,b) is rue iff a is inside b. Noice ha in his definiion he face unis ma be differen from he unis of he moving curves. This is because a curve has a new uni whenever one of he faces ha i borders is updaed. Thus if curve a borders faces b and c, a has a number of unis equal o he oal number of unis of b and c.
394 E. Tøssebro and M. Ngård A moving face is defined as a non-overlapping se of face unis: MFace { UF UF UFace ( a UF) ( b UF): ( Overlap( a.v, b.v) ( a = b) ) A moving region is a se of moving faces. These are no required o have he same ime slices. If a region consiss of several faces one is no guaraneed ha snapshos of all he faces from he same ime eis. MRegion { F F MFace ( ab, F): ( a b Disjoin( a, b) ) 5 Consrucing he Hbrid Model This secion presens a mehod for consrucing he hbrid model of moving regions from a series of snapshos of he individual regions. This mehod assumes ha he regions are updaed periodicall bu no necessaril simulaneousl. The opological relaionships beween he regions are sored in an adjacenc graph. All opological relaionships should be mainained unless his graph is eplicil changed. Modelling a pariion and modelling a nework are wo sides of he same coin as he borders beween he regions in a pariion forms a nework. A model for one also works for he oher. This also applies o parial pariions (ones ha cover onl a par of he space of ineres). 5.1 Consrucing a Moving Pariion When creaing he componen objecs of a moving pariion, i is easier o inerpolae he border curves han he regions hemselves. One approach based on regions would be o inerpolae each region separael and hen ensure ha heir borders mee. Wriing a procedure ha could do his and ensure consisenc in places where more han wo regions mee would be quie comple. Therefore, he algorihm presened here for creaing a moving pariion is based on inerpolaing he border curves raher han he regions. The algorihm is also based on an adjacenc graph 2 supplied b he carographer. This adjacenc graph mus be eplicil updaed when he opolog changes. The algorihm assumes ha here is a pre-eising pariion ha one wans o updae. When creaing a pariion for he firs ime, one runs a similar algorihm for each ccle in he adjacenc graph of he iniial pariion as well as for each edge ha does no belong o a ccle. When modifing he regions so ha he fi ogeher in he pariion, he ssem alwas sores he original versions as well as he modified ones. The original versions are used for inerpolaions whenever a new version of a region is insered. This is dome o ensure ha he inerpolaed versions of he regions sa as close o he original as possible, especiall if one region is updaed several imes while anoher is no. 2 An undireced graph wih one node for each face and an edge beween each pair of faces ha border each oher.
Represening Topological Relaionships for Moving Objecs 395 Algorihm. UpdaePariionInerpolaion(nf, FS, ag) Inpu: A new face snapsho nf, he se of faces in he pariion FS, and an adjacenc graph for he faces ag. Oupu: The face se wih a new snapsho added Mehod: Le of be he previous snapsho of nf Le fn be he node in ag ha represens of Le mf be a cop of nf For each ccle in ag ha conains fn do Compue a meeing poin for all he faces in he ccle using he original raher han he modified snapshos. This is done b adding a buffer of he same size for all he faces (if here is a gap) or subracing an area of he same size for all he faces (if he all overlap). End for For each edge in ag ha ends in fn do Consruc a meeing line beween he wo faces b adding a buffer o he oher face and removing overlap unil he mee. For each side where here is a ccle ensure ha he lines end in he meeing poins. Updae mf b replacing he original line wih he new meeing line (See Secion 5.2) End for Inerpolae he lines of he face mf from heir version in of Add he inerpolaion and mf o FS Add nf o FS as he original face (for use in laer runs of his algorihm) reurn FS End UpdaePariionInerpolaion The adjacenc graph is supplied b he carographer who knows which regions are supposed o border each oher. Updaes o he opolog is refleced in updaes of he adjacenc graph. The following updaes are possible: Removing an edge A he edge of he pariion: This region no longer borders ha region. The inerpolaion ssem should ensure ha from he poin in ime in which he edge was removed here is a small gap beween hese wo regions. (Regions in he adjacenc graph should no overlap. A region ma be added o he graph as an isolaed node o indicae ha i should no overlap an of he oher regions). In he middle of he pariion: These wo regions no longer border each oher. Reduce he meeing line o a poin a he ime in which he edge was removed. This poin ma hen epand ino a line beween a new pair of regions. A he insan when he line is removed neiher i nor an newl insered lines eis hus forming a possibl emporar ccle. Removing a node As nodes correspond o faces, his means ha a face no longer eiss. Inser a single poin represening he face as a new version and inerpolae neighbouring faces o his poin. This poin is he new meeing poin of he evenual new ccle creaed b removing he node. All he edges from ha node are also removed.
396 E. Tøssebro and M. Ngård Adding an edge or node is jus like removing one ecep ha he process is reversed in ime. Whenever he adjacenc graph is updaed, all affeced faces mus have a new ime slice, where he sae a he beginning of his new ime slice is he sae according o UpdaePariionInerpolaion afer he change in he graph. 5.2 Consrucing a Moving Nework A nework ma consis eiher of nodes (poins) wih curves beween hem (like graphs ecep ha he shape of he curves ma be imporan) or roues and inersecions. The difference beween hese wo is ha he roues-and-inersecions model can be equivalen o a non-planar graph as roues ma cross each oher wihou inersecing (one road goes in a unnel below anoher wih no means of swiching from one o he oher). If he enire nework is updaed a he same ime insans, represening a changing nework is rivial. A nework uni is simpl a collecion of moving curves which end in he same moving poins (nodes). Changes in opolog (removal of edges or nodes, merging of nodes and edges) happen onl beween he ime slices (a he end of one and beginning of he ne) in his model. When he curves are updaed individuall, he are inerpolaed as normal. Addiionall, a new version of he end poins are sored. The end poins are inerpolaed in ime beween all he end poins of all he curves ha mee here. Thus he meeing poin of four curves would be updaed whenever an of he four curves is updaed. This means ha he final line segmen of each curve changes more ofen han he oher lines, and he inerpolaion of hese line segmens canno use he normal algorihm from [12]. One alernaive mehod would be his: Creae he projecion of he final line segmens and he changing end poin on a plane ha is parallell o he ime ais and has an angle o he - ais ha is he average of he angle of he final line in he wo snapshos. Creae he Delauna riangulaion of he projeced lines. Use his as he riangulaion of he final line segmens. Going back o a full 3D represenaion is eas since he riangulaion does no inser an new poins and he 3D coordinaes of he poins used are known. One eample of such a curve and he proposed inerpolaion algorihm is shown in Figure 5. Meeing Poin Curve a ime 2 Delauna Triangulaion Curve a ime 1 Meeing Poin Ordinar Inerpolaion from [12] Fig. 5. Inerpolaing a line in a nework
Represening Topological Relaionships for Moving Objecs 397 For neworks consising of roues and inersecions, a modified version of his mehod can be used. Each roue is equivalen o a conneced se of edges and each inersecion is equivalen o a meeing poin. Places where roues cross bu here is no inersecion are no represened as poins. This is a simple wa of disinguishing such crossings from regular inersecions. 6 Handling Curren Time The daabase described so far handles hisorical spaioemporal daa quie well. However, when asked abou he curren sae, i can onl reurn he las sae of he various polgons, and his sae can be inconsisen for hose polgons which have no been updaed for some ime. The mos sraighforward mehod is o assume ha he objecs are saic afer he las updae. This mehod works well if he objecs do no move oo much. The mehod basicall goes as follows: Take he mos recen snapsho in he area of ineres. Inser a new ime slice of each objec ha eends from he las snapsho of he objec o he curren ime. The objec is considered o be saic in his ime slice. In his new ime slice, all he moving poins and curves are saic and do no change from heir mos recen sae. This includes he curves ha form he boundaries of moving regions. This is a fairl simple mehod ha works well in man cases. However, i does no ake he movemen of he objecs ino accoun and ma herefore produce highl inaccurae resuls in cases in which he objecs move fas. One alernaive is o r o erapolae hem based on pas movemen. To do his for a general line or region is quie comple. A naïve approach would be o erapolae based on he movemen of he individual poins ha make up he line or region border. This produces arifacs like shown in Figure 6. Fig. 6. Erapolaing using a Triangle Represenaion 7 Implemening he Model In his model man objecs should have references o each oher. For insance, he region objec sores is boundar as a se of curve objecs. This ensures consisenc,
398 E. Tøssebro and M. Ngård bu i also creaes a problem. To fech he geomer of a region, one mus access all he curve objecs ha make up is boundar, and all he poin objecs ha make up he meeing poins for hose curves. Unless hese are sored ogeher, his ma slow down he ssem. Border curves canno be sored ogeher wih boh of he regions ha he border as hese regions ma be sored in enirel differen places on he disk. An alernaive is o sore several copies of hese objecs. For he curve, one would sore one cop for each of he wo regions ha have i as par of heir boundaries. This would make rerieval more efficien, bu would inroduce he possibili of inconsisencies. To solve his one would need a daabase ssem ha could handle inegri rules of he pe Objecs A and B should alwas be equal. Such a ssem could hen enforce his b alwas updaing boh curves when one is updaed. This would increase he cos of updaing as well as sorage cos, bu would reduce quer coss. For man of he relaionships, such as a poin serving as an end poin, he relaionship is sored in onl one objec, picall he objec for which he relaionship has he lowes cardinali. This is common design pracise in relaional daabases and helps o ensure consisenc. However, one ma choose o sore he relaionships boh was insead. This will increase sorage cos as well as updae cos o avoid inconsisencies, bu ma reduce quer cos. [6] defines wo relaionships as eamples of emporal opological relaionships: Eners: The objec sars ouside he region and moves inside i. Crosses: The objec eners he region and laer leaves i. The ime slices in he hbrid model ma be used o reduce he amoun of daa ha needs o be feched o do hese compuaions. If each ime slice has is own spaioemporal bounding bo, an inde ma be used o find hose ime slices of each objec in which he ma overlap. Then onl hose ime slices need o be used o compue he emporal opolog as for all oher ime slices he objecs are known o be disjoin. 8 Summar This paper has presened an eension o he sliced represenaion from [7] ha is capable of represening eplici opolog. This is necessar for several imporan operaions, including checking wheher wo regions border each oher. The new represenaion is slighl more comple han he original represenaion, bu man of he same algorihms are applicable o boh. References 1. J. Chomicki and P. Z. Revesz: Consrain-Based Ineroperabili of Spaioemporal Daabases. In Proc. 5h In. Smp. on Large Spaial Daabases, pp. 142-161, 1997. 2. J. Chomicki and P. Z. Revesz: A Geomeric Framework for Specifing Spaioemporal Objecs. In Proc. 6h In. Workshop on Temporal Represenaion and Reasoning (TIME 99), pp. 41-46, 1999\
Represening Topological Relaionships for Moving Objecs 399 3. M. J. Egenhofer and K. K. Al-Taha: Reasoning abou Gradual Changes of Topological Relaionships. In A. Frank, I. Campari, and U. Formenini (eds.): Theor and Mehods of Spaio-Temporal Reasoning in Geographic Space, vol. 639 LNCS, Springer-Verlag, pp. 196-219. 1992 4. M. J. Egenhofer and R. D. Franzosa: Poin-Se Topological Spaial Relaions. In In. Journal of Geographical Informaion Ssems, 5(2), pp. 161-174, 1991 5. M. Erwig and M. Schneider: The Honecomb Model for Spaio-Temporal Pariions. In Proc. In. Workshop on Spaio-Temporal Daabase Managemen, pp. 39-59, 1999 6. M. Erwig and M. Schneider: Spaio-Temporal Predicaes. In IEEE Transacions on Knowledge and Daa Engineering (TKDE), 14(4), pp. 881-901, 2002 7. L. Forlizzi, R. H. Güing, E. Nardelli, M. Schneider: A Daa Model and Daa Srucures for Moving Objecs Daabases. In Proc. ACM SIGMOD In. Conf. on Managemen of Daa (Dallas, Teas),pp. 319-330, 2000 8. S. Grumbach, M. Koubarakis, P. Rigau, M. Scholl, S. Skiadopoulos: Spaio-Temporal Models and Languages: An Approach Based on Consrains. In Spaio-Temporal Daabases - he CHOROCHRONOS Approach, LNCS 2520, Springer-Verlag, pp. 177-201, 2003 9. R. H. Güing, M. F. Böhlen, M. Erwig, C. S. Jensen, N. A. Lorenzos, M. Schneider, M. Vazirgiannis: A Foundaion for Represening and Quering Moving Objecs. In ACM Transacions on Daabase Ssems 25(1), 2000. 10. A. Renolen: Conceps and Mehods for Modelling Temporal and Spaioemporal Informaion. Dr. Ing Thesis, Norwegian Universi of Science and Technolog (NTNU), 1999 11. M. Schneider: Implemening Topological Predicaes for Comple Regions. In Proc. 10h In. Smp. on Spaial Daa Handling (SDH), pp. 313-328, 2002 12. E. Tøssebro and R. H. Güing: Creaing Represenaions for Coninuousl Moving Regions from Observaions. In Proc. 7h In. Smp. on Spaial and Temporal Daabases, pages 321-344, 2001 13. M. Worbos: GIS: A Compuing Perspecive. Talor & Francis, 1995