47
Spatial Analysis

Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump” X X X X X X X

Embed Size (px)

Citation preview

Page 1: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Spatial Analysis

Page 2: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Early Spatial Analysis• John Snow, 1854• Cholera via polluted water, not air

• “John Snow’s pump”

www.jsi.com

X

X

X

X

X

X

X

Page 3: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Categories of Spatial Analysis

(Longley et al.)• Hypothesis testing• Queries and reasoning

– Map & database/catalog queries, buffer, polygon overlay

• Measurements – Aspects of geographic data, length, area, etc.

Page 4: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Categories of Spatial Analysis

(Longley et al.)• Transformations

– New data, raster to vector, geometric rules

– Buffer, polygon overlay – Interpolation, Density Estimation, Terrain Analysis (Lab 6)

• Descriptive summaries – Essence of data in 1 or 2 parameters– Spatial statistics (including fragmentation statistics)

• Optimization - ideal locations, routes– Network analysis (Lab 5), Routing

Page 5: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Interpolation

Page 6: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X
Page 7: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Nonlinear Interpolation

• When things aren't or shouldn’t be so simple

• Basic types:1. Trend surface analysis / Polynomial2. Minimum Curvature Spline 3. Inverse Distance Weighted 4. Kriging

Page 8: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Fitting ContinuousSurfaces to Data

(1) FLAT plane(2) flat but TILTED to fit data better

(3) tilted but WARPED to fit data even better

Page 9: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X
Page 10: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

1. Trend Surface/Polynomial

• point-based • Fits a polynomial to input points• When calculating function that will describe surface, uses least-square regression fit

• approximate interpolater– Resulting surface doesn’t pass through all data points

– global trend in data, varying slowly overlain by local but rapid fluctuations

Page 11: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

1. Trend Surface cont.

• flat but TILTED plane to fit data–surface is approximated by linear equation (polynomial degree 1)

–z = a + bx + cy• tilted but WARPED plane to fit data

– surface is approximated by quadratic equation (polynomial degree 2)

– z = a + bx + cy + dx2 + exy + fy2

Page 12: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Trend Surfaces

• Simplifies the surface representation to allow visualization of general trends.

• Polynomials of higher order

Page 13: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Windows (not Microsoft’s)

• generates estimates based on existing data in the “region”

• “region” = “roving window”– moves about study area– summarizes data it encounters– reach (search radius)– number of samples– Direction

• WHERE might you find unusual responses?

• results extend non-spatial concept of central tendency

Page 14: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

2. Minimum Curvature Splines

• Fits a minimum-curvature surface through input points

• Like bending a sheet of rubber to pass through points– While minimizing curvature of that sheet

• repeatedly applies a smoothing equation (piecewise polynomial) to the surface – Resulting surface passes through all points

• best for gently varying surfaces, not for rugged ones (can overshoot data values)

Page 15: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X
Page 16: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

3. Distance Weighted Methods

Page 17: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

• Each input point has local influence that diminishes with distance

• estimates are averages of values at n known points within window

3. Inverse Distance Weighted

– where w is some function of distance

∑∑=i

ii

