©2007 Austin Troy Lecture 7: Introduction to GIS 1.Queries and table operations for a single layer in Arc GIS 2.Intro to queries in Access Lecture by Austin.

Slides:



Advertisements
Similar presentations
Tables Recall A view displays features A feature is a geographic component of a theme and must have attributes to have significant meaning......
Advertisements

Access 2007 ® Use Databases How can Microsoft Access 2007 help you structure your database?
©2007 Austin Troy Lecture 8: Introduction to GIS 1.Multi-layer vector query operations in Arc GIS 2.Vector Spatial Joining Lecture by Austin Troy, University.
Chapter 5 Creating, Sorting, and Querying a Table
Database Features. Lists n An Excel worksheet can be used like a table in a relational database. n In Excel, such a table is called a list. n Each row.
Mark Dixon Page 1 06 – Expression Builder. Mark Dixon Page 2 Session Aims & Objectives Aims –To use expressions to perform more complex calculations in.
Geodatabase basic. The geodatabase The geodatabase is a collection of geographic datasets of various types used in ArcGIS and managed in either a file.
Return to Outline Copyright © 2009 by Maribeth H. Price 6-1 Chapter 6 Spatial Joins.
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making.
Lecture by Austin Troy © 2005 Lecture 13: Introduction to Raster Spatial Analysis Using GIS-- Introduction to GIS Lecture Notes by Austin Troy, University.
Mgt 240 Lecture MS Excel and Access: Introduction to Databases September 23, 2004.
Query in Microsoft Access. Lesson plan Expression in Microsoft Access Create a query.
Lecture 3 How does GIS work. How does GIS work? Maps are stored in computers Databases and Tables Geometry Attributes.
Introduction to GIS ©2008 by Austin Troy. All rights reserved Lecture 5: Symbology Lecture by Austin Troy, University of Vermont.
Lab 7: Attribute SQL- Query the database
Lecture 16: Data input 1: Digitizing and Geocoding By Austin Troy University of Vermont Using GIS-- Introduction to GIS.
Fundamentals of GIS Materials by Austin Troy © 2008 Lecture 18: Data Input: Geocoding and Digitizing By Austin Troy University of Vermont NR 143.
©2007 Austin Troy Lecture 7: Introduction to GIS 1.Queries and table operations for a single layer in ArcGIS 2.Intro to queries in Access Lecture by Austin.
©2005 Austin Troy. All rights reserved Lecture 3: Introduction to GIS Part 1. Understanding Spatial Data Structures by Austin Troy, University of Vermont.
©2007 Austin Troy Lecture 7: Introduction to GIS 1.Queries and table operations for a single layer in Arc GIS 2.Intro to queries in Access Lecture by Austin.
©2005 Austin Troy Lecture 9: Introduction to GIS 1.Vector Geoprocessing Lecture by Austin Troy, University of Vermont.
1 Chapter 2 Reviewing Tables and Queries. 2 Chapter Objectives Identify the steps required to develop an Access application Specify the characteristics.
©2005 by Austin Troy. All rights reserved Lecture 5: Introduction to GIS Legend Visualization Lecture by Austin Troy, University of Vermont.
@ 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.
Chapter 2 Querying a Database
1 Access Lesson 3 Creating Queries Microsoft Office 2010 Introductory Pasewark & Pasewark.
1 Access Lesson 3 Creating Queries Microsoft Office 2010 Introductory.
GIS UPDATE? Lecture 17 Lab 8: Music Festival, Part 2 – Spatial Analysis.
ESRM 250 & CFR 520: Introduction to GIS © Phil Hurvitz, KEEP THIS TEXT BOX this slide includes some ESRI fonts. when you save this presentation,
Database Applications – Microsoft Access Lesson 9 Designing Special Queries Updated 4/11.
Database Applications – Microsoft Access Lesson 9 Designing Special Queries.
The Attribute Table! Without the attribute table, a polygon is just a polygon, a point is a point The attribute table defines what points, lines, or polygons.
Tutorial 8 Advanced Queries. Notes Switch to new database! Tutorial.08 folder Only Session 8.1 and 8.2.
GIS 1 GIS Lecture 4 Geodatabases. GIS 2 Outline Administrative Data Example Data Tables Data Joins Common Datasets Spatial Joins ArcCatalog Geodatabases.
Queries. What is a query? A query is actually the name for any database manipulation operation. The most commonly used type is a select query, which is.
Fundamentals of GIS Materials by Austin Troy © 2008 Lecture 18: Data Input: Geocoding and Digitizing By Austin Troy University of Vermont.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 4 BACKNEXTEND 4-1 LINKS TO OBJECTIVES Query Design Query Criteria Modify a Query Using OR.
Database Queries. Queries Queries are questions used to retrieve information from a database. Contain criteria to specify the records and fields to be.
Microsoft Access 2010 Building and Using Queries.
Analyzing Data For Effective Decision Making Chapter 3.
Introduction to GIS ©2008 by Austin Troy. All rights reserved Lecture 5: Symbology Lecture by Austin Troy, University of Vermont.
Exercise 1: Creating GIS data—points lines and polygons A very common method of creating vector data is to physically create these files through on-screen.
Fundamentals of GIS Lecture materials by Austin Troy (c) 2010, except where noted Lecture 3 Part 1.Important Database Concepts Part 2. Queries Lecture.
Introduction to Raster Spatial Analysis Using GIS-- Introduction to GIS Raster Query Map Calculation Zonal statistics Terrain functions Viewshed.
Examining data using Microsoft Access Queries Using Criteria and Calculations SESSION 3.2 This section covers specifying an exact match condition in a.
Database Systems Microsoft Access Practical #3 Queries Nos 215.
GIS 1 GIS Lecture 4 Geodatabases Copyright – Kristen S. Kurland, Carnegie Mellon University.
Fundamentals of GIS Lecture Materials by Austin Troy except where noted © 2008 Lecture 13: Introduction to Raster Spatial Analysis Using GIS-- By.
Access 2007 ® Use Databases How can Microsoft Access 2007 help you structure your database?
Faculty of Applied Engineering and Urban Planning Civil Engineering Department 2 nd Semester 2008/2009 GIS.
Database Applications – Microsoft Access Lesson 4 Working with Queries 36 Slides in Presentation.
NR 143 Study Overview: part 1 By Austin Troy University of Vermont Using GIS-- Introduction to GIS.
Introduction to GIS Lecture 2: Part 1. Understanding Spatial Data Structures Part 2. Legend editing, choropleth mapping and layouts Part 3. Map layouts.
Today’s Goals Answer questions about homework and lecture 2 Understand what a query is Understand how to create simple queries using Microsoft Access 2007.
T7-1 LEARNING OUTCOMES – ACCESS PROBLEM SOLVING 1.Describe the process of using the Simple Query Wizard using Access 2.Describe the process of using the.
(SQL - Structured Query Language)
NSF DUE ; Wen M. Andrews J. Sargeant Reynolds Community College Richmond, Virginia.
Excel part 5 Working with Excel Tables, PivotTables, and PivotCharts.
Querying Databases A query is a program that allows us to VIEW the data or operate on the data Several types of queries –Select query –Merge query –Summary.
Queries.
Microsoft Office Illustrated Introductory, Windows Vista Edition
DATABASE CONCEPTS A database is a collection of logically related data designed to meet the information needs of one or more users Data bases are store-houses.
Plug-In T7: Problem Solving Using Access 2007
Database Queries.
Exploring Microsoft Office Access 2010
Vector Geoprocessing.
Joins and other advanced Queries
Microsoft Office Illustrated Introductory, Windows XP Edition
Presentation transcript:

