Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fundamentals of GIS Lecture 4 Written by Austin Troy, Brian Voigt and Weiqi Zhou, University of Vermont © 2011.

Similar presentations


Presentation on theme: "Fundamentals of GIS Lecture 4 Written by Austin Troy, Brian Voigt and Weiqi Zhou, University of Vermont © 2011."— Presentation transcript:

1 Fundamentals of GIS Lecture 4 Written by Austin Troy, Brian Voigt and Weiqi Zhou, University of Vermont © 2011

2 Fundamentals of GIS 1.The Vector Data Model 2.Multi-layer Vector Queries 3.Spatial Join 4.Geoprocessing

3 Fundamentals of GIS 1. Vector Data Model

4 Fundamentals of GIS The Vector Data Model Three types of vector data 1.Points 2.Lines / Arcs 3.Polygons A given layer holds a single feature type (e.g. “roads” is a line layer, “counties” is a polygon or line layer, “weather stations” is a point layer) Shapefile vs Feature Class

5 Fundamentals of GIS Point Features A collection of records with (x,y) coordinates All lecture materials by Austin Troy © 2010except where noted Image modified from ESRI Arc Info electronic help ,2 6,3 5,5 3, IDX,Y Coordinates 12,2 23,6 35,5 46,3 … 104,1 10

6 Fundamentals of GIS Line Features Each point has a unique location 2 points define a line segment One or several line segments define an arc The endpoints of an arc are “nodes The angle points are “vertices” (sing. Vertex) The feature is the arc, not the line Two arcs meet at the nodes

7 Fundamentals of GIS Line Features Points define lines (arcs) Line segment Vertex Node Feature is the ARC, not the line segments Arcs meet at the nodes Arc

8 Fundamentals of GIS Polygon Features Area of homogenous phenomena In a polygon layer, lines (arcs) define areas Closed region – first and last coordinate pairs are at the same location Line segments bound the polygon Computer “knows” that interior belongs to shape Lines (Arcs) Points

9 Fundamentals of GIS Rings A series of line segments (a string) that close upon each other NOT a polygon!!

10 Fundamentals of GIS Vector Topology Definition1: Explicit encoding of spatial relationships between objects: the spatial location of each point, line and polygon is defined in relation to each other Definition2: Topology is a collection of rules and relationships that enables the geodatabase to more accurately model geometric relationships found in the world. Two major purposes: 1.Allows for powerful spatial analysis 2.Quality control

11 Fundamentals of GIS Vector Topology: Types Arc-node and node topology : the way that line features connect to point features Polygon topology: the way that neighboring polygons connect and share borders Route topology: the way that a line feature of one type (e.g. commuter rail line) shares segments with line features of another type (e.g. Amtrack rail line) Regions topology: the way that polygons overlap (e.g. GIS layers with a time component) or when spatially separate polygons are part of the same feature

12 Fundamentals of GIS Vector Topology: Quality Control Ensuring data quality and “logical consistency” Defining complex and nuanced spatial rules. Single layer quality control: dangles overshoots polygons that don’t close adjacent polygons that do not share a border

13 Fundamentals of GIS Vector Topology: Quality Control overshoots slivers dangles Not sharing border

