Download presentation

Presentation is loading. Please wait.

Published byTristan Linwood Modified over 2 years ago

1
Spatial Information Systems (SIS) COMP 30110 Spatial data structures (1)

2
Spatial data structures Data structures that have been defined for manipulating sets of spatial entities Two aspects: – storing: space occupied? redundancies? –querying, analysing, updating, etc.: time required? In general, it is important to be able to manipulate efficiently, still maintaining a “low” space complexity Requirement: the stored information must allow for an unambiguous representation of the subdivision

3
Spatial data structures: evaluation Spatial data structures can be evaluated in terms of: – space complexity: amount of space (memory) needed for storing all information (entities and relations) that is explicitly represented – time complexity of the algorithms for calculating relations that are not explicitly represented

4
Constant and variable relations In a generic plane subdivision, a relation is: - constant if it involves a constant number of entities (e.g.: EV, EE, EF involve two entities each) - variable if it involves a variable number of entities (e.g.: VV, VE, VF, FV, FE, FF involve a different number of entities depending on the different cases) jPjjPj iPiiPi e jfjjfj ifiifi ieiiei jejjej f f4 f3 f2 f1 P1 P2 P3P4 e1 e2 e3 e4 P1 P2 P3 P e1 e2 e3 f1 f2 f3

5
Topology/Connectivity Generic sets of entities: any possible topological relationsGeneric sets of entities: any possible topological relations Overlayed sets of entities (plane subdivisions): only meet and disjoint Overlayed sets of entities (plane subdivisions): only meet and disjoint Meet: topological relation that defines connectivity between entities in a plane subdivisionMeet: topological relation that defines connectivity between entities in a plane subdivision Entities of different dimension are “connected” in different ways: relations (vertex-, edge-, face-based) seen beforeEntities of different dimension are “connected” in different ways: relations (vertex-, edge-, face-based) seen before

6
Spaghetti data structure Spaghetti data structure: represents sets of points, lines and polygons Spaghetti data structure: represents sets of points, lines and polygons Can be used for both generic sets of entities and overlayed sets (plane subdivisions) Can be used for both generic sets of entities and overlayed sets (plane subdivisions) The geometry of any spatial entity is described independently of other entities The geometry of any spatial entity is described independently of other entities No topology/connectivity information is recorded No topology/connectivity information is recorded

7
Spaghetti data structure: example Example: points, lines and polygons are stored separately Polygon 1Polygon 2 X1,Y1 X2,Y2 X3,Y3 X4,Y4 X5,Y5 X6,Y6 X7,Y7 X1,Y1 X8,Y8 X9,Y9 X10,Y10 X11,Y11 X3,Y3 X2,Y2 X1,Y1 X8,Y8 12 X5,Y5 X4,Y4 X3,Y3 X11,Y11 X1,Y1 X2,Y2 X7,Y7X6,Y6 X10,Y10 X9,Y9 X8,Y8 For each polygon, we store a (ordered) list of coordinates of points on its boundary (this is not the same as FV relation!)

8
Another data structure Polygon 1 Polygon 2 P1 P2 P3 P4 P5 P6 P7 P1 P8 P9 P10 P11 P3 P2 P1 P8 12 P5 P4 P3 P11 P1 P2 P7P6 P10 P9 P8 Points and polygons are related: for each polygon, we store a (ordered) list of points (not coordinates) on its boundary: FV relation IDCoord. P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11 X1,Y1 X2,Y2 X3,Y3 X4,Y4 X5,Y5 X6,Y6 X7,Y7 X8,Y8 X9,Y9 X10,Y10 X11,Y11

9
Spaghetti data structure: pros & cons Advantages:Advantages: – simplicity – easy insertions of new entities (all entities are independent) Cons:Cons: – inefficient for topological queries – redundancies (and consequently, possible inconsistencies!)

10
Spaghetti data structure: remarks Example: NOTE 1: coordinates of points along common boundary are recorded twice! Redundancy: if we update coordinates of a point, we need to update them everywhere! Polygon 1Polygon 2 X1,Y1 X2,Y2 X3,Y3 X4,Y4 X5,Y5 X6,Y6 X7,Y7 X1,Y1 X8,Y8 X9,Y9 X10,Y10 X11,Y11 X3,Y3 X2,Y2 X1,Y1 X8,Y8 12 X5,Y5 X4,Y4 X3,Y3 X11,Y11 X1,Y1 X2,Y2 X7,Y7X6,Y6 X10,Y10 X9,Y9 X8,Y8

11
Spaghetti data structure: remarks (cont.d) Example: NOTE 2: no easy way of solving queries such as: “Do Polygon 1 and 2 share a common bounding line?” Need to analyse all coordinates of points of Polygon 1 and compare with those of Polygon 2 and see if two consecutive pairs are the same: inefficient!! Polygon 1Polygon 2 X1,Y1 X2,Y2 X3,Y3 X4,Y4 X5,Y5 X6,Y6 X7,Y7 X1,Y1 X8,Y8 X9,Y9 X10,Y10 X11,Y11 X3,Y3 X2,Y2 X1,Y1 X8,Y8 12 X5,Y5 X4,Y4 X3,Y3 X11,Y11 X1,Y1 X2,Y2 X7,Y7X6,Y6 X10,Y10 X9,Y9 X8,Y8