©2007 Austin Troy Lecture 7: Introduction to GIS 1.Queries and table operations for a single layer in Arc GIS 2.Intro to queries in Access Lecture by Austin Troy, University of Vermont

©2007 Austin Troy Introduction to GIS 1.Queries and table operations for a single layer

©2007 Austin Troy Queries Here’s an example of a simple query in Arc GIS PRICE > Introduction to GIS

©2007 Austin Troy Queries That results in the following selection on the map Introduction to GIS

©2007 Austin Troy Queries And it also selects the corresponding records in the attribute table Introduction to GIS

©2007 Austin Troy Queries Here’s an example with a polygon layer: census tracts over 8000 people in population. Introduction to GIS

©2007 Austin Troy Queries: multiple criteria big population tracts (>8,000) with a high rate of population change (> 3% annual). Note the use of the AND operator. Introduction to GIS

©2007 Austin Troy Queries: Select From Set vs. New Set We did the previous selection by clicking Using the “create a new selection” method. We could have done the same thing by doing the first query (pop>8000), clicking “Apply,” then, without clearing that selection, typing in a new query for the second condition (popchng97 > 3) and choosing the “Select From Selection” method instead Introduction to GIS

©2007 Austin Troy Three query methods in Arc GIS New Selection Add to Current Selection Select from Current Selection Introduction to GIS

