GEOGRAPHY 176B: TECHNICAL ISSUES IN GIS
LECTURE 3: COVERAGES AND THE RELATIONAL MODEL
1. THE RELATIONAL MODEL
2. COVERAGES
1. THE RELATIONAL MODEL
Database management systems
pre-1970sNeed a model of what data look likeprograms handled input and outputthe database approachcommands to read, write hard disk, diskettes, tapes
a GIS had to do its own
many lines of code
all reading and writing through a simple interface
no need for user to care about details of disk, tape etc
easy to replace database layer
with another vendor's productdatabase handles basic housekeepingenables simple operationsknows the details of format
knows about variables
e.g. house pricecan export data to another system easilyknows units of measurement
knows range (negatives not possible)
"export" commandtotal a column of numbers
search for records satisfying some condition
What does the relational model assume about data?the relational model
emerged in the 1980s as the dominant model
replaced the hierarchical and network modelsOracle, Access, Informix, Empress, ...
1. Data consist of tables (relations)needs to be widely applicable, so can't assume too much
must assume something, or it wouldn't be useful
Flight arrangements for Presidential inauguration in Washington, Jan 2013the rows define the cases, objects, instances, records of some class of objects
the columns define the known properties or attributes
all of the objects in the class must have the same kinds of properties
in GIS, must be all points, all lines, all areas, all pixels, etc.
Name Airport Flight Date5 attendees (rows)
4 attributes (columns)
Obama | ORD | 2372 | Jan 6 |
Romney | BOS | 145 | Jan 18 |
Gingrich | ATL | 58 | Jan 18 |
Clinton | LGA | 5136 | Jan 19 |
Paul | LAX | 226 | Jan 19 |
What can go in the columns?
2. Applications can involve several tablesdata (integers, floats, dates, text)
BLOBs (images, music, video)
hyperlinks to Web sites
links to initiate programs
e.g. links to GIS
compare Excel
3. Tables can be linked through common keyspassengers with reservation details
aircraft with maintenance, schedule details
crew with schedule, pay details
a model of an enterprise
county data (polygons)
customer data (points)
road data (lines)
flight number in a passenger record
flight number in a crew record
flight number in an aircraft record
Relational join
When was the aircraft that will carry McCain last maintained?combining two tables by using a common key
1. copy the attributes of Table 2 to their corresponding record in Table 1
2. copy the attributes of Table 1 to their corresponding record in Table 2
Example of two tablespassenger table relates McCain to a flight
aircraft record relates flight to an aircraft
user doesn't need to know these are in separate tables
A GIS example:
table of car accidents
county as an attributetable of countieslink any accident to attributes of the county it occurred in
county as the common key
an example of a spatial join
Spatial join:
Core concepts of the relational modellinking the records of two tables based on common location
in this case county contains accident
relationAdvantages of the relational modela tabletuplekeya record in a table
a row in a table
a subset of attributes that isjoinunique for each record
no redundancy
can't throw away any attribute in the keye.g. phone directoryphone number is unique key
last name, first name, street address is unique
drop any part and the result is not necessarily unique
still possible to be non-unique?
merger of two tables
using key to add attributes from Table 2 to records of Table 1
not symmetrical
number of records in join is determined by Table 1reversiblenormalization
spatial join
use location as the common key
match point to point, point to polygon, polygon to polygon
uncertainty
is the match exact?
example of Austin school districts
very flexible
no need to worry about implementation
user can ask questions that involve more than one table
linkage of tables is automatic
The relational model applied to GIS
Components:the georelational model
representing maps in the relational model
ARC/INFO circa 1980
Coverage slide 1polygons
arcs
nodes
Using arcs as the basic unit
avoids double representation of internal boundarieskeeps track of 'topology'easier to build the database
easier to edit and maintain
which nodes are connected by which arcs
which polygons are separated by which arcs
Topology
Coverage tablesin mathematics, those geometric properties that survive stretching of the space
in GIS, relationships between features
a concept strongly associated with the coverage modelcoverages have more topology than shapefiles1) relationships between objectsevery arc points to two polygons2) integrity of objectsthe "outside world" is a special polygonevery arc ends at two nodes
nodes have any number of arcs
but sometimes limited to threepolygons have any number of arcsbut sometimes limited by designEuler's TheoremP-A+N=2or 1 if the outside world is not countedpolygons must be closedbuilding topologyassembling lines into arcs and polygonsforming junctions
removing overshoots
Handling arcs in coveragesPolygon attribute table (PAT)
Arc attribute table (AAT)
Tics (TIC)
Annotation (LAB)
Tolerances (TOL)
INFO relational database
Microsoft Access
Data that fit the coverage modelshapes (points) stored in special file (ARC)
not directly viewable
all points within one polygon have the same attributes
all points must lie in exactly one polygon
resource managementa field
values at each point are classes
a categorical coverage
an area class map
forest stands
the cadasterland use class
land ownership parcelsdemographicscensus data
data by county
marketing data by market area
population by ZIP
the choropleth map
coverages capture the field view of the world
a continuous world
one value of a variable at every point
sharp changes in value as boundaries are crossed
The coverage model was designed to capture one specific type of geographic information
a field represented by irregularly shaped areas
Other types of information drove variations of the classic model
by changing the rules
e.g. road networks
cul-de-sacs end in nodes with only one connecting arc
change the rules to allow this