GIS Analysis Queries Operations Non-spatial Spatial Vector Raster what is the population of this city? show me the roads longer than 1km (population and road length must be recorded in the attribute table) Spatial where is the closest bus stop? (proximity) in what region is this city? (containment) what are the neighbours of Italy? (adjacency) which regions are crossed by this river? (intersection) and many others Operations Vector Raster Mixed
Non-spatial queries All countries whose population is more than 30,000,000
Spatial queries Containment Query Given a spatial object, find all objects that completely contain it Which country surrounds Lesotho? If the object is a point, this is called a Point Query Where is Khartoum?
Spatial queries Region Query Given a polygon, find all objects in the map that intersect it. When the polygon is a rectangle, the query is called Window Query Enclosure Query Given a polygon, find all objects that are completely contained in it. Which countries are completely contained by South Africa?
Spatial queries Intersection query Given a polyline, extract all objects in the map that interect it. Which countries are crossed by the Nile and its tributaries?
Spatial queries Range query Given an object, extract all objects that are within a given distance from it Which African capitals lies within 1,000 km from Ouagadougou? Nearest Neighbour Query Given an object, find the object in the map that is closest to it. K-Nearest Neighbour Query: find the k nearest objects
Spatial operations - vector Clipping (intersection) Given a polygon, extract all portions of objects in the map that are contained in it. The geometry of the objects in the result corresponds to the intersection of the object with the window, i.e. they are modified.
Spatial operations - vector Merge (Dissolve) Given two (or more) objects, return their geometric union Show the political situation of Horn of Africa 30 years ago
Spatial operations - vector Buffering Given an object, define the area(s) that lie within a given distance(s) from it Areas that are within 100 km from the Nile and its main tributaries Difference (symmetric difference) Given two layer, logically subtract one from the other
Spatial operations - vector Intersection (AND) Union (OR)
Spatial operations - vector Union Intersection Difference
Spatial operations - raster The raster data model performs overlay operations more efficiently than the vector model.
Spatial operations - raster Local operations Example of a raster query (Elevation > 1000m) AND (Slope > 50%) Map Algebra (create a new layer) (MeanTemp2010 – MeanTemp2000) = TempChange
Pay attention to data format problem: Spatial operations - raster Pay attention to data format problem: calculations with integers yield integers (4 / 3) x 3 = 3 solution: convert the data format before performing calculations (float (4) / 3) x 3 = 4
Spatial operations - raster Focal operations Examples: Slope and aspect calculations on a DEM Filtering
Spatial operations - raster Zonal operations Example: zonal mean zones values
Spatial operations - raster Global operations Example: reclassify
Spatial analysis - raster and vector Interpolation inverse distance weighting (arithmetical) spline interpolation (mathematical) kriging (statistical) use of barriers