260 likes | 371 Views
Chapter 4. Part C: Queries, Computations & Map Algebra. Queries, Computations & Map Algebra. Queries Non-spatial queries Spatial queries SELECT queries/select by location Other SQL-like queries, e.g. Make table Spatial JOIN and RELATE operations
E N D
Chapter 4 Part C: Queries, Computations & Map Algebra www.spatialanalysisonline.com
Queries, Computations & Map Algebra • Queries • Non-spatial queries • Spatial queries • SELECT queries/select by location • Other SQL-like queries, e.g. Make table • Spatial JOIN and RELATE operations • OGC “Spatial Relations” (See next slide, from 4A) www.spatialanalysisonline.com
Queries, Computations & Map Algebra • OGC OpenGIS Simple Features Specification: Spatial Relations www.spatialanalysisonline.com
Queries, Computations & Map Algebra • Simple computations • Field level – attribute processing • SQL/Query operations – e.g. Make Table • Raster layer operations • Basic Map Algebra • Single layer operations: local, focal/neighbourhood, zonal, global • Multi-layer operations • Raster-vector combined operations • ‘Algebraic’ expressions – e.g. C=(A-B)/(A+B) www.spatialanalysisonline.com
Queries, Computations & Map Algebra • Map algebra – local operations, multi-grid www.spatialanalysisonline.com
Queries, Computations & Map Algebra • Map algebra operations – broader view • Resolution, orientation and resampling • Classification • Algebraic and Statistical operations • Proximity/landscape metric operations • Surface and hydrological analysis operations • Transformation and interpolation • Filtering www.spatialanalysisonline.com
Queries, Computations & Map Algebra • Grid filtering – Linear (weighted average) • Low pass filters, e.g. • High pass filters, e.g. • Kernels - example Weighted average as integer www.spatialanalysisonline.com
Queries, Computations & Map Algebra • Grid filtering – Linear – common ‘image processing’ functions • Sharpening • Blurring • Edge detection • Embossing • Gradient operations www.spatialanalysisonline.com
Queries, Computations & Map Algebra • Grid filtering – points to note • Attribute data range • Multi-band image processing • Kernel size and shape • Single or multi-pass • Edge effects • User-defined kernels • Spatial vs frequency domain filtering www.spatialanalysisonline.com
Queries, Computations & Map Algebra • Grid filtering – Non-linear • Non-linear local adjustment • Local operation, not based on kernel (weighted average) • Minimum, Maximum, Variance, IQR • Median deviation and thresholding • Noise reduction www.spatialanalysisonline.com
Queries, Computations & Map Algebra • Grid filtering – Erosion and dilation • Erosion – pixel removal/alteration • Dilation – pixel addition/alteration • Kernels and structural elements Source DEM/image Dilation of source Erosion of source www.spatialanalysisonline.com
Queries, Computations & Map Algebra • Ratios, indices and normalisation • Spatially extensive variables • Spatially intensive variables • Normalisation of count data • e.g. cars/household, ethnic group counts/1000 population • Common types: • Averages • Proportions/percentages • Densities www.spatialanalysisonline.com
Queries, Computations & Map Algebra • Standardisation • Direct standardisation • Regional/national comparisons • Indirect standardisation • Expected values • Excess rates • Statistical standardisation • Z-scores • Range-based (basic or trimmed) www.spatialanalysisonline.com
Queries, Computations & Map Algebra • Ratio computations – some issues • Division by 0 and missing data handling • Normalisation of ‘normalised data’ • Variance instability • Divisor selection • Appropriateness • Availability/accuracy/timeliness • Rate selection • Raw rates, expected rates, rate smoothing www.spatialanalysisonline.com
Queries, Computations & Map Algebra • Point density • Density: counts/area (n/A) • Occupancy: area/counts (A/n) • Zone boundaries/area definition • Grid counts (cell shape, size, orientation issues) • … need for a boundary free approach • … develop ideas from univariate statistics www.spatialanalysisonline.com
Queries, Computations & Map Algebra • Point density – kernel methods Uniform 50:50 Box kernel Box sum Box sum histogram www.spatialanalysisonline.com
Queries, Computations & Map Algebra • Kernel density – Normal kernel function www.spatialanalysisonline.com
Queries, Computations & Map Algebra • Kernel density – decisions • Functions (finite or infinite) • Bandwidth – key criterion (fixed/adaptive) • Grid resolution • Relative or absolute densities, or ‘probabilities’ • Comparison issues • with other density datasets • temporal • mapped values www.spatialanalysisonline.com
Queries, Computations & Map Algebra • Kernel density estimation (KDE) – 2D approach • Symmetric functions • Finite (e.g. box) or infinite (e.g. Normal) • Rotated 1D function 2D function • Procedure: • Select function and parameters • Specify grid resolution (or extent and number of cols/rows) • Apply 2D function to each data point and record value at every grid intersection • Sum grid intersection values and normalise • Map resulting grid www.spatialanalysisonline.com
Queries, Computations & Map Algebra • 2D kernels – single point Normal kernel (unbounded) Quartic kernel (bounded) www.spatialanalysisonline.com
Queries, Computations & Map Algebra • 2D mapped kernel density – Lung cancer cases, Quartic kernel and Normal kernel www.spatialanalysisonline.com
Queries, Computations & Map Algebra • 3D mapped kernel density – lung cancer cases www.spatialanalysisonline.com
Queries, Computations & Map Algebra • Kernel density – alternative functions • Normal (or Gaussian), Quartic (spherical) • (Negative) Exponential, Triangular (conic) • Uniform (flat), Epanechnikov (paraboloid/quadratic) • Applications • Density/probability surface creation/comparisons • Case/control analysis • Spatio-temporal analysis • Hot spot analysis • Network analysis (see Okabe et al) www.spatialanalysisonline.com
Queries, Computations & Map Algebra • Cartograms • Density adjustment – areas represent population www.spatialanalysisonline.com
Queries, Computations & Map Algebra • Cartograms • Density adjustment – alternative approaches www.spatialanalysisonline.com
Queries, Computations & Map Algebra • Line and intersection density • Kernel methods applied to linear forms • Route systems (and intersections) • Line frequency (number per unit area) • Length density (length per unit area) • Intersection density (intersections per unit of length, per unit area) www.spatialanalysisonline.com