You are on page 1of 77

Announcements

Due next Thursday


Data Sources a list of data files and their sources; e.g .

Data
Map of Orono
E911 road file for Orono
Tax maps for Orono
Questionaire results

Source
Maine Office of GIS
Maine Office of GIS
Town Office need to
digitize
Need to collect by
interviews

Test 1covering chapters 1-8 and labs 1-3


No class on Tuesday, Oct. 20th.
Test will be emailed to all students Sunday
(Oct. 18th), on or before 5:00 PM
The test is open book, open notes.
The test should be emailed back to me by
midnight, Oct. 21st.

Lecture 12
Basic Spatial Analysis
Ch. 9 Part 1

Spatial data analysis


Input -> spatial operation -> output

Input Scope
Local point to point
Neighborhood
adjacent regions have
input
Global the entire input
data layer may influence
output

Spatial data analysis


Usually involves manipulations or calculation of
coordinates or attribute variables with a various operators
(tools), such as:

Measurement
Queries & Selection
Reclassification
Buffering
Overlay
Network Analysis

A1 B1 4 2 4 2 32 5.7

P 3 2 7 2 1 2 1 5 23

Raster GIS measurements: (a) Pythagorean distance, (b) Manhattan


distance, (c) proximity distances and (d) perimeter and area
Figure 6.1

A1 B1 4 2 4 2 32 5.7

2*3
2*3

2*2

4*3
P 3 2 7 2 1 2 1 5 23
A l * w 6 12 6 4 28

Raster GIS measurements: (a) Pythagorean distance, (b) Manhattan


distance, (c) proximity distances and (d) perimeter and area
Figure 6.1

Figure 6.4

Vector GIS measurements: (a) distance and (b) area

Spatial data analysis


Usually involves manipulations or calculation of
coordinates or attribute variables with a various operators
(tools), such as:

Measurement
Queries & Selection
Reclassification
Buffering
Overlay
Network Analysis

Query
A question to the database.
The database response is a table.
The ArcGIS database response is
selected records. If the table is the feature
table it also displays the selection on the
map.
Selected records can be exported to form
a new shapefile/feature class.

Theme Name

SQL

Set Algebra
Selection Conditions may be formalized using
set algebra:
Symbols:

, , , , ,

May be applied alone or in combination to select


features.

Field Names
The Field list in this dialog automatically lists
fields with the appropriate delimiters for the type
of data you are querying:
If you are querying data in a file geodatabase,
shapefile, dBase table, coverage, INFO table,
then field names are enclosed in double quotes:
"AREA
If you are querying data in a personal
geodatabase then field names are enclosed in
square brackets:
[AREA]

Strings

Strings must always be enclosed within single quotes. For example:

"STATE_NAME" = 'California'

Strings in expressions are case sensitive, except when you are


querying personal geodatabase feature classes and tables. To make
a case insensitive search in other data formats, you can use a SQL
function to convert all values to the same case. For file-based data
sources, use either the UPPER or LOWER function.

For example, the following expression will select customers whose


last name is stored as either Jones or JONES:

UPPER("LAST_NAME") = 'JONES'

Strings

Use the LIKE operator (instead of the = operator) to build a partial


string search. For example, this expression would select Mississippi
and Missouri among the USA state names:

"STATE_NAME" LIKE 'Miss%'

You can use greater than (>), less than (<), greater than or equal (>=),
less than or equal (<=) and BETWEEN operators to select string
values based on sorting order. For example, this expression will select
all the cities in a coverage with names starting with the letters M to Z:

"CITY_NAME" >= 'M'

The not equal (<>) operator can also be used when querying strings.

Strings
Wildcard Characters

A wildcard character is a special symbol that stands for one or more characters.

For any file-based data, '%' means that anything is acceptable in its place: one
character, a hundred characters, or no character. Alternatively, if you want to search
with a wildcard that represents one character, use '_'.

For example, this expression would select any name starting with the letters Cath, such
as Cathy, Catherine, and Catherine Smith:

"NAME" LIKE 'Cath%'

But this expression would find Catherine Smith and Katherine Smith:
"OWNER_NAME" LIKE '_atherine smith'

The wildcards you use to query personal geodatabases are '*' for any number of
characters and '?' for one character.

