GEOL 403503 Principles of GIS - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

GEOL 403503 Principles of GIS

Description:

States containing a portion of Mississippi River or its tributaries are selected ... Imagine you have a map of customers and want to find those who spent more than ... – PowerPoint PPT presentation

Number of Views:20
Avg rating:3.0/5.0
Slides: 20
Provided by: Wild162
Category:

less

Transcript and Presenter's Notes

Title: GEOL 403503 Principles of GIS


1
GEOL 403/503 Principles of GIS
  • Ted Dunsford
  • Bhushan Gokhale
  • Fall 2007

2
Lecture 9Querying the Database
3
Query
  • A request that selects features or records from a
    database.
  • A query is often written as a statement or
    logical expression.

4
Spatial Query
  • Spatial query is a search of the data to satisfy
    a given condition
  • There are two types of spatial query
  • Query of attribute data
  • A spatial distribution or an area will be
    searched with respect to a given attribute of
    interest.
  • Query of geometric data
  • With a given geometric condition for example
    location, shape or intersection, all data that
    satisfy the condition will be searched.
  • In the case of a vector data form, to search an
    area which includes a given point, and to find
    all line segments which intersect a given line
    would be a typical query of geometric data.

5
Spatial Query (Cont.)
  • A spatial query enables you to construct a map
    question, which allows you to find occurrences in
    your chosen layer
  • Based on attributes of that layer
  • Also based on their spatial relationship with
    objects within a different layer.

6
Selection
  • Selection operations
  • Involve identifying features based on several
    conditions or criteria
  • The attributes or geometry of features are
    checked against the conditions or criteria
  • You can write the selected features into new
    output data layer
  • You can use the selection for other analysis
  • Examples

7
  • Select
  • State Arkansas
  • States entirely north of Arkansas
  • States_areagt84,000 sq. mi.
  • States both entirely north of Arkansas and larger
    than 84,000 sq. mi.

Bolstad, 2005
8
Selection (Query) Procedures
  • On screen query
  • By human operation
  • Conditional selection
  • Set Algebra
  • Less than (lt)
  • Greater than (gt)
  • Equal to ()
  • Not equal to (ltgt)
  • Boolean Algebra
  • Conditions OR, AND, and NOT

Bolstad, 2005
9
Examples of Expression in Boolean Algebra
Bolstad, 2005
10
Select by Attribute
  • Open attribute table of the querying layer
  • Use Option Selection gt Select by attributes
  • Use Boolean expressions
  • Interactive selection methods
  • Create new selection
  • Add to current selection
  • Remove from current selection
  • Can select from current selection
  • Available under Selection menu

11
Select by Location
  • Available under Selection menu
  • Can select a layer with geometric relation to
    another layer
  • Check the bottom image for all the geometric
    options

12
Select by Location (Cont.)
  • Selecting options
  • That Meet
  • That Overlap
  • That Contains
  • That are Contained by
  • That are Entirely Contained By
  • That are Spatially Equal
  • That Touch

13
Examples of Selection by Location
States adjacent to Missouri
Bolstad, 2005
14
Examples of Selection by Location - cont.
States containing a portion of Mississippi River
or its tributaries are selected
Bolstad, 2005
15
Selection by Graphics
  • Select features using rectangles, circles, etc.
  • Select features partially or completely within
    the box or graphics
  • Select features completely within the box or
    graphics
  • Select features that the box or graphics are
    completely within
  • Can use selection tolerance
  • Can use some threshold to select until a limit to
    warn you

16
(No Transcript)
17
Spatial Query or Selection
  • Conducted with
  • Query expression
  • A type of expression that evaluates to a
    Boolean (true or false) value, which is typically
    used to select those rows in a table in which the
    expression evaluates to true.
  • Select fields From table Where expression
  • "HUC_NO" 16020309 "HUC_NO" gt 16020309 AND
    "HUC_NO" lt 17010308

18
Structured Query Language
  • Structured Query Language (SQL) is a powerful
    language we use to set one or more criteria that
    can consist of attributes, operators, and
    calculations.
  • For example
  • Imagine you have a map of customers and want to
    find those who spent more than 50,000 with you
    last year and whose business type is
    "Restaurant".
  • You would select the customers with this
    expression Sales gt 50000 AND Business_type
    'Restaurant'.

19
DEMO
Write a Comment
User Comments (0)
About PowerShow.com