©2007 Austin Troy Introduction to GIS Queries: OR operator Select either tracts greater than 8000 population OR with a growth rate greater than 3%; can also do the same thing by doing one query using “new selection” then another, using “add to current selection”

©2007 Austin Troy Introduction to GIS Queries: Strings Queries can also be made on text strings, but it is imperative to put the values in quotes. Here we query for both BLM and Parks and Rec land.

©2007 Austin Troy Introduction to GIS Queries: Strings and numbers String and number queries can be combined. For example, let’s say we’re looking for land for a suburban park and our criteria are that we need areas whose land use is classed as agricultural and that are bigger than 500,000 square feet.

©2007 Austin Troy Introduction to GIS Queries: Strings and numbers Results in:

©2007 Austin Troy Introduction to GIS Queries: Strings and numbers Whereas if our query asks for agricultural land use without the area criterion, we get:

©2007 Austin Troy Introduction to GIS So what can Arc GIS do with queries? A query selects records; once selected you can: Look at the selection Requery the selection Do stats on the selection Create new fields that recategorize the selection by an an attribute field Create new fields by doing calculations across several fields Create a shapefile from the selection

©2007 Austin Troy Introduction to GIS Examples Let’s query high unemployment census tracts in LA

©2007 Austin Troy Introduction to GIS Now let’s do “statistics” to determine the population in those areas. Answer: almost 5 million people live in tracts with 6%+ unemployment (see Sum). We can also see that there are 844 tracts meeting that description (see Count) Right click on the heading to get this menu

©2007 Austin Troy Introduction to GIS Another thing we can do is convert the selection to a either a new shapefile or geodatabase feature class Right click and then click Data>>export data

©2007 Austin Troy Introduction to GIS Now, let’s say we wanted to prioritize inner city areas for urban redevelopment projects: Let’s query based on unemployment and home value Based on these we’ll create a new field that classes all tracts into High, Medium and Low priority areas Tracts with median home value 12% are “High”

©2007 Austin Troy Introduction to GIS To reclassify, we create a new field, “priority”, activate the field heading and use the field calculator to set all selected records to “high” Note: we must uses quotes with a text field

©2007 Austin Troy Introduction to GIS Setting “medium” would be more complex queries because we’re querying for records, say, between 8 and 12% unemployment and between $100,000 and $150,000 median value.

©2007 Austin Troy Introduction to GIS Now, for the third class our task is easier—we just select everything that has not been selected yet. To do this we query for “priority”= ‘’ By putting empty quote marks, you’re querying for records with no values in them for that field. Now you’d set all those fields equal to “low.”

