Geol552 Lecture12 2011 Ch6 Handout

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

GEOL 452/552 - GIS for Geoscientists I

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

The destination is the city layer (which becomes smarter) Inside


The source is the county layer (which delivers the add-on info)

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

Data dialog! (dont database join!)

Destination will have (something of) the source table appended


One-to-One (1-1) Relationship Many-to-Many (M-M)Relationship

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

Hotels ! Attractions Hotels (!) ! Attractions


Which attraction is closest to each How many attractions are closest to
hotel? How far is it? ____ to ____ each hotel? ____ to ____ Attribute table of points with rock name added
5 6

Example: For all rivers add the population of its intersecting


Rivers
counties

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

Simple inside join (p. 224, upper left)


Follow along: copy data/follow along/ Hospitals Counties
ch6A_class_ex into you student folder
Run Ch6a_class_ex_spatial_join.mxd Each of the (many) hospitals (destination) is inside exactly
Save the newly made spatial joins one county (source)

into geodb (Make this you default geoDB) M-1 cardinality


Q: In which county is a hospital? (a hospital is inside which
as shapefiles in your folder county?)

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

Summarized distance join (p 158, lower right) Wrap up


Many-Many cardinality Landfills Hospitals
Lab: Ch 6 tut. 1- 38 (-42 optional)
For each landfill find the sum of
HW 6: ch 6. 1, 3, 4, 5 (#4 is particularly important, in case nature calls ...) extra 7 & 10
all nearby hospital beds
due Oct 18 (but you can start now)
Group the closest hospitals (by distance) around each
which of the four cases is it? (p. 158 is your friend!!)
landfill

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

You might also like