Vector analysis - introduction Spatial data management operations - Assembling datasets for analysis Transform (reproject) Merge Append Clip Dissolve The role of topology in GIS analysis Data management operations Transform - reproject GIS can project layers on the fly for display via the dataframe Analysis usually requires all layers in the same projection Define and reproject to one standard system Use project tool or export data using the data frame 1
Merge merge -> new layer They can be points, lines or polygons but both must be the same feature type FME Feature Manipulation Engine can be used to merge data Merge Attribute tables are also merged Merge -> new layer 2
Append append -> existing layer They can be points, lines or polygons but both must be the same feature type They could include adding features to an existing dataset e.g. extra streams, trails to roads. Like a jig-saw, the pieces must fit (spatially) and the (picture) attributes match Ensure you still have the attributes after merge or append (you may lose them if the parts don t match) 3
Example of mismatching attributes: contour lines in feet versus metres (Northern BC NTDB data). only evident in size of elevations DEM jumps across mapsheets Elevation (Feet) Elevation (Metres) In attribute table (old map sheet), add a new field, name it new-elev In the field calculator, new-elev = elevation *.3048 Drop (delete) elevation field Rename new-elev to elevation Reducing the spatial extent of a dataset: CLIP Raster clip: define rectangle outline Top left, bottom right (coordinates) Cookie cutter - 4
Vector (or raster) clip Create a new shapefile and draw a hollow polygon 4 corners, with mouse or enter coordinates Or use an existing shapefile e.g. park boundary or forest district ArcMap: Clip vectors using zoom and select by location http://www.brocku.ca/maplibrary/procedures/arcmap_clip/arcmap_clip.htm 5
Dissolve: Aggregates features based on specified attributes Multipart features Dissolve can result in multipart features being created. A multipart feature is a single feature that contains noncontiguous elements and is represented in the attribute table as one record. Split -> multipart to single features 6
Dissolve lines Lines may have many pseudo-nodes from digitising or appending Cause: multiple map sheets, digitising sessions, operators Effects: slower processing, partial line distances What is GIS analysis? A systematic examination of a problem or complex entity in order to provide new information from what is already known (ESRI GIS Dictionary) Spatial analysis adds value to data, supports decisions and reveals patterns (www.mimu.com) Spatial analysis is the process by which we turn raw data into useful information. 7
Data analysis Two broad categories Spatial data analysis (= geo-processing) Tabular (attribute) data analysis Spatial analysis is the cornerstone of a GIS and separates it from other mapping or CAD systems Tabular data analysis can be performed within any DBMS (Database Management System) When performing analysis we are considering one of 5 questions Location What is at? Condition Where is it? Patterns What spatial pattern exists..? Trends What has changed since..? Modeling What if..? 8
Tabular / Attribute queries Queries involve tools or commands to retrieve information from a set of objects (layers, tables) Within a GIS, there are two basic types of queries Selection (Identify) Query Select specific records from a set of data Definition (Condition) Query Selects a more specific set of data by hiding other features which are in turn excluded from drawing 1. Location Query What is at? Manual selection of data Shows location and information about the feature. 9
2. Condition (where / select by attribute) A basic query is performed to select data using Logical (relational) Operators: = EQ Equal <> NE Not equal > GT Greater than < LT Less than >= GE Greater than or equal to <= LE Less than or equal to IN {1->200} Between the values of CN ' ' Contains the character string in the quotes Logical operators (non-spatial) example Species = Earthling Name <> Spock Age > 120 Name cn ( Spock, Kirk, Scotty ) Distance in 200 and 500 10
Boolean operators Can be used to combine conditions Boolean Logic (after George Boole, a 19th century mathematician) Create an expression reducible to a true or false condition. Using Boolean Operators. And (narrows the selection) Or (expands the selection) Boolean logic shown in Venn diagram Boolean Operators AND (a AND b) OR (a OR b) NOT (a NOT b) XOR (a OR b but not both) type = pine AND age > 100... selects all old growth pine type = pine OR age > 100 selects all pine and any type older than 100 It may require the use of brackets to avoid ambiguity in complex queries e.g. type = pine OR type = fir AND age > 100 type = (pine OR type = fir) AND age > 100 selects any pine plus old growth fir selects old growth (pine and fir) 11
SPATIAL ANALYSIS Condition Select by location Selects features from one data set based on their relationship with another layer Are within a distance of Are within Are completely within Share a line segment with Intersect adjacency Spatial analysis requires Topology One of the most important concepts in a GIS - defined as the spatial relationship between entities Adjacency (polygons) Containment (e.g. points in polygons) Connectivity (lines) 12
Vector analysis relies on these topological relationships data should be topological not spaghetti (e.g. raw TRIM data) Topology Critical in GIS due to the need to explore spatial relationships between features in the landscape Examples. Which parcels are adjacent to which Which roads are connected to which Which wells fall within a certain municipality Which streams are in a watershed 13
Converting lines to polygons ( containment ) Left bank Right bank Slivers between polygons - complicate area measurement - change adjacency relationships - hinder comparison between layers 14