gis
MODULE 5: SPATIAL JOINS
Spatial Joins versus Attribute Joins
Two Types of Spatial Joins
Cardinality and Spatial Joins
Types of Spatial Joins
Feature Geometry and Spatial Joins
Coordinate Systems and Spatial Joins
Spatial Joins in ArcGIS
SPATIAL VS. ATTRIBUTE JOINS
How Spatial Joins Differ From Attribute Joins In Module 2, we covered attribute joins that were performed on tables --attribute joins use a common field (state name, FIPS, etc.)
Spatial Joins are similar to attribute joins, except --spatial joins use the locations of the spatial features to link
records from the two datasets involved in the join --the spatial join is also similar to a spatial query, since it
uses either a containment criterion (one feature inside the other) or a proximity criterion (one feature close to another)
Spatial joins create a new feature class --instead of appending one table to another, as in an
attribute join --it retains the features from the destination layer and
appends the attribute information from the source layer --the original feature classes are unaffected
In a spatial join, the destination feature class determines the type of features in the output feature class --if a rivers feature class is joined to a cities feature
class, and cities is the destination --the output feature class contains cities
TWO TYPE OF SPATIAL JOINS A distance join uses the proximity criterion to link a
feature and its attributes to another --based on which features in one dataset are closest to specific
features in another dataset
There are two types of distance join:
1) A simple distance join answers the following
question:
Which feature in one dataset is closest to each feature
in another dataset?
2) A summarized distance join answers the following
question:
How many features in one dataset are closest to
each feature in another dataset?
In an inside join --feature classes are joined based on whether one feature is
inside another feature, either wholly or partly
There are also two types of inside join:
1) A simple inside join answers the following question:
Do specified features in one data set lie within
features of another data set?
INSIDE SPATIAL JOINS 2) A summarized inside join answers the question:
How many features in one data set lie inside a specified feature within another data set?
CARDINALITY AND SPATIAL JOINS In Module 2, we learned that cardinality is an important consideration --attribute joins only work with a one-to-one, or many-to-one
cardinality, otherwise a relate must be used --remembering that the destination table is the first table
mentioned when listing cardinality
Cardinality is also important when working with spatial joins --the difference being that a spatial join will still work with a
one-to-many relationship --however, a summarized join must be used
FEATURE GEOMETRY AND SPATIAL JOINS 1) Joining two point feature data sets
Only works with distance joins, since an inside join would not apply --a point, by definition has zero dimension, so one cannot
place a point inside another point --a point on top of another point would equal a distance of
zero between the two points
FEATURE GEOMETRY AND SPATIAL JOINS
2) Points to Polygons
Example: Find all the hospitals closest to South Dakota counties that have no hospitals
You need a a list of counties, each with
the closest hospital attached to it.
A simple summarized distance join works
The result would be a county layer --each county has a field with the name of the
closest hospital and its distance from the county
--counties that contain hospitals would show a distance of zero assigned to that field
3) Points to Lines
Example: Find the susceptibility of streams to contamination from septic systems
Assumption is that the more septic systems close to a stream, the more likely for that stream to become contaminated --each stream should indicate the number of
septic systems are closest to it --streams should be the destination layer This requires a summarized distance join --the resulting stream layer will have a field next
to each stream, with the number of septic systems that are closest to it
COORDINATE SYSTEMS & SPATIAL JOINS
Given that spatial joins, by definition, involve spatial
analysis --using a projected coordinate system is essential
--especially when performing distance joins
If a join is performed on a layer with a geographic
coordinate system (GCS) --two problems arise:
1) Degrees cannot easily be converted into distance units
such as miles or kilometers a. because the conversion factor changes with latitude
b. remember that 1 degree of longitude is about 69 miles at
the equator, diminishing to 0 distance at the poles
2) The result would be invalid a. The distance algorithm relies on the relative x-y
coordinates of features to calculate distances
b. Assumes a Cartesian coordinate system
One cannot just set the data frame to a projected
coordinate system --the layers themselves must be projected
--the projected coordinate system should preserve distance over
the region of analysis (UTM, State Plane, Equidistant Conic,
etc.)
Fig. 9.10. The effect of the coordinate system on
A spatial distance join. (a) Three attractions are
Incorrectly joined to Hotel C (purple stars) when
the input feature classes have a GCS. (b) When
The feature classes are projected to UTM before
Joining, the attractions are correctly assigned to
Hotel B (green stars)
SPATIAL JOINS AND ARCGIS Choosing Join Type As with attribute joins, one starts by choosing the destination layer --chooses to join the data based on spatial location --then chooses the source layer
The join menu provides the following choices, as mentioned earlier: 1) Inside Join
a. Simple Inside Join b. Summarized Inside Join
2) Distance Join a. Simple Distance Join b. Summarized Distance Join
Setting Up a Spatial Join Performing a spatial join is a simple process --determining that a spatial join is required, identifying the
destination table, and type of join is more complex --novices often try random combinations until they find the correct one --this is time-consuming and can slow a project
Dr. Price has provided a methodology for simplifying the process, shown at right --I have provided a downloadable form on the course Moodle
page --NOTE: A similar methodology can be used for deciding
whether to join or relate attribute tables, except you choose whether a join or a relate is needed, instead of a simple or summarized join
Methodology for choosing join type.
SPATIAL JOINS AND ARCGIS Example Problem Estimate stream susceptibility to contamination from septic systems
Methodology 1) What should the final output layer/table look like?
a. You have access to two data sets: i. Streams (a line file) ii. Septic systems (a point file)
b. You are interested in finding out how many septic systems are closest to each stream
c. Thus, the output layer should be a stream layer
2) Which is the destination layer? a. Based on the previous response, the stream layer
should be the destination layer
3) Should a distance join or an inside join be used? a. Determining how many septic systems are closest to
each stream implies distance is involved b. Thus, a distance join should be used
4) What is the cardinality of the join? a. Each stream will have 0-x number of streams assigned
to it (how many?) b. Thus, the cardinality is one-to-many
5) Should a simple join or a summarized join be used? a. Simple joins only work with one-to-one or many-to-one
cardinalities b. So, a Summarized Distance Join must be used