![Page 1: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/1.jpg)
Lecture 03 - Relational Databases
Primary Key – attribute value which allows users to uniquely identify a row
in a table
Secondary Key – attribute value which must also be used to uniquely identify
a row in a table
Tuples – occurrences of an entity (a row in a relational table)
Foreign Key – an attribute (in a relation) that is a primary key in another
relation
SELECT <attribute(s)/field(s)> FROM <table(s)> WHERE <condition(s)>
Structured Query Language
SELECT [lucode] FROM [lumap] WHERE [area] > 100 and [location] INSIDE
[orange county]
CREATE
DELETE
INSERT
ALTER
UPDATE …
(run first)
![Page 2: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/2.jpg)
Relational Databases Example
![Page 3: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/3.jpg)
Relational Databases Example
![Page 4: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/4.jpg)
Database Creation for Vector GIS
1) Input of spatial data
2) Input of attribute data
3) Linking of spatial and attribute data
Digitization? Polygon: Last Point = First Point
![Page 5: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/5.jpg)
Topology And Vector Operations
Planar Enforcement: area objects in one class or layer cannot overlap and must
exhaust the space of a layer (Topology – how objects relate to each
other)
Point In Polygon, Line On Polygon, Polygon On Polygon (Transfer Rules?)
(Subtract)
(Dissolve)
(Merge)
(Clip with …)
![Page 6: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/6.jpg)
Spurious/Sliver Polygon Removal
Perimeter vs Area?
![Page 7: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/7.jpg)
Classes of Operations for Spatial Analysis
Attribute Operations:
On one or more attributes of an entity
On one or more attributes of multiple entities that overlap in space
Distance/Location Operations:
Locate entities with respect to simple distance (Euclidian) or location
criteria
Creation of buffer zones around an entity
Spatial/Topological Relations:
Model spatial interactions over a connected net
Do objects overlay?
Manipulation of data - Simple to Complex
Discrete Entities & Continuous Data Distributions (differences?)
(i.e. Vector vs Raster?)
Analysis operations (for working with entities) include:
![Page 8: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/8.jpg)
Mathematical/Logical Operations for
Transformation of Attribute Data
![Page 9: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/9.jpg)
Logical Operations
Venn Diagram vs Truth Table?
![Page 10: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/10.jpg)
Simple/Complex Arithmetical
Operations
Statistical Analysis
Excel Formulas; SQL Functions; Active Columns; Field Calculator
Excel Formulas; SQL Functions; External software (Statistica, S-Plus, SPSS, etc …)
![Page 11: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/11.jpg)
Buffering (Simple Distance; Spatial)
![Page 12: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/12.jpg)
Operations That Depend on
Connectivity
Manhatten Metric?
Routing?
Least cost routing (raster)?
Underserviced Areas
![Page 13: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/13.jpg)
Spatial Analysis Using
Continuous FieldsSpatial operations include:
Interpolation Spatial Filtering
First and higher-order derivatives The derivation of surface topology:
Contiguity assessment (clumping) drainage networks and catchment delineating
Non-linear dilation Viewsheds, Shaded relief, irradiance
(spreading with friction)
Map Algebra
Neighborhood Operations
![Page 14: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/14.jpg)
Spatial Filtering/Neighborhood Operations
Remote Sensing – High and Low Pass Filters
![Page 15: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/15.jpg)
Digital Elevation Models
![Page 16: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/16.jpg)
First and Higher Order Derivatives
Maximum Downward Gradient
![Page 17: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/17.jpg)
Slope & Aspect
(Rate of change of slope) (Rate of change of aspect)
![Page 18: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/18.jpg)
Surface Representation: 2D – DEM/Grid
Hill-Shading (shaded relief
require slope + aspect
calculation)
![Page 19: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/19.jpg)
Drainage Networks
Derivation of surface topology (hydrologically corrected)
Allows calculation of drainage networks and streams, watersheds,
drainage divides/ridges (movement of erosional material and water flow)
Local drain direction (ldd)
![Page 20: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/20.jpg)
Drainage Networks Usage
Wetness Index Map (moisture content/retention)
Stream Power Index (erosive power)
Sediment Transport Index (erosion/deposition processes)
Stream Channels (how many cells feeding this one)
Ridges (Cells with no upstream elements – nothing feeding them)
Catchments/Watersheds
Hydrological and
Geomorphological
modelling
![Page 21: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/21.jpg)
Clumping; Dilation/Spreading
Also known as Cost-Distance analysis or
Least Cost Routing
![Page 22: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/22.jpg)
Line of Sight Maps (Viewshed)
![Page 23: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/23.jpg)
Shaded Relief
Map
![Page 24: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/24.jpg)
Irradiance
Mapping
![Page 25: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/25.jpg)
Attributes Computed From DEM’s
![Page 26: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/26.jpg)
Example – Specific GIS
Questions
Provided with a digital elevation model (DEM) and a table containing (x,y)
locations and zinc concentration (POINTS) outline the methods by which you
could determine those areas which have zinc concentration >100mg. Express
this as a percentage of the total area being examined.
Given a raster surface, LANDUSE and two vector drawings, PRECIP and
ROAD_BUFFER_200M, describe the methodology to determine those areas
with: an agricultural landuse; precipitation between 100 and 200mm; and
within 200m of a road. Use only vector operations.
A
B
![Page 27: Structured Query Language - glacier.utsc.utoronto.ca](https://reader030.vdocument.in/reader030/viewer/2022012500/617947b9576f6540d579e2cd/html5/thumbnails/27.jpg)
Example – Specific GIS Questions
You are hired as a consultant to do an initial search for possible sites on which to locate a
landfill. You have: basemaps for the area (which also include road types and water
courses); a vegetation map; a landuse map; a hazardous waste site map for the area; an
archeological site map for the area; a DEM.
Your restrictions on determining possible sites are as follows: the landfill site cannot be
within 500m of a water course/body, wetland/marsh, existing waste site or archeological
site. The population density must be less than 1 person per square kilometre. It cannot be
located on prime agricultural land. It must be located within 300m of a paved two or four
lane highway/road. The area must be relatively flat (less than 5 degree slope). The area
must be larger than 200 hectares.
Your final image must show all areas which fall within the imposed restrictions.
C