4 The Vector Data Model Three types of vector data Lecture 3bThe Vector Data ModelThree types of vector dataPointsLines / ArcsPolygonsA 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
6 Line Features Each point has a unique location Lecture 3bLine FeaturesEach point has a unique location2 points define a line segmentOne or several line segments define an arcThe endpoints of an arc are “nodesThe angle points are “vertices” (sing. Vertex)The feature is the arc, not the lineTwo arcs meet at the nodes
7 Line Features Points define lines (arcs) Arc Feature is the ARC, not the line segmentsArcs meet at the nodesLine segmentVertexNode
8 Polygon Features Area of homogenous phenomena Lecture 3bPolygon FeaturesArea of homogenous phenomenaIn a polygon layer, lines (arcs) define areasClosed region – first and last coordinate pairs are at the same locationLine segments bound the polygonComputer “knows” that interior belongs to shapeLines (Arcs)Points
9 Rings A series of line segments (a string) that close upon each other Lecture 3bRingsA series of line segments (a string) that close upon each otherNOT a polygon!!
10 Lecture 3bVector TopologyDefinition1: Explicit encoding of spatial relationships between objects: the spatial location of each point, line and polygon is defined in relation to each otherDefinition2: 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:Allows for powerful spatial analysisQuality control
11 Vector Topology: Types Lecture 3bVector Topology: TypesArc-node and node topology : the way that line features connect to point featuresPolygon topology: the way that neighboring polygons connect and share bordersRoute 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 Vector Topology: Quality Control Lecture 3bVector Topology: Quality ControlEnsuring data quality and “logical consistency”Defining complex and nuanced spatial rules.Single layer quality control:danglesovershootspolygons that don’t closeadjacent polygons that do not share a border
14 Vector Topology: Quality Control Lecture 3bVector Topology: Quality ControlMutli-Layer quality control: Defining spatial rules between layersPolygon rules: e.g. Must Not OverlapLine rules: e.g. Must Not IntersectPoint rules: e.g. Must be Properly Inside PolygonsDefine and validate topology rules in ArcCatalog and ArcMap(http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Geodatabase_topology_rules_and_topology_error_fixes/001t000000sp000000/)
15 Topology Rules: Example Lecture 3bTopology Rules: ExampleSay we have the following layers: property lots, sidewalk, building footprints, zoning mapWe can specify topological rules, like:Lots must be enclosed polygonsBuildings must be entirely within a lotSidewalks must be outside a lot polygonLots must fall entirely within a single zoneLots 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 touchingWe can’t do this yet, but will be able to shortly
16 Vector Topology Table Polygon topology table Node topology table Lecture 3bVector Topology TablePolygon topology tableLists arcs / links comprising polygonNode topology tableLists arcs / links that meet at each nodeArc, or “link” topology tableLists the nodes on which each arc / link ends and polygons to right and left of each arc / link, based on start and finish nodesTable with real world coordinates for each point
17 Vector Topology Table A table of the polygon topology Lecture 3bVector Topology TableA table of the polygon topologyGraphical display of arcs, nodes, vertices and linesTopology table for the ARCs making up the polygons
18 Lecture 3bSpaghetti Data ModelNon-topological data model that looks like a vector data setCollections of line segments and points with no connectivity or topologyNo relative relationships encoded in this modelEach line segment is “unaware” of the other line segments
19 2. Multi-layer vector queries in ArcGIS Lecture 3b2. Multi-layer vector queries in ArcGIS
20 Lecture 3bSelecting By LocationLet’s say we want to gather information about houses in four sample neighborhoods to identify which houses are within fire hazard zones
21 Select By Location Selection Method Selection layer Lecture 3bSelect By LocationSelection MethodSelection layerSelection overlay layerSelection rule
22 Select By LocationNow with “sample houses” active, we click select by theme and tell it to choose features that intersect the features of fire hazard zone
23 Select By Location Those that overlay a hazard zone are selected Lecture 3bSelect By LocationThose that overlay a hazard zone are selectedSelectedNot selected
24 Select By Location …Zooming in to one of those neighborhoods Lecture 3bSelect By Location…Zooming in to one of those neighborhoods
25 Lecture 3bSelect By LocationNow 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 Lecture 3bSelect By LocationIf 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 Select By Location: Distance Lecture 3bSelect By Location: DistanceNow, 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 Select By Location : Distance Lecture 3bSelect By Location : DistanceThis time we use a different selection methodNote how we can specify the distance for selection
29 Select By Location: Distance Lecture 3bSelect By Location: DistanceResults in the following selection
30 Select By Location :Distance Lecture 3bSelect By Location :DistanceZooming into a neighborhood…
31 Select By Location :Distance Lecture 3bSelect By Location :DistanceNow if we run statistics on price again…Those within a mile of a Starbucks have a mean value of $504,972Those 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 Select By Location :Distance Lecture 3bSelect By Location :DistanceFor that same selection we could get statistics on a different variable—here we’ll look at lot sizeThose within a mile of a Starbucks have a mean size of 8776 square feetThose not within a mile of a Starbucks have a mean lot size of 10,024 sq feet. Why might that be?
33 Select By Location :Distance Lecture 3bSelect By Location :DistanceYou 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 highwayNote that these smaller roads are in a different layer
34 Select By Location :Distance Lecture 3bSelect By Location :DistanceScenario: 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 Select By Location :Distance Lecture 3bSelect By Location :DistanceOnce that feature is selected we can use “Select by location” to identify the affected propertiesNotice that this time we check “Use selected features”
36 Select By Location :Distance Lecture 3bSelect By Location :DistanceWe end up selecting only the houses within 500 m of Valley Blvd
37 Select By Location: Polygons Lecture 3bSelect By Location: PolygonsGenerally 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 Selecting By Location: Polygons Lecture 3bSelecting By Location: PolygonsExample: let’s select any census tract that intersects a fire zone; here’s the pre-selection map
39 Select By Location: Polygons Lecture 3bSelect By Location: PolygonsUsing the “intersect” selection method we get this
40 Select By Location: Polygons Lecture 3bSelect By Location: PolygonsUsing “that are completely within” method, we return no selected features. With “have their center in” we get
41 Select By Location: Selected Records Lecture 3bSelect By Location: Selected RecordsIntersectCompletely within
42 What can be done with multi-layer selections? Lecture 3bWhat 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 selectionDo statistics on itMake a new field in that layerCalculate or recalculate a field for a selection
43 3. Spatial Join —assigning attributes by location Lecture 3b3. Spatial Join —assigning attributes by location
44 Lecture 3bSpatial JoinAssigns attribute data from features in one layer to spatially coincident features in anotherpolygon attributes to point featurespoint attributes to point featurespoint to line distances between two layersSimply adds attributes to the attribute table
45 Lecture 3bSpatial JoinRight clicking on the “to” layer and selecting Joins and Relates >>> JoinSpecify what you want to join by location and choose which layer we are joining from
46 Lecture 3bSpatial JoinIn 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 anotherNote that this creates a new layer
47 Lecture 3bSpatial JoinNow 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 Spatial Join: Distance Lecture 3bSpatial Join: DistanceWe 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 Spatial Join:Distance Lecture 3bSpatial Join:DistanceSuppose we want to assign the name of the nearest major road to our housing layer.
50 Spatial Join:Distance Lecture 3bSpatial Join:Distance“from” layerTwo optionsnumerical summary of the lines that intersect each pointassign all attributes from the nearest line.We choose the latter
54 Spatial Join: Polygons Lecture 3bSpatial Join: PolygonsIntuitive when it comes to assigning attributes to points and linesWhat about polygons?Layer ALayer B
55 Spatial Join: Polygons Lecture 3bSpatial Join: PolygonsProblem: 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 Spatial Join: Polygons Lecture 3bSpatial Join: PolygonsUnfortunately, the tract boundaries and zip code boundaries do not match up. Note that tracts are not nested within zip codes—they cut across
58 Spatial Join:Polygons Lecture 3bSpatial Join:PolygonsThis 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
60 Purpose of Geoprocessing Lecture 3bPurpose of GeoprocessingTools for breaking down the size of map features:Union, Intersect, ClipTools 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 Union Combines features of two themes Each theme is treated the same Lecture 3bUnionCombines features of two themesEach theme is treated the sameGoes to extent of largest themeKeeps all line work, creates new polygonsBreaks down features into smaller minimum mapping unitsCan use selected features option tooKeeps all attributes
62 Lecture 3bTools: Uniononly accepts polygon features
64 Lecture 3bIntersectYields polygons representing areas that are common to both layersPreserves line work within common extentCreates new, smaller polygonsPreserves all attributes from both
65 Lecture 3bUnion vs. IntersectionUnion is the entirety of two overlapping sets of featuresIntersection identifies the common areaContinuous and exhaustive vs. “island” polygons have different ramifications for these toolsIntersect:“1 AND 2”LayerLayer 2Union:“1 OR 2”Layer 2Layer
66 Union vs. Intersection: Example Lecture 3bUnion vs. Intersection: ExampleSuppose we have deer wintering areas in one layer and conserved lands in another.
67 Union vs. Intersection: Example Lecture 3bUnion vs. Intersection: ExampleUnion gives us land that is EITHER conserved OR that is a deer wintering areas
68 Union vs. Intersection: Example Lecture 3bUnion vs. Intersection: ExampleIntersect gives us land that is BOTH, and preserves all polygon boundaries within that common extent
69 Tools: Clip Input Features = Point, Line or Polygon Lecture 3bTools: ClipInput Features = Point, Line or PolygonClip Features = Polygon
70 Clipping highways for Merced Lecture 3bClipping highways for MercedNote that the “Use selected features only” option was used
75 Lecture 3bDissolve : ExampleNow 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 Lecture 3bMergeAllows you to “join” two adjacent or non-adjacent layers into a single layerLike “tiling”Best when attributes match
77 Merge Often when you merge you will want to follow up by dissolving. Lecture 3bMergeOften 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 tilesMerging joins multiple tiles into a single layer and dissolving reunites polygons that were split up in the tiling process
78 Lecture 3bTools: BufferingBuffering is when you draw a polygon around a feature (point, line or polygon); Here we’re buffering a stream
79 Lecture 3bTools: BufferingBased on distanceBased on attribute
80 Tools: Buffering Width of buffer can vary with an attribute value Lecture 3bTools: BufferingWidth of buffer can vary with an attribute valueWe can recalculate that attribute to make a meaningful buffer widthExample from lab: a buffer based on traffic volume
81 Combining Multiple Geoprocessing Tools: Example Lecture 3bCombining Multiple Geoprocessing Tools: ExampleSuppose we create fixed buffers around deer wintering areas and water bodies, and a variable buffer around roads, based on traffic:
82 Combining Multiple Geoprocessing Tools: Example Lecture 3bCombining Multiple Geoprocessing Tools: ExampleThen 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 Combining Multiple Geoprocessing Tools: Example Lecture 3bCombining Multiple Geoprocessing Tools: ExampleThe intersection of deer wintering buffers and water buffers is the area in the red
84 Combining Multiple Geoprocessing Tools: Example Lecture 3bCombining Multiple Geoprocessing Tools: ExampleThe union of that intersection with the traffic buffer:
85 Combining Multiple Geoprocessing Tools: Example Lecture 3bCombining Multiple Geoprocessing Tools: ExampleNow 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 Combining Multiple Geoprocessing Tools: Example Lecture 3bCombining Multiple Geoprocessing Tools: ExampleWe 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 Combining Geoprocessing Tools Lecture 3bCombining Geoprocessing ToolsInvolve multiple tasks performed in sequence, such as those that clip, buffering, intersect, union, then select datasets.Build and run a “model” in Model BuilderStep by step instructionsSpecify input, output, other parameters, order of operationCreate and run a script