Presentation is loading. Please wait.

Presentation is loading. Please wait.

Spatial Information Systems (SIS) COMP 30110 Spatial queries and operations.

Similar presentations


Presentation on theme: "Spatial Information Systems (SIS) COMP 30110 Spatial queries and operations."— Presentation transcript:

1 Spatial Information Systems (SIS) COMP 30110 Spatial queries and operations

2 Spatial queries Examples:Examples: - “What are the two post offices nearest to Dun Laoghaire dart station?” (proximity query) - “In what county is Bray?” (containment query) - “What are Italy’s neighbouring countries” (adjacency query) - “What Italian regions are crossed by the river Po?” (intersection/overlap query) Etc…

3 Non-spatial queries Examples:Examples: - “What is the population of Dublin City?” - “How long is the river Shannon” (assuming that population and length are attributes stored for city and river, respectively) These are standard DB queries that request to retrieve the value of some attribute. Spatial queries, on the other hand, require different type of computations.

4 Examples of theme queries Let us consider thematic mapsLet us consider thematic maps What are the typical “non-spatial” queries that users might want to perform on these type of maps?What are the typical “non-spatial” queries that users might want to perform on these type of maps? Theme projectionTheme projection Theme selectionTheme selection Theme unionTheme union Etc.Etc. Same as relational algebra operatorsSame as relational algebra operators

5 Theme queries Theme projection: it is a non-spatial operation that works as the projection operation from relational algebra Example: in a political map of European countries with attributes name and population, we want to project on the attribute population (i.e., we eliminate the country names)

6 Theme projection Thematic map of countries of western Europe (and their population); projection on the attribute population

7 Theme queries (cont.d) Theme selection: it is a non-spatial operation (based on a non-spatial predicate) that works as the selection operation from relational algebra Example: in a political map of European countries, select all names and population of countries with more than 50M inhabitants

8 Theme selection Thematic map of countries of western Europe (and their population); selection of countries with more than 50M people

9 Theme queries (cont.d) Theme union: it is a non-spatial operation that works as the union operation from relational algebra. It can only be applied to thematic maps with same attribute schema Example: union of the map containing European countries with more than 10M inhabitants and the map containing European countries with less than 10M inhabitants. The two maps both have schema (name, population)

10 Theme union Thematic map of countries (and population) of western Europe with less than 10M inhabitants Thematic map of countries (and population) of western Europe with more than 10M inhabitants

11 Types of spatial queries/operations Containment Query Containment Query Region Query Region Query Enclosure Query Enclosure Query Clipping Clipping Line intersection query Line intersection query Adjacency query Adjacency query Metric (Proximity) Queries Metric (Proximity) Queries Spatial Join Spatial Join Map Overlay Map Overlay Merge/Aggregation Merge/Aggregation

12 Basic spatial queries Containment Query: Given a spatial object O, find all objects in the map that completely contain O. When O is a point, the query is called Point Query O P Containment Query Point Query (also Point-in-polygon, or Point Location)

13 Basic spatial queries (cont.d) Region Query: Given a region R, find all objects in the map that intersect R. When R is a rectangle, the query is called Window Query R R Region Query Window Query

14 Window query A thematic map M and windowing of M with area A

15 Basic spatial queries (cont.d) Enclosure Query: Given a region R, find all objects in the map that are completely contained in R R Enclosure Query

16 Basic spatial queries (cont.d) Clipping: Given a region R, extract all portions of objects in the map that are contained in R. Note that the geometry of an object in the result corresponds to the intersection of the object with the window R Clipping

17 Clipping A thematic map M and clipping of M with area A

18 Basic spatial queries (cont.d) Line intersection query: Given a line l, extract all objects in the map that intersect l. Example: “What counties are crossed by the river Shannon?” l Line intersection

19 Basic spatial queries (cont.d) Adjacency query: Given an object O, extract all objects in the map that are adjacent to O (i.e., share a bounding entity with O). Example: “What are Italy’s neighbouring countries?” O Adjacency query

20 Basic spatial queries (cont.d) Metric Queries: they involve distances. Example: Given two objects O and O’ how far are they from each other? Obvious for points. For regions, usually distance between their centroids Metric queries are also called proximity queries O Distance query O’

21 Basic spatial queries (cont.d) Nearest Neighbour Query: Given an object O, find the object in the map that is closest to O (typically for points) Also: K-nearest neighbour query: find the k nearest objects Nearest Neighbour Query O

22 Basic spatial queries (cont.d) Range Query: Given an object O, find all objects in the map that are within a given distance d from O (typically for points) Range Query O d

23 Basic spatial queries (cont.d) Spatial Join: Given two sets of spatial object S and S’, find all pairs (O,O’) of objects such that: – O  S, O’  S’ – O  O’   {O 1,…,O 6 } {O’ 1,…,O’ 5 } = (O 1, O’ 1 ), (O 2, O’ 1 ), (O 6, O’ 1 ), (O 4, O’ 3 ), (O 5, O’ 3 ), (O 5, O’ 5 ), (O 3, O’ 2 ) Spatial predicates other than intersection are also possible. Example: all pairs of objects that are within a given distance from each other, etc. Spatial predicates other than intersection are also possible. Example: all pairs of objects that are within a given distance from each other, etc. Spatial Join O2O2 O4O4 O1O1 O6O6 O5O5 O3O3 O’ 4 O’ 1 O’ 3 O’ 2 O’ 5

24 Basic spatial queries (cont.d) Map Overlay: given two maps M and M’, return a third map that contains objects from M and M’ and new objects whose geometry corresponds to the intersection of objects belonging to M and M’. Process: perform the spatial join of M and M’. Consider all pairs of intersecting objects. For each such intersection generate a new object and modify the geometry of the two original objects accordingly Example: political map of wester European countries and map of languages spoken all over western Europe

25 Map Overlay Overlay of the map of western European countries and the map of families of languages spoken in western Europe

26 Basic spatial queries (cont.d) Merge Query/Operation: Given two (or more) objects O and O’, return their geometric union This operation is used in map generalisation to perform object aggregation (more later on this) Merging two objects O O’

27 Merging

28 Remarks Spatial queries involve the geometry of objects and their spatial relations (in particular, topological queries are based on topological properties) Spatial queries involve the geometry of objects and their spatial relations (in particular, topological queries are based on topological properties) Therefore, it is important to have data structures that “support” efficient computation of geometric properties and spatial relations Therefore, it is important to have data structures that “support” efficient computation of geometric properties and spatial relations

29 Spatial queries and their geometric counterpart Some spatial queries involve geometric calculations such as intersection of segments, etc. Use of computational geometry algorithms in GIS

30 Point Location A GIS query: “What state contains city A?” Geometric query: “What polygon in the plane subdivision contains point A?” [Kirkpatrick 1983] point A?” [Kirkpatrick 1983]

31 Spatial Queries: Line Intersection B GIS query: “What states are crossed by river B?” Geometric query: “What polygons in the plane subdivision are intersected by polyline B?” intersected by polyline B?”

32 Map Overlay Example: Land cover change map and county map In GIS: overlay of multiple thematic maps of a given geographic region

33 Geometric Operations in Map Overlay Overlay of plane subdivisions: intersection of line segments [Nievergelt and Preparata 1982] + =

34 Geometric Operations in Spatial Queries Other spatial queries such as clipping make extensive use of line intersection algorithms that have been proposed in the field of computational geometry


Download ppt "Spatial Information Systems (SIS) COMP 30110 Spatial queries and operations."

Similar presentations


Ads by Google