©2007 Austin Troy Introduction to GIS Now we can make a category map showing us that classification based, which is based on two attributes—median value and unemployment

©2007 Austin Troy Introduction to GIS Another example: This time, let’s take a vegetation layer and query for stands with crown fire potential; because there are several classes we have to query for all

©2007 Austin Troy Introduction to GIS Then let’s calculate a fire hazard index for selected polygons equal to.5(rate of spread * flame length) We’ll create a new field, “fireindex” (floating point) and set all selected polygons equal to that calculation

©2007 Austin Troy Introduction to GIS Then, for all other polygons without crown fire potential, a different equation can be used, say.38(Rate of spread * Flame length). But first we have to take the inverse of the selection by using the “switch selection” function Then we can do the new calculation on the new selection

©2007 Austin Troy Introduction to GIS Now we can plot out the map of fire index, plotted out using graduated color (quantity) mapping

©2007 Austin Troy Introduction to GIS 2. Introduction to queries in Access

©2007 Austin Troy Access and Arc GIS queries You can do all these queries and much much more in MS Access, which is a relational DBMS. For the most part, you’ll use Access to manipulate and query your attribute tables from geodatabases This can be done because a geodatabase is an MS Access file (.MDB) There are six basic queries you can do in Access: Select, cross-tab, make table, update, append, delete We’ll learn more about these in lab Introduction to GIS

©2007 Austin Troy Access Queries Select: the most general purpose and versatile query—creates a new temporary table; used for getting summary statistics for a field, or breaking down summary statistics by category Cross-tab: for summarizing statistics across two factors (row and column) Make table: for creating a new, stand-alone data table from a query Update query: this is where we fill a field (could be an empty field) in an existing table with new values, either equal to a constant, to values in another field or to an operation using values from another field; can use Where criteria on this Append/delete queries: query that defines rows to append to or delete from a table; append queries usually require another table. Introduction to GIS

©2007 Austin Troy Access Queries Queries can be used to: Summarize information stored in one or many tables (e.g. sales by year, sales by category, sales by saleperson, sales by date, orders by date, orders by product type, orders by zip code) Create new fields using simple or complex expressions, with the option of using criteria to specify which records will be filled in for that field Derive averages, maxima, minima, sums, standard deviations, and counts for values in fields, with or without criteria Derive those same things for categories within a field Summarize and ask questions of attribute data stored in different tables Introduction to GIS

©2007 Austin Troy Access Queries Example of query run to get sums of sales values across product categories: Introduction to GIS

©2007 Austin Troy Relational attribute queries Here’s a an Access select query; note how it queries across various linked tables This one asks for a summary of sales by category and product name for the dates between 1/1/1997 and 12/31/1997 Introduction to GIS

©2007 Austin Troy Introduction to GIS Advanced Single layer query operations Queries can be used to return statistics: here we get the mean price from a database of housing sales

©2007 Austin Troy Introduction to GIS Advanced Single layer query operations And here we summarize mean price by zip code

©2007 Austin Troy Introduction to GIS Remember the food database?

©2007 Austin Troy Introduction to GIS Advanced Single layer query operations This simple select query yields a summary table of sales by category for a given year period: generates a mean value for each category criteria relates

©2007 Austin Troy Introduction to GIS Advanced Single layer query operations This select query perform a math operation: it multiplies price and quantity, times a discount and delivers a table of order subtotals

©2007 Austin Troy Introduction to GIS Advanced Single layer query operations Here we sort sales by product and city operation criteria

©2007 Austin Troy Introduction to GIS Advanced Single layer query operations Here we sort sales by city only

©2007 Austin Troy Introduction to GIS Advanced Single layer query operations Queries can also be used to make reports, like this invoice

©2007 Austin Troy Introduction to GIS Advanced Single layer query operations Queries can be programmed to make custom database interfaces, so users can easily ask questions of the data, like this, where orders are summarized by buyer and the user chooses the country to query on