lecture 10 creating and maintaining geographic databases longley et al., ch. 10, through section...

42
Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Upload: vernon-stevens

Post on 21-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Lecture 10 Creating and Maintaining

Geographic Databases

Longley et al., Ch. 10, through section 10.4

Page 2: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Outline

DefinitionsCharacteristics of DBMSTypes of databasesRelational modelSQLQueries as a gateway to spatial analysis

Page 3: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

cell towers+/- 500 mGoogle db of

tower locations

Graphic courtesy of Wired, Feb. 2009

Wi-Fi+/- 30 mSkyhook

servers and dbiPhone GPS+/- 10 m

iPhone uses reference network

Page 4: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Definitions

Database – an integrated set of data (attributes) on a particular subjectGeographic (=geospatial) database - database containing geographic data of a particular subject for a particular areaDatabase Management System (DBMS) – software to create, maintain and access databases

Page 5: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

A GIS can answer the question: What is where?

WHAT: Characteristics of features (= attributes).WHERE: In geographic space.

Page 6: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

A GIS links attribute and spatial data

Attribute Data• Flat File or

DBMS• Relationships• Topology Table

Map Data• Point File• Line File• Area File• Topology Type

Page 7: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Flat File or DBMS

Record Value Value Value

Attribute Attribute Attribute

Record Value Value Value

Record Value Value Value

Page 8: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Ancient DBMS

From Clarke, Getting Started with GIS

Page 9: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Types of DBMS Models

HierarchicalNetworkRelational - RDBMSObject-oriented - OODBMSObject-relational - ORDBMS

Page 10: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Historically, databases were structured hierarchically in flat files...

Page 11: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Relational Databases rule now

Page 12: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Characteristics of DBMS (1)

Support for multiple data typese.g MS Access: Text, Memo, Number, Date/Time, Currency, AutoNumber, Yes/No, OLE Object, Hyperlink, Lookup Wizard

Load data from files, databases and other applicationsIndex for rapid retrieval

Page 13: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Characteristics of DBMS (2)

Query language – e.g., SQLSecurity – controlled access to data

Multi-level groups

Controlled update using a transaction managerBackup and recovery

Page 14: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Characteristics of DBMS (3)

ApplicationsForms builderReportwriterInternet Application ServerCASE tools

Programmable API

Page 15: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Geographic Information

System

Database Management

System

• Data loading• Editing• Visualization• Mapping• Analysis

• Storage• Indexing• Security• Query

Data

System TaskRole of DBMS

Page 16: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Relational DBMS (1)

Data stored as tuples (tup-el), conceptualized as tablesTable – data about a class of objects

Two-dimensional list (array)Rows = objectsColumns = object states (properties, attributes)

Page 17: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Table

Row = objectVector feature

Column = attribute

Page 18: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Relational DBMS (2)

Most popular type of DBMSOver 95% of data in DBMS is in RDBMS

Commercial systemsIBM DB2InformixMicrosoft AccessMicrosoft SQL ServerOracleSybase

Page 19: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Relational Join

Fundamental query operationOccurs because

Data created/maintained by different users, but integration needed for queries

Table joins use common keys (column values)Table (attribute) join concept has been extended to geographic case

Page 20: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Relational Databases

Page 21: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

SQL

Structured (Standard) Query Language – (pronounced SEQUEL)Developed by IBM in 1970sNow de facto and de jure standard for accessing relational databasesThree types of usage

Stand alone queriesHigh level programmingEmbedded in other applications

Page 22: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Types of SQL Statements

Data Definition Language (DDL)Create, alter and delete dataCREATE TABLE, CREATE INDEX

Data Manipulation Language (DML)Retrieve and manipulate dataSELECT, UPDATE, DELETE, INSERT

Data Control Languages (DCL)Control security of dataGRANT, CREATE USER, DROP USER

Page 23: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Spatial Search:Gateway to Spatial Analysis

Overlay is a spatial retrieval operation that is equivalent to an attribute join. Buffering is a spatial retrieval around points, lines, or areas based on distance.

Page 24: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Overlay

Image courtesy of K. Foote/M. Lynch, UT-Austin

Page 25: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4
Page 26: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Overlay

01

Page 27: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Overlay like an attribute join

Page 28: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Types of overlay operations

UnionIntersectIdentityMaxMin

Etc.

Page 29: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Unioncomputes the geometric intersection of two polygon coverages. All polygons from both coverages will be split at their intersections and preserved in the output coverage.

Page 30: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Union

within 25 miles of a city OR within

25 miles of a major river.

Page 31: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Intersectcomputes the geometric intersection of two coverages. Only those features in the area common to both coverages will be preserved in the output coverage.

Page 32: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Intersect

within 25 miles of a city AND within

25 miles of a major river.

Page 33: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Identitycomputes the geometric intersection of two coverages. All features of the input coverage, as well as those features of the identity coverage that overlap the input coverage, are preserved in the output coverage.

Page 34: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Identity

within 25 miles of a city OR within 25 miles of a major river. within 25 miles of a city AND within 25 miles of a major river.

Portion of the major city buffer WITHIN the major river buffer

Page 35: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Identity

Intersect

Page 36: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Buffer

Page 37: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4
Page 38: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Complex Retrieval: Map AlgebraCombinations of spatial and attribute queries

can build some complex and powerful GIS operations, such as weighting.

Weighted overlay analysis really just complex

retrieval.

Page 39: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

Map

Alg

ebra

Map A

lgebra

Comparedwith

RAINFALL 1990 RAINFALL 1991 MAX RAINFALL 1990-’91

Page 40: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

RecodeOR

Page 41: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4

A-B = AGRICULTURAL

C-E = NON-AGRICULTURAL

Page 42: Lecture 10 Creating and Maintaining Geographic Databases Longley et al., Ch. 10, through section 10.4