LIKE

Wildcards

The NULL Keyword


Null values are supported in fields for geodatabases and for data fields
in shapefiles/dBASE tables and coverages/INFO tables. If you select a
field of a type that supports null values, and if that field contains any null
values in the records displayed by the Unique Values list, you'll see a
NULL keyword at the top of the Unique Values list. You can double-click
the NULL keyword to add it into your expression, where you can use the
IS operator to query the field to select all its null values:
"POPULATION96" IS NULL
or IS NOT to select all its values that aren't null:
"POPULATION96" IS NOT NULL
The NULL keyword is always preceded by IS or IS NOT.

IS keyword

Querying Numbers
You can query numbers using the equal
(=), not equal (<>), greater than (>), less
than (<), greater than or equal (>=), and
less than or equal (<=) operators.
"POPULATION96" >= 5000

Calculations

Calculations can be included in queries using these arithmetic operators: +


- * /

Calculations can be between fields and numbers.

For example:

"AREA" >= "PERIMETER" * 100

Calculations can also be performed between fields.

For example, to find the countries with a population density of less than or
equal to 25 people per square mile, you could use this expression:

"POP1990" / "AREA" <= 25

Operator Precedence

Expressions evaluate according to standard operator precedence


rules. For example, the part of an expression enclosed in
parentheses is evaluated before the part that isnt enclosed.

This example:
HOUSEHOLDS > MALES * POP90_SQMI + AREA

evaluates differently from:


HOUSEHOLDS > MALES * (POP90_SQMI + AREA)

You can either click to add parentheses and then enter the
expression you want to enclose, or highlight the existing expression
that you want to enclose and then press the Parentheses button to
enclose it.

Combining Expressions

Expressions can be combined together with the AND and OR operators.

AREA > 1500 AND GARAGE > 3

When you use the OR operator, at least one expression of the two
expressions separated by the OR operator must be true for the record to be
selected.

RAINFALL < 20 OR SLOPE > 35

Use the NOT operator at the beginning of an expression to find features or


records that don't match the specified expression. NOT expressions can be
combined with AND and OR.

SUB_REGION = 'New England' AND NOT STATE_NAME = 'Maine'

Spatial Selection (Select by Location)


Identifying features based on spatial criteria
Adjacency, connectivity, containment, arrangement

Adjacency depends on the algorithm used


(the same is true for all spatial operations)

Touch the boundary of

Share a line segment with

Spatial Selection
Identifying features based on spatial criteria
Adjacency, connectivity, containment, arrangement

Selection based
on spatial and
non-spatial
attributes

Spatial data analysis


Usually involves manipulations or calculation of
coordinates or attribute variables with a various operators
(tools), such as:

Measurement
Queries & Selection
Reclassification
Buffering
Overlay
Network Analysis

Spatial data
analysis:
Reclassification
An assignment of a class
or value based on the
attributes or geography of
an object

Example:
Parcels
Reclassified
By size

Spatial data analysis: Reclassification

Reclassify in ArcGIS

Natural Breaks (Jenks)


Natural Breaks classes are based on natural groupings
inherent in the data.
Class breaks are identified that best group similar
values and that maximize the differences between
classes.
The features are divided into classes whose boundaries
are set where there are relatively big differences in the
data values.
Natural breaks are data-specific classifications and not
useful for comparing multiple maps built from different
underlying information.

From ArcGIS 10 Help

Natural Breaks

Equal Interval
Equal interval divides the range of attribute values into
equal-sized subranges.
This allows you to specify the number of intervals, and
ArcGIS will automatically determine the class breaks
based on the value range. For example, if you specify
three classes for a field whose values range from 0 to
300, ArcGIS will create three classes with ranges of 0
100, 101200, and 201300.
Equal interval is best applied to familiar data ranges,
such as percentages and temperature.
This method emphasizes the amount of an attribute
value relative to other values. For example, it will show
that a store is part of the group of stores that make up
the top one-third of all sales.
From ArcGIS 10 Help

Equal Interval

Quantile
Each class contains an equal number of
features.
A quantile classification is well suited to
linearly distributed data.
Quantile assigns the same number of data
values to each class.
There are no empty classes or classes
with too few or too many values.
From ArcGIS 10 Help

