Week5: 12 Spatial Queries Flashcards
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 (point-in-polygon or point location)
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’
Enclosure Query
Given a region R, find all objects in the map that are completely contained in R
Clipping
Given a region R, extract all portions of objects in the map that are contained in R
Line Intersection Query
Given a line L, extract all object in the map that intersect L
Adjacency Query
Given an object O, extract all objects in the map that are adjacent to O i.e. share a bounding entity
Metric Queries
relate to distance. Given two objects, how far apart are they?
- Proximity query
Nearest Neighbour Query
Given an object O, find the object in the map that is closest to O
- typically for points
Range Query
Given an object O, find all objects in the map that are within a given distance d from O
- typically for points
Spatial join
Given two sets of spatial objects S & S’, find all pairs (O,O’) of objects such that O e S & O’ e S’, O n O’ not null
- Spatial predicates other than intersection are also possible e.g. all pairs of objects that are within a given distance from each other
Map Overlay
Given two maps, M & M’, return a third map that contains objects from M & M’ and new objects whose geometry corresponds to the intersection of objects belonging to M & M’
Merge Query/Operation
Given two or more objects, O & O’, return their geometric union
- this operation is used in map generalisation to perform object aggregation
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
GIS query
1) What state contains city A
2) What states are crossed by river B
Geometric query
1) What polygon in the plane subdivision contains point A?
2) What polygons in the plane subdivision are intersected by polyline B