14 Fundamentals of GIS Vector Topology: Quality Control Mutli-Layer quality control: Defining spatial rules between layers Polygon rules: e.g. Must Not Overlap Line rules: e.g. Must Not Intersect Point rules: e.g. Must be Properly Inside Polygons Define and validate topology rules in ArcCatalog and ArcMap (http://help.arcgis.com/en/arcgisdesktop/10.0/help/ind ex.html#/Geodatabase_topology_rules_and_topology_ error_fixes/001t000000sp000000/)

15 Fundamentals of GIS Topology Rules: Example Say we have the following layers: property lots, sidewalk, building footprints, zoning map We can specify topological rules, like: Lots must be enclosed polygons Buildings must be entirely within a lot Sidewalks must be outside a lot polygon Lots must fall entirely within a single zone Lots must either share a border with another lot or with city land, including streets and sidewalks. In a low-density zone, no more than 20 lots can be touching We can’t do this yet, but will be able to shortly

16 Fundamentals of GIS Vector Topology Table 1.Polygon topology table Lists arcs / links comprising polygon 2.Node topology table Lists arcs / links that meet at each node 3.Arc, or “link” topology table Lists the nodes on which each arc / link ends and polygons to right and left of each arc / link, based on start and finish nodes 4.Table with real world coordinates for each point

17 Fundamentals of GIS Vector Topology Table Graphical display of arcs, nodes, vertices and lines Topology table for the ARCs making up the polygons A table of the polygon topology

18 Fundamentals of GIS Spaghetti Data Model Non-topological data model that looks like a vector data set Collections of line segments and points with no connectivity or topology No relative relationships encoded in this model Each line segment is “unaware” of the other line segments

19 Fundamentals of GIS 2. Multi-layer vector queries in ArcGIS

20 Fundamentals of GIS Selecting By Location Let’s say we want to gather information about houses in four sample neighborhoods to identify which houses are within fire hazard zones

21 Fundamentals of GIS Select By Location Selection Method Selection layer Selection overlay layer Selection rule

22 Fundamentals of GIS Select By Location Now with “sample houses” active, we click select by theme and tell it to choose features that intersect the features of fire hazard zone

23 Fundamentals of GIS Select By Location Those that overlay a hazard zone are selected Selected Not selected

24 Fundamentals of GIS Select By Location …Zooming in to one of those neighborhoods

25 Fundamentals of GIS Select By Location Now we run statistics on the Price attribute of the selected records. This tells us that 1955 houses overlay fire zones it also tells us that the mean price for these properties is $467,551!

26 Fundamentals of GIS Select By Location If we invert the selection with the Switch Selection button, we see that on average houses outside the fire zones are worth less! Only $246,752

27 Fundamentals of GIS Select By Location: Distance Now, say we want to select features from layer A that are within a distance of features in layer B. In this case we’ll select houses in our sample neighborhoods that are within 1 mile of a Starbucks

28 Fundamentals of GIS Select By Location : Distance This time we use a different selection method Note how we can specify the distance for selection

29 Fundamentals of GIS Select By Location: Distance Results in the following selection

30 Fundamentals of GIS Select By Location :Distance Zooming into a neighborhood…

31 Fundamentals of GIS Select By Location :Distance Now if we run statistics on price again… Those within a mile of a Starbucks have a mean value of $504,972 Those not within a mile of a Starbucks have a mean value of $273,866! By the way, these are real data, I’m not making this up!!

32 Fundamentals of GIS Select By Location :Distance For that same selection we could get statistics on a different variable—here we’ll look at lot size Those within a mile of a Starbucks have a mean size of 8776 square feet Those not within a mile of a Starbucks have a mean lot size of 10,024 sq feet. Why might that be?

33 Fundamentals of GIS Select By Location :Distance You can also select features in a point layer that are within a specified distance to a linear feature in another layer. Here we’ll find houses in a neighborhood within a mile of a highway Note that these smaller roads are in a different layer

34 Fundamentals of GIS Select By Location :Distance Scenario: There’s going to be a parade on Valley Boulevard and the city needs to inform all those homeowners on or near the route. We want to select points located within a specified distance of a single feature within a layer? Here we’ll find all homes within 500 meters of Valley Blvd. First a simple query to identify Valley Boulevard

35 Fundamentals of GIS Select By Location :Distance Once that feature is selected we can use “Select by location” to identify the affected properties Notice that this time we check “Use selected features”

36 Fundamentals of GIS Select By Location :Distance We end up selecting only the houses within 500 m of Valley Blvd

37 Fundamentals of GIS Select By Location: Polygons Generally polygons in one layer do not perfectly coincide with those in another. Using the default selection method (Intersect) the entire polygon is selected even if only a small part is coincident. However, there are many other methods we can choose from that will change the number of polygons selected.

38 Fundamentals of GIS Selecting By Location: Polygons Example: let’s select any census tract that intersects a fire zone; here’s the pre-selection map

39 Fundamentals of GIS Select By Location: Polygons Using the “intersect” selection method we get this

40 Fundamentals of GIS Select By Location: Polygons Using “that are completely within” method, we return no selected features. With “have their center in” we get

41 Fundamentals of GIS Select By Location: Selected Records Intersect Completely within

42 Fundamentals of GIS What can be done with multi-layer selections? Once a selection has been done using “select by location” you can do all the same things you would do with a single-layer selection: Make a new layer from the selection Do statistics on it Make a new field in that layer Calculate or recalculate a field for a selection

43 Fundamentals of GIS 3. Spatial Join —assigning attributes by location

44 Fundamentals of GIS Spatial Join Assigns attribute data from features in one layer to spatially coincident features in another polygon attributes to point features point attributes to point features point to line distances between two layers Simply adds attributes to the attribute table

45 Fundamentals of GIS Spatial Join Right clicking on the “to” layer and selecting Joins and Relates >>> Join Specify what you want to join by location and choose which layer we are joining from

46 Fundamentals of GIS Spatial Join In this case we are going to join tracts to the houses from our sample neighborhoods. Each house inherits all the attributes of the tract in which it falls. This is a great way to assign data from layer to another Note that this creates a new layer

47 Fundamentals of GIS Spatial Join Now we can plot houses by any of the attributes that were in the tracts database. Here’s a plot of houses graduated by percent unemployment of the tract to which they belong

48 Fundamentals of GIS Spatial Join: Distance We can also do spatial joins based on distance. Whenever we join a point or line layer to another point or line layer, for each feature in the TO layer it gives us the attributes of the nearest feature in the FROM layer PLUS the distance between those features in whatever map units we specify

49 Fundamentals of GIS Spatial Join:Distance Suppose we want to assign the name of the nearest major road to our housing layer.

50 Fundamentals of GIS Spatial Join:Distance Two options 1.numerical summary of the lines that intersect each point 2.assign all attributes from the nearest line. We choose the latter “from” layer

51 Fundamentals of GIS Spatial Join: Distance All lecture materials by Austin Troy © 2010except where noted Name of nearest highway is an attribute for each housing point; here I’m plotting out categorically (by road name) after completing the join

52 Fundamentals of GIS Spatial Join: Distance All lecture materials by Austin Troy © 2010except where noted The Euclidean distance from each point to the nearest road feature is recorded in the attribute “Distance.” Here I’m plotting out distance to nearest major road.

53 Fundamentals of GIS Spatial Join: Distance All lecture materials by Austin Troy © 2010except where noted We can also do a join to get the distance from a series of points in one layer to a series of points in another: here is distance of houses to nearest Starbucks

54 Fundamentals of GIS Spatial Join: Polygons Intuitive when it comes to assigning attributes to points and lines What about polygons? Layer A Layer B

55 Fundamentals of GIS Spatial Join: Polygons Problem: A polygon in layer A may overlay several polygons in layer B. Whose attributes do you give it? Spatial join and summarize (e.g. by average) the values of all the polygons of layer B that overlap the polygons of layer A. Example: Say we have a census tract layer with all sorts of demographic info (e.g., population, race) and we have a zip code layer with no demographic info attached to it. Our client is doing a marketing study and needs to have a map showing median age and percent Hispanic by zip code. We have both these attributes in our tract data layer and need to “transfer” them to the zip code layer

56 Fundamentals of GIS Spatial Join: Polygons Unfortunately, the tract boundaries and zip code boundaries do not match up. Note that tracts are not nested within zip codes—they cut across

57 Fundamentals of GIS Spatial Join:Polygons All lecture materials by Austin Troy © 2010except where noted To deal with this we join two polygon layers based on their spatial location and choose the “summarize” option (the first radio button). This allows us to choose a statistic by which to summarize the value of all the constituent tract polygons for each zip code polygon. In this case we’ll choose “average” as our statistics

58 Fundamentals of GIS Spatial Join:Polygons This results in a new output zip code layer with the average of every census tract variable; here median age is plotted; ArcGIS calls it Avg_MEDAGE so that we know what statistic this is based on

59 Fundamentals of GIS 4. Vector Geoprocessing

60 Fundamentals of GIS Purpose of Geoprocessing Tools for breaking down the size of map features: Union, Intersect, Clip Tools for increasing the size of map features: dissolve and merge (indirectly) ArcInfo and ArcToolbox include various other geoprocessing overlay operations, such as Update and Dissolve Regions

61 Fundamentals of GIS Union Combines features of two themes Each theme is treated the same Goes to extent of largest theme Keeps all line work, creates new polygons Breaks down features into smaller minimum mapping units Can use selected features option too Keeps all attributes

62 Fundamentals of GIS Tools: Union only accepts polygon features

63 Fundamentals of GIS Finding Geoprocessing Tools

64 Fundamentals of GIS Intersect Yields polygons representing areas that are common to both layers Preserves line work within common extent Creates new, smaller polygons Preserves all attributes from both

65 Fundamentals of GIS Union vs. Intersection Union is the entirety of two overlapping sets of features Intersection identifies the common area Continuous and exhaustive vs. “island” polygons have different ramifications for these tools Layer 1 +Layer 2 Intersect: Layer 1 + Layer 2 Union: “1 AND 2” “1 OR 2”

66 Fundamentals of GIS Union vs. Intersection: Example Suppose we have deer wintering areas in one layer and conserved lands in another.

67 Fundamentals of GIS Union vs. Intersection: Example Union gives us land that is EITHER conserved OR that is a deer wintering areas

68 Fundamentals of GIS Union vs. Intersection: Example Intersect gives us land that is BOTH, and preserves all polygon boundaries within that common extent

69 Fundamentals of GIS Tools: Clip Input Features = Point, Line or Polygon Clip Features = Polygon

70 Fundamentals of GIS Clipping highways for Merced Note that the “Use selected features only” option was used

71 Fundamentals of GIS Tools: Dissolve

72 Fundamentals of GIS Dissolve: Example Dissolve zip codes (small) into counties (large)

73 Fundamentals of GIS Dissolve: Example Choose the dissolve field: e.g. Dissolve based on the County field

74 Fundamentals of GIS Dissolve : Example Summarize the resulting field values. For instance, I could calculate the average area of the zip codes that intersect each county. All lecture materials by Austin Troy © 2010except where noted

75 Fundamentals of GIS Dissolve : Example Now we have created a county map, and for each county we have an attribute that equals the sum of the populations of the constituent zip codes

76 Fundamentals of GIS Merge Allows you to “join” two adjacent or non-adjacent layers into a single layer Like “tiling” Best when attributes match

77 Fundamentals of GIS Merge Often when you merge you will want to follow up by dissolving. This is because artificial polygon boundaries were created at the borders by the act of splitting the data up into tiles Merging joins multiple tiles into a single layer and dissolving reunites polygons that were split up in the tiling process

78 Fundamentals of GIS Tools: Buffering Buffering is when you draw a polygon around a feature (point, line or polygon); Here we’re buffering a stream

79 Fundamentals of GIS Tools: Buffering Based on distance Based on attribute

80 Fundamentals of GIS Tools: Buffering Width of buffer can vary with an attribute value We can recalculate that attribute to make a meaningful buffer width Example from lab: a buffer based on traffic volume

81 Fundamentals of GIS Combining Multiple Geoprocessing Tools: Example Suppose we create fixed buffers around deer wintering areas and water bodies, and a variable buffer around roads, based on traffic:

82 Fundamentals of GIS Combining Multiple Geoprocessing Tools: Example Then we could, for instance, find areas that are near deer wintering areas and water bodies but far from traffic: First we would intersect the deer wintering and water body buffers, yielding areas that are near both. Next we union the result with the traffic buffer. Finally, query the attributes to determine which areas meet your criteria.

83 Fundamentals of GIS Combining Multiple Geoprocessing Tools: Example The intersection of deer wintering buffers and water buffers is the area in the red

84 Fundamentals of GIS Combining Multiple Geoprocessing Tools: Example The union of that intersection with the traffic buffer:

85 Fundamentals of GIS Combining Multiple Geoprocessing Tools: Example Now we can query for polygons that were created from the intersection (met the two good criteria) and for areas that are not within a traffic buffer

86 Fundamentals of GIS Combining Multiple Geoprocessing Tools: Example We can then create a layer from that—Note that we have created entirely new polygon boundaries and geometry by cutting and splicing these buffers together.

87 Fundamentals of GIS Combining Geoprocessing Tools Involve multiple tasks performed in sequence, such as those that clip, buffering, intersect, union, then select datasets. Build and run a “model” in Model Builder –Step by step instructions –Specify input, output, other parameters, order of operation –Create and run a script

88 Fundamentals of GIS Model Builder


Download ppt "Fundamentals of GIS Lecture 4 Written by Austin Troy, Brian Voigt and Weiqi Zhou, University of Vermont © 2011."

Similar presentations


Ads by Google