Quantile

Standard Deviation
The Standard deviation classification method
shows you how much a feature's attribute value
varies from the mean.
ArcMap calculates the mean and standard
deviation. Class breaks are created with equal
value ranges that are a proportion of the
standard deviationusually at intervals of 1,,
, or standard deviations using mean values
and the standard deviations from the mean.
A two-color ramp helps emphasize values above
the mean and values below the mean.
From ArcGIS 10 Help

Standard Deviation

Geometric Interval
The geometrical interval classification scheme creates class
breaks based on class intervals that have a geometrical
series. The geometrical coefficient in this classifier can
change once (to its inverse) to optimize the class ranges.
The algorithm creates geometrical intervals by minimizing
the square sum of elements per class. This ensures that
each class range has approximately the same number of
values with each class and that the change between
intervals is fairly consistent.
This algorithm was specifically designed to accommodate
continuous data. It produces a result that is visually
appealing and cartographically comprehensive. It minimizes
variance within classes and can even work reasonably well
on data that is not normally distributed.
From ArcGIS 10 Help

Geometric Interval

Spatial data analysis


Usually involves manipulations or calculation of
coordinates or attribute variables with a various operators
(tools), such as:

Measurement
Queries & Selection
Reclassification
Buffering
Overlay
Network Analysis

Buffering and other Proximity Functions

Mechanics of Point and Line Buffering

Buffering Variants: point buffer examples

Regions in Buffering inside, outside, enclosed

Spatial data analysis


Usually involves manipulations or calculation of
coordinates or attribute variables with a various operators
(tools), such as:

Measurement
Queries & Selection
Reclassification
Buffering
Overlay
Network Analysis

Overlay
Combination of different
data layers
Both spatial and attribute
data is combined
Requires that data layers
use a common coordinate
system
A new data layer is created

Vector Overlay
Topology is likely to be different
Vector overlays often identify line intersection points
automatically.
Intersecting lines are split and a node placed at the
intersection point
Topology must be recreated for later processing
Any type of vector may be overlain with any other type
Output typically takes the lowest dimension of the inputs
For example: Point on Polygon results in a point

Ambiguous
result

Unambiguous
result

Vector Overlay
(common ways applied)
CLIP
INTERSECTION
UNION

CLIP
Cookie cutter approach
Bounding polygon defines the clipped second
layer
Neither the bounding polygon attributes nor
geographic (spatial data) are included in the
output layer

INTERSECTION
Combines data from both layers but only for the
bounding area
(Bounding polygon also defines the output layer
Data from both layers are combined
Data outside the bounding layer (1st layer) is
discarded)

Order of intersection is important


(A to B or B to A)

UNION
Includes all data from both the bounding and
data layers
New polygons are formed by the
combinations of the coordinate data from
each layer

Why do buffering and vector overlay often take


so long?

Because a time consuming line intersection test


must be performed for all lines in the data layers

Then, inside vs. outside regions must be


identified for all new polygons

F in d in g the
t h e interior:
In t e rio r: Is
Is a
a point
p o in t inside
in s id e aa polygon
p o ly g o n (shaded)
?
Finding
?

n= 2, out

PPotential
o t e n t ia l ppoint
o in t

n= 4, out
n = 1 , in

Algorithm:
Pick a
A lgdirection
o rit h m :
(East (right)
c o u inn tthe
lin example)
e c ro s s in g s t o

n = 3 , in

Count oline
u t s idcrossings
e o f c o n to
v e the
x h u ll,
t h econvex
y is a n hull
o d d (shaded
num ber
outsideif of
polygon)t h e p o in t is in s id e , if

If odd enumber
v e n n u then
m b e the
r, p opoint
in t is
inside o u t s id e
If even, the point is outside

Vector Overlay
Common features in Vector overlays create
Slivers or Sliver polygons
A common feature in both layers. The problem is
that each definition is very subtly different (different
time, source, materials) so the polygons dont line up.
They can only be seen a very large display scale
but can represent over half the output polygons.
They take very little space but affect analytical
results.

Methods to reduce/remove slivers:


Redefine the common boundaries with
highest coordinate accuracy and replace
them in all layers before overlay
Manually identify and remove
Use snap distance during overlay

You might also like