ii wzwz )(x

21 ii dw =

Page 18: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

point iknown value zi

location xi

weight wi distance di

unknown value (to be interpolated)location x

∑∑=i

ii

ii wzwz )(x

21 ii dw =

The estimate is a weighted average

Weights decline with distance

Page 19: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

IDW (cont.)• an almost infinite variety of algorithms may be used, variations include:– the nature of the distance function (w)

– varying the number of points used– the direction from which they are selected

Page 20: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

IDW (cont.)

• IDW is popular, easy, but not panacea

• interpolated values limited by the range of the data

• no interpolated value will be outside the observed range of z values

• how many points should be included in the averaging?

• what to do about irregularly spaced points?

Page 21: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

A potentially undesirable characteristic of IDW

interpolationThis set of six data

points clearly suggests a hill profile. But in

areas where there is little or no data the

interpolator will move towards the overall

mean. Blue line shows the profile interpolated

by IDW

Page 22: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

IDW Example

• ozone concentrations at CA measurement stations

1. estimate a complete field, make a map

2. estimate ozone concentrations at specific locations (e.g., Los Angeles)

Page 23: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Data for IDW Example

measuring stations and concentrations (point shapefile) CA cities (point shapefile) CA outline (polygon shapefile) DEM (raster)

Page 24: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

IDW Wizard in Geostatistical Analyst

define data source

Page 25: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Further define interpolation

Power of distance

4 sectors

21 ii dw =

Page 26: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Cross validation• removing one of the n observation points and using the remaining n-1 points to predict its value.

• Error = observed - predicted

Page 27: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Results

amount of detail where there is no data

generally smooth surface highs in LA, S central valley

Page 28: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

4. Kriging• Assumes distance or direction betw. sample points shows a spatial correlation that help describe the surface

• Fits function to – Specified number of points OR– All points within a window of specified radius

• based on an analysis of the data, then an application of the results of this analysis to interpolation

• Most appropriate when you already know about spatially correlated distance or directional bias in data

Page 29: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Kriging (cont.)• Involves several steps

– Exploratory statistical analysis of data

– Variogram modeling– Creating the surface based on variogram

Page 30: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Explore with Trend analysis

• You may wish to remove a trend from the dataset before using kriging. The Trend Analysis tool can help identify global trends in the input dataset.

Page 31: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

SemiVariogram in Kriging

A semivariogram. Each cross represents a pair of points. The solid circles are obtained by averaging within the ranges or bins of the distance axis. The solid line represents the best fit to these five points, using one of a small number of standard mathematical functions.

sill

Range – no more

surprises

how avg. difference between values at points changes with distance between points

nugget

Page 32: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Kriging Results

• once the variogram has been developed, it is used to estimate distance weights for interpolation

• computationally very intensive w/ lots of data points

• estimation of the variogram complex– No one method is absolute best– Results never absolute, assumptions about distance, directional bias

Page 33: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Kriging Example

Surface has no constant meanMaybe no underlying trend

surface has a constant mean, no underlying trend

binary data

allows for a trend

Page 34: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Analysis of Variogram

Page 35: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Fitting a Model, Directional Effects

Page 36: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

How Many Neighbors?

Page 37: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Cross Validation

Page 38: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Kriging Result

• similar pattern to IDW

• less detail in remote areas

• smooth

Page 39: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Slightly Better Cross Validation

Page 40: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

IDW vs. Kriging

• Kriging appears to give a more “natural” look to the data

• Kriging avoids the “bulls eye” effect

• Kriging gives us a standard error

Page 41: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Which Method to Use?• Trend - rarely goes through your original points

• Spline - best for surfaces that are already smooth– Elevations, water table heights, etc.

• IDW - assumes variable decreases in influence w/distance from sampled location– Interpolating a surface of consumer purchasing power for a retail store

• Kriging - if you already know correlated distances or directional bias in data– Geology, soil science

Page 42: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Which to Use? cont.• Kriging - Allows user greater flexibility in defining the model to be used in the interpolation–Tracks changes in spatial dependence across study area (may not be linear)

–Produces •a smooth, interpolated surface•variogram (how well pixel value fits overall model)–Diagnostic tool to refine model–Want to get variances close as possible to zero

Page 43: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Interpolation Software

• ArcGIS with Geostatistical Analyst

•Surfer (Golden Software) • Surface II package (Kansas Geological Survey)

• GEOEAS (EPA) • Spherekit (NCGIA, UCSB)• Matlab

Page 44: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

ArcInfo Workstation Interpolation Methods

• TREND (Grid function)

• SPLINE (Grid function, minimum curvature spline)

• IDW (Grid function)

• KRIGING (Arc command)

Page 45: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Research Issues...• "easy to use"

– choose correct technique w/o having a Ph.D. in math or stats

• “effective" – techniques should be informative,– highlighting the essential nature of the data and/or surface

– meet needs of the study

• “natural language” interface – series of questions about the intentions, goals and aims of the user and about the nature of the data

• articles on prototypes in the literature

Page 46: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

Gateway to the Literature

• Lam, N.S.-N., Spatial interpolation methods: A review, Am. Cartogr., 10 (2), 129-149, 1983.

• Gold, C.M., Surface interpolation, spatial adjacency, and GIS, in Three Dimensional Applications in Geographic Information Systems, edited by J. Raper, pp. 21-35, Taylor and Francis, Ltd., London, 1989.

• Robeson, S.M., Spherical methods for spatial interpolation: Review and evaluation, Cartog. Geog. Inf. Sys., 24 (1), 3-20, 1997.

• Mulugeta, G., The elusive nature of expertise in spatial interpolation, Cart. Geog. Inf. Sys., 25 (1), 33-41, 1999.

• Wang, F., Towards a natural language user interface: An approach of fuzzy query, Int. J. Geog. Inf. Sys., 8 (2), 143-162, 1994.

• Davies, C., and D. Medyckyj-Scott, GIS usability: Recommendations based on the user's view, Int. J. Geographical Info. Sys., 8 (2), 175-189, 1994.

• Blaser, A.D., M. Sester, and M.J. Egenhofer, Visualization in an early stage of the problem-solving process in GIS, Comp. Geosci, 26, 57-66, 2000.

Page 47: Spatial Analysis. Early Spatial Analysis John Snow, 1854 Cholera via polluted water, not air “John Snow’s pump”  X X X X X X X

More Resources... a link to a USDA geostatistical workshop http://www.ars.usda.gov/News/docs.htm?docid=12555 ... an EPA workshop with presentations on geostatistical

applications for stream networks: http://oregonstate.edu/dept/statistics/epa_program/

sac2005js.htm