12
Topological data structures for plane subdivisions Incorporate “connectivity” among spatial objects by storing explicitly a subset of the relations seen before Incorporate “connectivity” among spatial objects by storing explicitly a subset of the relations seen before Two types of points: Two types of points: – points that are endpoints of a line (vertices) – points that define the shape (geometry) of a line For polygons/lines: For polygons/lines: – adjacency information (e.g., encode polygons on each side of a boundary line – left and right polygon with respect to the direction of the line: EF relation)

13
Topological data structures: motivations Storing connectivity information explicitly allows for more efficient spatial queries Example: if we store relation FE explicitely (i.e., for each polygon we store a list of IDs of edges bounding it), the query: store a list of IDs of edges bounding it), the query: “do Polygon 1 and 2 share a common bounding line?” only requires checking whether the two lists contain any common IDs only requires checking whether the two lists contain any common IDs Polygon 1 Polygon 2 e1 e2 e3 e4 e5 e6 e7 e8 e9 e10 e11 e12 e2 e1 12 e4 e3e11 e7 e1 e6e5 e10 e9 e8 e2 e12

14
Topological data structures: motivations (cont.d) Topology/connectivity: important criterion to establish the correctness (integrity, consistency) of geographic databases Examples: – neighbouring countries must share a boundary – seas and lakes cannot overlap

15
Doubly-Connected Edge List (DCEL) structure (Preparata and Shamos, 1985) DCEL structure stores: – the three sets of entities V, E, F – the three edge-based relations EV, EE, EF (all constant) – the two partial relations: FE* and VE* FE*: associates a face f with one of the edges bounding f VE*: associates a vertex v with one of the edges incident in v V F E EF * FE * EV * VE * EE

16
Example (1) P9 P8 P3 f1f2 e4 e3 e11 e7 e1 e6 e5 e10 e9 e8 e2 e12 P5 P4 P11 P1 P2 P7P6 P10 f0 Entities V{P1,P2,….., P11} E{e1, e2,….., e12} F{f0,f1,f2}

17
Partialrelations VE * FE * P1e1f0e3 P2e2f1e3 P3e3f2e1 P4e4 P5e5 P6e6 P7e7 P8e8 P9e9 P10e10 P11e11 Example (2) Entities VP1,P2,….., P11 Ee1, e2,….., e12 Ff0,f1,f2 Edge -basedrelations EVEFEE e1P1,P2f1,f2e7,e2 e2P2,P3f1,f2e1,e12 e3P3,P4f1,f0e2,e4 e4P4,P5f1,f0e3,e5 e5P5,P6f1,f0e4,e6 e6P6,P7f1,f0e5,e7 e7P7,P1f1,f0e6,e8 e8P1,P8f2,f0e1,e9 e9P8,P9f2,f0e8,e10 e10P9,P10f2,f0e9,e11 e11P10,P11f2,f0e10,e12 e12P11,P3f2,f0e11,e3 P9 P8 P3 f1f2 e4 e3 e11 e7 e1 e6 e5 e10 e9 e8 e2 e12 P5 P4 P11 P1 P2 P7P6 P10 f0

18
DCEL: space complexity For every edge: 3 constant relations are stored (involving 2 entities): 6e For every face: 1 relation involving one entity: f For every vertex: 1 relation involving one entity: n Space required to represent relations: 6e + f + n For each vertex we also store the two geometric coordinates: 2n

19
Retrieving missing relations: FE Calculating complete relation FE: Obtained by combining FE * and EE For example, given a face f1, we find the first bounding edge e3 using FE *. Then using EE we find the successor e4 of e3 (in counter-closkwise order) on the boundary of f1: if e3 is oriented in such a way that f1 is on its left hand side, then e4 is the second of the two edges associated with e3 through EE P9 P8 P3 f1f2 e4 e3 e11 e7 e1 e6 e5 e10 e9 e8 e2 e12 P5 P4 P11 P1 P2 P7P6 P10 f0

20
Retrieving missing relations: FE (cont.d) We apply the same method (2 nd element of EE) to obtain all other edges on the boundary of f1, until we reach e3 again. P9 P8 P3 f1f2 e4 e3 e11 e7 e1 e6 e5 e10 e9 e8 e2 e12 P5 P4 P11 P1 P2 P7P6 P10 f0

21
DCEL: FV and FF FV can be obtained by combining FE and EV: for each bounding edge e of a given face f (obtained with FE), we consider its endpoints using EV FF can be obtained by combining FE and EF: for each bounding edge e of a given face f (obtained with FE), we consider the other face f’ obtained by using EF

22
DCEL: VE, VV, VF Exercise!! For next week

Similar presentations

OK

Hard Instances of the Constrained Discrete Logarithm Problem Ilya MironovMicrosoft Research Anton MityaginUCSD Kobbi NissimBen Gurion University Speaker:

Hard Instances of the Constrained Discrete Logarithm Problem Ilya MironovMicrosoft Research Anton MityaginUCSD Kobbi NissimBen Gurion University Speaker:

© 2018 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on nature and human interaction Free download ppt on minerals and energy resources Ppt on panel discussion panelists Ppt on indian armed forces Ppt on catenation of carbon Compress ppt online free Ppt on company law board Company brochure ppt on architectural firm Ppt on file system in unix the lowest Ppt on save environment slogan