Geol552 Lecture12 2011 Ch6 Handout
Geol552 Lecture12 2011 Ch6 Handout
Geol552 Lecture12 2011 Ch6 Handout
Spatial joins
Lecture 12 - chapter 6a
Dont confuse it with spatial query!
Chapter 6: Spatial joins Uses a features location (spatial) to link it
This lecture: Theory of spatial joins, some other feature(s) from a different layer.
simple examples Ex: for each point feature (city), append data
Next lecture: More complex examples, in from the county feature the city is inside.
combination with queries, selects, summarize, Spatial join creates new data file (permanent
statistics, AWICAW data layer), no remove spatial join
Theres no spatial relate
1 2
Cities
(points) Counties Spatial joins: Four cases (p. 158, fig 6.5)
Source layer destination layer (polygons) (Diagrams show the logical relationships or cardinality)
Make the (new) city layer smarter Simple join Summarized join
by adding the name of the county the city
is inside of (Ames - inside Story county) Destination Source Destination Source
Destination layer (the one you right-click join) determines data Many-to-One (M-1) Relationship One-to-Many (1-M) Relationship
type of join (point destination > point joined layer, etc.)
make sure to select ... based on spatial location in Layer - Join Destination Source Destination Source
Distance
3 4
Simple (adds 1 piece of Summarized (adds a summary of
information) many pieces of information)
To each well point add the geologic rock name of the polygon that the
point is inside of. (Question: which well has better pump potential?)
Inside
Type of join? ________
Hospitals ! Counties Counties ! Hospitals
Which county is each hospital in? How many hospitals in each of the
Dest.: _________
____ to ____ counties? ____ to ____
Source: ________
Distance
Counties
Counties
Source to Destination
1.Right-click Destination
layer (rivers)
x
2.Set Join type to spatial
3.Choose source layer
river_name Type of join? (p. 158)
________
(Counties)
Dest.: _____ 4.Choose join type your student folder
Source: _____
5.Specify output file 6-41
7 8
For Summarized Spatial Joins:
Based on the two
Each statistic is performed for each numeric fields
geometries and the
A Count_ field is generated automatically to count the number destination ArcMap picks
of features used to calculate the summary statistic(s) A
the possible two join
types.
B
These 2 choices (A, B)
Read the text for key words, vary per destination/
they will indicate which of source combination type
the four cases from p. 224 Usually one is simple
you would get as result! and one is summarized.
Sum of POP 2000 for the 34 features inside Brazos County is 1,630,000
9 10
naming suggestion : gets the polygon that the point is inside of (A), joins it to the
point
<destination>_<source>_simple_inside
(e.g. county_hospital_simple_inside) Add a county name (COUNTY) to hospital feature
Label each Hospital with its joined county name
11 12
Summarized inside join (p. 158 upper right)
Hospitals
Simple distance join (p. 158, lower left)
Counties
Hospitals
Landfills
1-1 cardinality
1-Many cardinality - Each county has many hospitals Operates on based on distance
Summarize those hospitals inside a county, joins it to county Grabs a single feature (the closest) from source to join
Q: Each county has how many hospitals? For each landfill point, give me the
one hospital that is closest (plus the distance to it)
For each county append
A) Summary stats + number (count) of the numerical Type: B) (look for closest in the text)
hospital fields (lets use SUM) Label landfills by DISTANCE to closest hospital (last field)
Color county by number of hospitals (COUNT_)
Find the landfill closest to any hospital? Whats its distance?
13 14
For each group get sum of beds (summary) and join next session: practice multi-step operations (join/query/select/
summary)
Type A): summary stats but based on distance grouping
Oct 13: Midterm prep (1 Question in WebCT Request for review
Get summary of BEDS (SUM____), count hospitals and
discussion for each of you!)
join to landfill
Symbolize with Size by Sum_BEDS Oct 18: Midterm (20 min Mult. Ch. + 60 min practical)
Whats the landfill with the most hospitals? multiple choice: similar to voting questions, practical, similar to
HW exercises.
15 16