Query and Reasoning. Types of Queries Most GIS queries will select spatial features Query by Attribute (Select by Attribute) –Structured Query Language.

Slides:



Advertisements
Similar presentations
Three-Step Database Design
Advertisements

GIS Lecture 8 Spatial Data Processing.
What is a Database By: Cristian Dubon.
The Hierarchical Model
Relational Algebra, Join and QBE Yong Choi School of Business CSUB, Bakersfield.
NSF DUE ; Module 4.3. NSF DUE ; GeoTEd Partners Module name and number.
Geoprocessing; Useful Tools You Should Know in ArcToolbox Unlock the hidden secrets of ArcToolbox to discover tools that make your work easier and analysis.
GIS UPDATE? ARE YOU TAKING NOTES? How will you remember what you did if you do not take notes. Lab 9 this week: Music Festival 3: Vector Analysis.
GIS Overlay Getting to the “where is?”. Distance buffering Creates a distance from a feature Creates a distance from a feature Works with points.
Data Storage and Processing GIS Topics and Applications.
Map Analysis with Feature Datasets Francisco Olivera, Ph.D., P.E. Department of Civil Engineering Texas A&M University.
©2005 Austin Troy Lecture 9: Introduction to GIS 1.Vector Geoprocessing Lecture by Austin Troy, University of Vermont.
Attribute databases. GIS Definition Diagram Output Query Results.
What Geoprocessing? Geoprocessing is the processing of geographic information. Commonly used to describe a process when geographic objects are manipulated.
The Relational Model Codd (1970): based on set theory Relational model: represents the database as a collection of relations (a table of values --> file)
Dr. David Liu Objectives  Understand what a GIS is  Understand how a GIS functions  Spatial data representation  GIS application.
@ 2007 Austin Troy. Geoprocessing Introduction to GIS Geoprocessing is the processing of geographic information. – Creating new polygon features through.
Intro. To GIS Lecture 6 Spatial Analysis April 8th, 2013
@ 2007 Austin Troy. Geoprocessing Introduction to GIS Geoprocessing is the processing of geographic information. Perform spatial analysis and modeling.
Introduction to ArcGIS for Environmental Scientists Module 3 – GIS Analysis ArcGIS Toolbox.
Basic Spatial Analysis
Preparing Data for Analysis and Analyzing Spatial Data/ Geoprocessing Class 11 GISG 110.
Attribute Data in GIS Data in GIS are stored as features AND tabular info Tabular information can be associated with features OR Tabular data may NOT be.
Spatial Analysis (Vector I) Reading Assignment: Bolstad Chapter 9 (pp )
GIS2: Geo-processing and Metadata Treg Christopher.
Applied Cartography and Introduction to GIS GEOG 2017 EL
Analysis in 9.2: Overlay. Analysis Usually starts with selection but selection can be used throughout an analysis The main tools for analysis are, however,
Introduction to ArcGIS for Environmental Scientists Module 2 – Fundamentals Chapter 7 – Queries.
Computer Science 101 Database Concepts. Database Collection of related data Models real world “universe” Reflects changes Specific purposes and audience.
DBSQL 3-1 Copyright © Genetic Computer School 2009 Chapter 3 Relational Database Model.
School of Geography FACULTY OF ENVIRONMENT Introduction to ArcToolbox and Geoprocessing.
Exploring ArcToolbox Presented by: Isaac Johnson.
Data Queries Selecting features in ArcMap Data queries  Important part of a GIS project Can be a part of your data preparation or final analysis  Data.
Geo-processing tools Tools: Buffer Geo-processing tools allow you to work with your data bases on spatial relations.... at a specified distance... with.
Queries Select by Attribute Select by Location. What is a Query? A query extracts information from a data table for further use –Once extracted you can:
Creating and Maintaining Geographic Databases. Outline Definitions Characteristics of DBMS Types of database Relational model SQL Spatial databases.
Map overlays & Geoprocessing Learn about spatial analysis functions overlays, clipping & buffering Use overlays to analyze multiple spatial criteria Understand.
CHAPTER 11 VECTOR DATA ANALYSIS 11.1 Buffering
NR 143 Study Overview: part 1 By Austin Troy University of Vermont Using GIS-- Introduction to GIS.
Intro to GIS | Summer 2012 Attribute Tables – Part 1.
School of Geography FACULTY OF ENVIRONMENT Querying with ArcGIS.
Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4.
NSF DUE ; Wen M. Andrews J. Sargeant Reynolds Community College Richmond, Virginia.
Geoprocessing Geoprocessing is a fancy name for Spatial Operations So what is Geoprocessing? Processing or manipulating of geographic/spatial data to.
Selecting features in ArcMap
Introduction to Geographic Information Systems Fall 2013 (INF 385T-28620) Dr. David Arctur Research Fellow, Adjunct Faculty University of Texas at Austin.
Environmental GIS Nicholas A. Procopio, Ph.D, GISP
Intro. To GIS Pre-Lab Spatial Analysis April 1 st, 2013.
CENTENNIAL COLLEGE SCHOOL OF ENGINEERING & APPLIED SCIENCE VS 361 Introduction to GIS SPATIAL OPERATIONS COURSE NOTES 1.
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
CHAPTER 10 DATA EXPLORATION 10.1 Data Exploration Box 10.1 Data Visualization Descriptive Statistics Box 10.2 Descriptive Statistics Graphs.
Chapter 5 Queries.
GIS Institute Center for Geographic Analysis
Vector Analysis Ming-Chun Lee.
Chapter 2: Relational Model
Attribute Extraction.
ArcMap: Geoprocessing
Basic Spatial Analysis
Spatial Analysis and Functions
Attribute Extraction.
Chapter 2: Intro to Relational Model
Spatial Data Processing
Review- vector analyses
Nicholas A. Procopio, Ph.D, GISP
URBDP 422 Urban and Regional Geo-Spatial Analysis
GIS Lecture: Geoprocessing
GIS Institute Center for Geographic Analysis
Vector Geoprocessing.
GIS Institute Center for Geographic Analysis
Presentation transcript:

Query and Reasoning

Types of Queries Most GIS queries will select spatial features Query by Attribute (Select by Attribute) –Structured Query Language (SQL) – a database computer language designed for managing data in a relational database. Query by Location (Select by Location) –Spatial Query –Buffering a Distance from a feature –Overlapping features

Relational Database Structure Most common database structure used today –MS Access –ESRI ArcInfo & ArcGIS (including ArcMap) –Oracle Very robust; Can be expanded as needed Allows very complicated searches while maintaining very simple sets of tables Can become very large and complex

Relational Database Structure Employs an ordered set of attribute values called tuples grouped into 2D tables called relations A relation has a header and body The header consists of a fixed set of attributes (i.e. fields) The body consists of a set of tuples, a row is a single tuple Relations can be linked by a Primary Key field. A values within a field must come from the same Domain. A domain is the set of scalar values from which the actual values can be drawn.

Relational Database Structure S#SNAMESTATUSCity S1Clarke10Phoenix S2Smith20Tucson S3Jones10Tucson S4Smith30Flagstaff Relation: Suppliers 4 Tuples 4 Attributes Domain for City: All the cities in Arizona Primary Key: Unique identifier for relation, no two rows can have the same value in that column – only S# can serve as a primary key.

Table Record Relationships One One to One Many to One One to Many

Relational Database Structure Most common database structure used today –MS Access –ESRI ArcInfo (including ArcMap) –Oracle Very robust; Can be expanded as needed Allows very complicated searches while maintaining very simple sets of tables Can also become very large and complex

Quadrat #Species # Quadrat #CollectorDateSite #LatitudeLongitude 1Smith06/10/ Jones07/11/ Smith07/11/ ……….. Species #Species NameType 1Conomyrma insanaGeneralist 2Pogonomyrmex rugosusSpecialist 3…… ……… Quadrats table Species code no. table Species table Table Record Relationships Links

