30
CS 128/ES 228 - Lecture 12b 1 Spatial Analysis (3D)

Spatial Analysis (3D)

  • Upload
    didier

  • View
    39

  • Download
    0

Embed Size (px)

DESCRIPTION

Spatial Analysis (3D) . Putting it all together (again). Siting a nuclear waste dump Build Layer A by selecting only those areas with “good” geology ( good geology layer ) - PowerPoint PPT Presentation

Citation preview

Page 1: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 1

Spatial Analysis (3D)

Page 2: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 2

Putting it all together (again) Siting a nuclear waste dump

Build Layer A by selecting only those areas with “good” geology (good geology layer)

Build Layer B by taking a population density layer and reclassifying it in a boolean (2-valued) way to select only areas with a low population density (low population layer)

Build Layer C by selecting those areas in A that intersect with features in B (good geology AND low population layer)

Build Layer D by selecting “major” roads from a standard roads layer (major roads layer)

Page 3: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 3

Siting the Dump, Part Deux Build Layer E by buffering Layer D at a

suitable distance (major roads buffer layer) Build Layer F by selecting those features from

C that are not in any region of E (good geology, low population and not near major roads layer)

Build Layer G by selecting regions that are “conservation areas” (no development layer)

Build Layer H by selecting those features from F that are not in any region of G (suitable site layer)

See also: Figure 6.5, pp. 187-88

Page 4: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 4

On to 3-D

Page 5: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 5

Some (More) GIS Queries How steep is the road? Which direction does the hill face? What does the horizon look like? What is that object over there? Where will the waste flow? What’s the fastest route home?

Page 6: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 6

Types of queries Aspatial – make no reference to

spatial data 2-D Spatial – make reference to

spatial data in the plane 3-D Spatial – make reference to

“elevational” data Network – involve analyzing a

network in the GIS (yes, it’s spatial)

Page 7: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 7

3-D Computational Complexity

1984technology

1997technology

Page 8: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 8

Approximations In the vector model, each object

represents exactly one feature; it is “linked” to its complete set of attribute data

In the raster model, each cell represents exactly one piece of data; the data is specifically for that cell

THE DATA IS DISCRETE!!!

Page 9: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 9

Surface ApproximationsWith a surface, only a few

points have “true data”

The “values” at other points are only an approximation

The are determined (somehow) by the neighboring points

The surface is CONTINUOUSImage from: http://www.ian-ko.com/resources/triangulated_irregular_network.htm

Page 10: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 10

Types of approximation GLOBAL or LOCAL

Does the approximation function use all points or just “nearby” ones?

EXACT or APPROXIMATE At the points where we do have data, is

the approximation equal to that data?

Page 11: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 11

Types of approximation GRADUAL or ABRUPT

Does the approximation function vary continuously or does it “step” at boundaries?

DETERMINISTIC or STOCHASTIC Is there a randomness component to

the approximation?

Page 12: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 12

Display “by point”

Image from: http://www.csc.noaa.gov/products/nchaz/htm/lidtut.htm

• Notice the (very) large number of data points

• This is not always feasible

• “Draw” the dot

Page 13: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 13

Display “by contour”

Image from: http://www.csc.noaa.gov/products/nchaz/htm/lidtut.htm

• More feasible, but granularity is an issue

• Consider the ocean…

• “Connect” the dots

Page 14: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 14

Display “by surface”

Image from: http://www.csc.noaa.gov/products/nchaz/htm/lidtut.htm

• Involves interpolation of data

• Better picture, but is it more accurate?

• “Paint” the connected dots

Page 15: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 15

Voronoi (Theissen) polygons as a painting tool Points on the

surface are approximated by giving them the value of the nearest data point

Exact, abrupt, deterministic

Page 16: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 16

Smooth Shading Standard (linear)

interpolation leads to smooth shaded images

Local, exact, gradual, deterministic

X yw

1-

W = *y + (1-)*x

Page 17: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 17

TINs – Triangulated Irregular Networks

Connect “adjacent” data points via lines to form triangles, then interpolate

Local, exact, gradual, possibly stochastic

or

Image from: http://www.ian-ko.com/resources/triangulated_irregular_network.htm

Page 18: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 18

Simple Queries? The descriptions thus far

represent “simple” queries, in the same sense that length, area, etc. did for 2-D.

A more complex query would involve comparing the various data points in some way

Page 19: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 19

Slope and aspect A natural question with elevational

data is to ask how rapidly that data is changing, e.g. “What is the gradient?”

Another natural question is to ask what direction the slope is facing, i.e. “What is the normal?”

slope

aspect

Page 20: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 20

What is slope? The slope of a curve

(or surface) is represented by a linear approximation to a data set.

Can be solved for using algebra and/or calculus

Image from: http://oregonstate.edu/dept/math/CalculusQuestStudyGuides/vcalc/tangent/tangent.html

Page 21: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 21

Solving for slope In a raster world, we use the

equation for a plane:z = a*x + b*y + c

and we solve for a “best fit” In a vector world, it is usually

computed as the TIN is formed (viz. the way area is pre-computed for polygons)

Page 22: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 22

Our friend calculus Slope is essentially a first derivative

Second derivatives are also useful for…

convexity computations

Page 23: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 23

What is aspect? Aspect is what

mathematicians would call a “normal”

Computed arithmetically from equation of plane

Image from: http://www.friends-of-fpc.org/tutorials/graphics/dlx_ogl/teil12_6.gif

Shows what direction the surface “faces”

Page 24: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 24

Matt Hartloff, ‘2000 Delaunay “Sweep” algorithm uses

Voronoi diagram as first step

Page 25: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 25

Jackson Hole, WY…then shades result based upon slopes and aspects

Page 26: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 26

Visibility What can I see from where? Tough to compute!

Page 27: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 27

When is an Elevation NOT an Elevation? When it is rainfall, income, or any

other scalar measurement

Bottom Line: It’s one more dimension (any dimension!) on top of the geographic data

Page 28: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 28

Network Analysis Given a network

What is the shortest path from s to t? What is the cheapest route from s to

t? How much “flow” can we get through

the network? What is the shortest route visiting all

points?

Image from: http://www.eli.sdsu.edu/courses/fall96/cs660/notes/NetworkFlow/NetworkFlow.html#RTFToC2

Page 29: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 29

Network complexitiesShortest path EasyCheapest path EasyNetwork flow MediumTraveling salesperson

Exact solution is IMPOSSIBLY HARD but can be approximated

All answers learned in CS 232!

Page 30: Spatial Analysis (3D)

CS 128/ES 228 - Lecture 12b 30

Conclusions A GIS without spatial analysis is like a car

without a gas pedal.

It is okay to look at, but you can’t do anything with it.

A GIS without 3-D spatial analysis is like a car without a radio.

It may still be useful, but most people would think it’s “standard” to have it and if you don’t, you are likely to wish you had the “luxury”.