Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

41
Intro. To GIS Lecture 6 Spatial Analysis April 8 th , 2013

Transcript of Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Page 1: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Intro. To GISLecture 6

Spatial Analysis

April 8th, 2013

Page 2: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Reminders

• Please submit your homework

• Project?

Page 3: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Spatial Features

Types of features in GIS

1) Point Nest Site; gas stations

2) Line Movement Path; River;

3) Polygon Home Range; Nest Plot

Note: When we talk about features we mean vector datasets

Page 4: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Spatial Features cont.

• Feature Class– Group of features of the same geometry– Can be filed in different formats

Shapefile

Page 5: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.
Page 6: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Spatial Analysis

• The application of operations to coordinate and related attribute data

• Maps are great, but this is the real power of GIS

• Spatial analysis is used to explore or solve a problem using a variety of geoprocessing tools

Page 7: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

BASIC SPATIAL ANALYSIS TOOLS IN A GIS

database queries Selection/selection by location

Spatial joins basic statistics Functions (Tools)

Dissolve Buffering Near overlay

Page 8: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

GIS ANALYSIS TOOLS

Page 9: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

QUERIESAsk questions about GIS databases: Where are the older stands? Which roads are paved? Which trails are authorized? Which water sources are within a certain distance of a

road?

Note that the queries do not inherently result in a new layer… They usually only highlight features (which could be exported to a new layer afterwards)

Page 10: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

QUERIESWhere are the thinnable stands?

Age 30 and Age 40 Age 30 and Age 40 and MBF 30

Page 11: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

QUERIES

Structured Query Language (SQL) uses standard operators

e.g. = > < + - * “and” “or” “not”

standard order of operations add/subtract before multiply/divide use parentheses to “isolate” terms

Page 12: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

QUERIESExample: select stands greater than 30 acres with grass

understories and a mean quadratic diameter less than 20 inches.

query for above:

(area > 30) and (understory = “grass”) and (QMD < 20)

Page 13: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

QUERIES: Not always the Best

#Y#Y#Y

#Y #Y

Which water sources are within a certain distance of a road?

we need more information.

perhaps a new database layer.

“buffering” may help answer this question

Page 14: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Spatial Joins

• Joins attributes from one feature class to another based on a spatial relationship (INTERSECT, CONTAINS, WITHIN, CLOSEST)

– points in polygon (identifies polygon in which point is located)

– polygon in polygon (identifies polygon in which polygon is located)

– lines in polygon (identifies polygons crossed by line)

– points on lines (calculate distance to nearest line)

– points on points (calculate distance to “nearest neighbor” point)

operate on tables and normally creates a new table with additional variables, but does not modify spatial features themselves

Page 15: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Query Vs. Spatial Join

• Selection: simply selects (“highlights”) entire spatial features in the target layer, but doesn’t modify these features

– Selection only– Only Selected features (a subset of all features) are “output”– No new output file saved unless you use Export/data

• joins: operate on tables and normally creates a new table with additional fields or variables (columns), but again does not modify actual spatial features (rows)

– adds attributes (columns) to the layer’s table from another layer’s table– All features are “output”– No features modified– No new output file saved unless you use Export/data

Note: Different approaches can be used, in some cases, to produce same results.

Page 16: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

BASIC STATISTICS

statistics can help determine meaning within the data

simple, sum, count, mean, maximum, range, variance and standard deviation

calculates statistics for a combination of fields, for example: by combining the ‘State’ name field &

‘Population’ fields, we can calculate the average state population

Page 17: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

• Right Click on the Field• Go to “Summarize”

Choose statistic to summarize

Page 18: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

BASIC STATISTICS: Calculating Fields

• New values can be calculated based on other attribute values

• Simple algebra and more advanced math operations

• Text functions for picking part of a string or modifying case

Page 19: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

BASIC STATISTICS: Calculate Geometry

• Length, Area, or X,Y coordinates

• Choose coordinate system of source or data frame

• Pick units of measurement

• Make sure field has units in the name

Page 20: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Functions (Tools): Types of Analysis

Layer 1Function 1 Layer 2

Function 2 Layer 3

Function

Layer 2

Layer 1

Layer 3

Page 21: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Dissolve Tool

– Similar to the merge function in Editor toolbar

Page 22: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Dissolve Tool

• Input Features• Output Feature Class• Dissolve field(s)

(optional)• Statistics (optional)

• Create multipart features (optional)

Page 23: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Buffering

• Buffering creates a polygon using a specified distance from a point, line, or other polygon

Page 24: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Buffer Tool

• Input Features• Output Feature

Class• Distance

– Linear unit (pick units)

– Field (attribute table)

• Side/End type• Dissolve Type

Page 25: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Buffer application

• 500 ft. buffer applied to houses

• Buffer overlaps transfer station

Page 26: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Multiple-Ring Buffer

• Creates buffers for many distances at once

• Dissolve option makes them non-overlapping

Page 27: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Near Tool

• Calculates distance from input features to nearest feature in other layer(s)

Page 28: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Near Tool

• Output has field with ID and distance of feature

• Multiple near layers can be calculated at once

• Options to include:– Location (X,Y)– Angle (degrees)

Page 29: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Near Application

Page 30: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Overlay

• Intersect

• Identity

• Symmetrical Diff.

• Union

• Clipping/Erasing

Page 31: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Intersect (AND Operator)

• Polygons split at feature boundaries of both datasets

• Only overlapping areas are kept

• Attribute tables are updated in output

Page 32: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Identity

• Similar to intersect but input features are not clipped

• Features split along identity polygon edges

• Attribute tables are combined in output

Page 33: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Symmetrical Difference (XOR Operator)

• Simply differencing the two layers (overlapping areas are ignored)

Page 34: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Union (OR Operator)

• Like Intersect but both input and union features are retained

• Output features have attributes from both input and union layers

Page 35: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Clipping

• Using one layer like a cookie cutter for another

• Any vector can be used as input

• Clip feature must be a polygon

Page 36: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Erasing

• The opposite of clipping– Erase feature used to remove a portion of

the input data (point, line, or polygon)

Page 37: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Intersect / Identity / UnionWhich function is which?

Page 38: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Summary

Page 39: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Soil Type

Overlaid with

Crops Production(ton/ha)

Overlay Result

GIS Technology: Relationship between Land use and Crop Productivity

Overlay Analysis

Page 40: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Spatial Analysis Tips

• Using these tools in conjunction with each other can produce some useful data– Clip a polygon using a buffer– Calculate new fields to determine percentages

• Name your output files so you will remember the inputs and the tool you used– i.e. (LandUse_Buffer_Intersect.shp)

• When in doubt, check the help documentation

Page 41: Intro. To GIS Lecture 6 Spatial Analysis April 8 th, 2013.

Homework & Lab

• HW 7: Ch. 6 p. 149 – 165, answer Q’s 1, 3, 4, 12

• Lab this week: Spatial (vector-raster) Analysis– The instructions will be given (Do NOT

bring your lab book on Wed)

• Next lecture would be on April 17th