Relational Database Structure All Relations must satisfy four properties –They can not contain duplicate tuples –There is no ordering of the tuples –There is no ordering of the attributes –All attributes values are atomic

Queries All tabular queries use Boolean Logic. Boolean logic involves True/False sets (Yes/No, 1/0) on which Boolean logical operators (or connectors) such as AND, OR, NOT and XOR can be applied. Going back to basic set theory, a group of individuals are either in a specific set or not.

Queries You can define a set by delineating a condition using logic (or relational) operations such as: –EQ or = [operand_1] is equal to [operand_2] –NE or <> [operand_1] is not equal to [operand_2] –GE or >= [operand_1] is greater than or equal to [operand_2] –LE or <= [operand_1] is less than or equal to [operand_2] –GT or > [operand_1] is greater than [operand_2] –LT or < [operand_1] is less than [operand_2] Only EQ and NE can be used on character string data.

You can the write a query or logic expression to find different sets with a relation like the one below ID#NameGross Income AgeGender 1Smith40,00035M 2Jones27,00025M 3Jordan57,00030M 4Miller30,00028F 5Hiller18,00018M 6Brown100,50045F 7White21,00036F 8Richards33,00052F 9Hurley60,00050M 10O’Brain30,00033M We can then define a set of tuples with a logic expression such as: Gender = F The members of the Set Gender = F are ID#’s 4, 6, 7, 8 The logic expression Age > 40 results in a set with three members: ID#’s 6, 8, 9

Complex Queries You can then write expressions with logical connector to define sets based on multiple conditions: –Gender = F: 4, 6, 7, 8Age > 40: 6, 8, 9 –Gender = F AND Age > 40: 6, 8 –Gender = F OR Age > 40: 4, 6, 7, 8, 9 –Gender = F NOT Age > 40: 4, 7 –Gender = F XOR Age > 40: 4, 7, 9

States with more than 45% of its Population Under 15 years of Age

Select by Location

Select by Location Tool Adds, updates, or removes a selection on the input layer based on spatial relationships to features in another layer. Spatial Relationships: Intersect Within a Distance Contains Completely Contains Contains Clementini Within Completely Within Within Clementini Are Identical To Boundary Touches Share a Line Segment With Crossed by the Outline Of Have Their Center in

Contain vs Within CONTAIN: selects features in the Input Feature Layer which contain a feature in the Selecting Features layer. The Selecting Features can be inside as well as on the boundary of the Input Feature Layer. WITHIN: will select features in the Input Feature Layer which are within or contained by features in the Selecting Features layer.

3 Contain Spatial Relationships CONTAIN: selects features in the Input Feature Layer which contain a feature in the Selecting Features layer. The Selecting Features can be inside as well as on the boundary of the Input Feature Layer. COMPLETELY_CONTAINS: Selecting Features layer does not intersect the boundary of the Input Feature Layer. CONTAINS_CLEMENTINI: the results will be identical to CONTAINS with the exception that if the feature in the Selecting Features layer is entirely on the boundary of the Input Feature Layer, with no part of the contained feature properly inside the feature in the Input Feature Layer, the input feature will not be selected.

Intersect

Are Within A Distance of

Are Within

Contain

Implementation Selection Menu in ArcMap –Select by Attribute is also available from a Table Options Menu ArcToolbox – Data Management  Layers and Table View

Overlay Functions Result is a new data layer, not a selection features. Used on feature (vector) data. Geoprocessing Menu – Analysis Tools –Buffer: Creates a polygon with a defined radius –Clip: Extracts input features that overlay the clip features Special tool for Raster/Grid Clips –Union: Outputs all features, overlap and non-overlap –Intersect: Outputs only overlapping features –Merge: Combines multiple input datasets Append: Combines an input dataset with an existing dataset – Dissolve: Aggregates features based on specified attributes

Proximity analysis: bufferi ng Create a new area within a user-defined distance of an existing entity e.g., to determine areas impacted by a proposed highway

Point Line Area