Lesson 4 Beyond Mapping: GIS Analysis Methods

surfscreechingSoftware and s/w Development

Dec 11, 2013 (3 years and 6 months ago)

69 views

IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
1
Lesson 4
Beyond Mapping:
GIS Analysis Methods
Practice Assoc. Prof. KAM Tin
Seong
tskam@smu.edu.sg
Room: SIS 4045
Tel: 6828
-
0269
What will you learn from this course?

answer location related questions using GIS analysis
functions such as selection, buffering, topology overlay,
and spatial overlay

transform GIS data using
geoprocessing
tools such as
clip, dissolve, and merge

perform
specialised
spatial analysis using mathematical
algorithms such as
centroid
, convex hull,
voronoi
, and
districting.
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
2
Core Competencies

Understand
the basic concepts and principles of
geoprocessing
(
ie
. CLIP, DISSOLVE, APPEND, SPLIT,
and
ERASE)
and geospatial analysis (i.e.
BUFFER
and
OVERLAY)
techniques

Capable to use these geospatial analysis techniques to
solve real world problems such as trade area analysis,
geomarketing
, distribution channel allocations
3
Advanced Competencies

Understand the operations of spatial SQL

Capable
to
perform geospatial related analysis and
modelling
using spatial SQL
4
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
3
Geospatial Analysis: torture numbers!
5
Interactive Map Analytics

Identifying

Measuring

Selection

Query
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
4
Identifying

Popup attributes for a specific feature
Measuring

Tracker tool provides interactive distance and area
measurements
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
5
Selection

To select individual or group of geographical entities

Beginning step of many GIS modeling

Different approaches can be used:

Selection tools

Transform toolbar

Query toolbar

Manifold SQL
Selection Tools

Interactive
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
6
Selection in Table

Selected records will be highlighted

Use the Filter tool to show only selected records
Selection using Query Toolbar

Provides fast selection in tables, drawings, and drawing
layers in maps using “one line” simple queries using
data field associated with objects
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
7
Geoprocessing
functions

A collection of GIS functions for transforming the
geometrics of GIS data

CLIP

DISSOLVE

APPEND

SPLIT

APPEND

ERASE

etc
Clip

Clip creates a new layer that includes only those
features of the input layer that fall within the area
extent of the clip layer.
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
8
Erase

Erase removes from the input layers those features that
fall within the area extent of the erase layer.
Erase

Erase removes from the input layers those features that
fall within the area extent of the erase layer.
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
9
Dissolve

Dissolve aggregates features that have the same
attribute value or values.
Append

Append creates a new layer by piecing together two or
more layers.

The output can then be used as a single layer for data
query or display.
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
10
Split

Split divides the input layer into two or more layers.

A split layer, which shows area subunits, is used as the
template for dividing the input layer.
Buffering

Based on the concept of proximity, buffering creates
two areas: one area that is within a specified distance
of selected features and the other area that is beyond.

The area that is within the specified distance is called
buffer zone
.

Features for buffering may be points, lines, or areas.
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
11
Buffering a point layer

Outlets are point objects. The 1km buffer around
outlets are area objects
Buffering a line layer

Highway is a line object and the output buffer is a
polygon object
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
12
Buffering a polygon layer

City is a polygon object and the output buffer is also a
polygon object
Buffer inside the polygon feature

If you are buffering a polygon feature, you can choose
to create the buffers that are inside the polygon(s)
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
13
Buffers without boundaries dissolved

These buffers were created by keeping the boundaries
between buffers
Buffers with boundaries dissolved

These buffers were created using the yes option to
dissolve the boundaries between the buffers
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
14
Buffers with different distances

Sometimes, width of the buffer can be determined by
an attribute of the object

For example, buffering residential buildings away from
a road network:

three types of road (1, 2, 3 or highway, major road,
local street) with the setbacks being 100m from a
highway, 50 m from a major road, and only 20 m
from a local street
Using nested buffers

A nested buffers of 500m around a MRT station
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
15
Map Analysis Technique: Manual Overlaying
Topological Overlay

A topology overlay operation combines the geometries
and attributes of two feature drawings to create the
output.

All overlays require two drawings: a
data
drawing that
may contain areas, lines and points and an
overlay
drawing that must contain areas.

The areas in the overlay drawing guide the operation of the
chosen overlay function to create a new, result drawing.

Feature layers to be overlaid must be spatially
registered and based on the same coordinate system.
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
16
Point
-
in
-
polygon Overlay

Overlay point objects on areas,
compute "is contained in"
relationship

Result is a new attribute for each
point
Point
-
in
-
polygon
Line
-
in
-
polygon Overlay

Overlay line objects on area objects,
compute "is contained in"
relationship

Lines are broken at each area object
boundary

Number of output lines is greater
than number of input lines

Containing area is new attribute of
each output line
Line
-
in
-
polygon
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
17
Polygon
-
on
-
polygon Overlay

Overlay two layers of area
objects

Boundaries are broken at each
intersection

Number of output areas likely
greater than the total number
of input areas

After overlay we can recreate
either of the input layers by
dissolving and merging based
on the attributes contributed
by the input layer
Polygon
-
on
-
polygon
Union

Union preserves all features
from the inputs.

The area extent of the
output combines the area
extents of both input layers.

Union requires that both
input layers be polygon
layers

Polygons only

Combine attributes

Full extent
Union
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
18
Intersect

Intersect preserves only those
features that fall within the
area extent common to the
inputs.

The input layers may contain
different features types.

Points, lines or
polygons

Combine attributes

Limited extent
Intersect
Identity

Identity preserves only
features that fall within the
area extent of the layer
defined as the input layer.

The other layer is called
identity layer.

The input layer may contain
points, lines, or polygon, and
the identity layer is a polygon
layer.

Input all geometries

Identity polygons

Combine attributes

Limited extent
Identity
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
19
Slivers
38
Error Propagation in Overlay

Error propagation refers to the generation of errors
that are due to the inaccuracies of the input layers.

Sliver are examples of errors in the inputs that can
propagate to the analysis output.

Error propagation in overlay usually involves two types
of error: positional and identification.

Positional errors can be caused by the inaccuracies of
boundaries that are due to digitizing or interpretation
errors.

Identification errors can be caused by the inaccuracies
of attribute data such as inaccurate coding of polygon
values.
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
20
Spatial Overlay

Spatial overlays are a set of methods for transferring
data between objects in layers based on their spatial
relationships to each other
Centroid

Centroids
are points placed at the "center" of an object.

They simplify and abstract geographic data in the form
of areas or lines into the much simpler form of points.

At times we will want the data in a simpler form for
export to other programs or to use analytic methods
that work with points but which do not work with areas
or lines.
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
21
Convex Hull

Given a set of points, convex hull creates
mathematically an area about the points using the
positions of the extremal points as the bounding
coordinates for the area.

It is very useful for delineating trade area using
customers locations as the input point.
42
Voronoi

Construct natural catchment areas from a set of point
objects such as retail outlets by allocating areas to the
nearest point object
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
22
Distance measurement

Distance measurement
refers to measuring
straight
-
line distance
(euclidean) distance
between features.

Measurements can be
made between points in a
layer to points in another
layer, or between each
point in a layer to its
nearest point or line in
another layer.
Districting

Assigns areas in the layer to different districts so that
each district is reasonably compact and contiguous.
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
23
What is Structured Query Language (SQL)

SQL is a language used in querying, updating, and
managing relational databases.

SQL can be used to retrieve, sort, and filter specific data
to be extracted from databases.
45
SQL in Manifold System

Data Definition Language (DDL)

Creation and modification of relational schema

Schema objects include relations, indexes, etc.

Data Manipulation Language (DML)

Insert, delete, update rows in tables

Query data in tables
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
24
Selection by SQL

SQL is an industry standard database query language
use to fetch records from tables and to present those
records with the fields desired

May be used to alter the structure of the database and
the data it contains
Case Sensitivity

SQL itself is not case
-
sensitive, but string literals and
string operations are. Hence, comparing a pair of string
values which only differ by case for equality will return
false
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
25
Dot Nomenclature

Dot nomenclature is simply the table name followed by
a period “.” and then the field name:

All_customers.Outlet
SQL Reserved Words

Words reserved by Manifold System for use in SQL
statements, i.e. AREA, DISTANCE, COUNT

SQL refuse to work if a name of some table or column it
refers to is similar to a reserved word

Use square brackets to enclose the names of tables or
columns so that the query continues to work
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
26
Names in Brackets

Use [] square brackets to allow field names and table
names to contain the space character and other non
-
alphanumeric characters

Select * FROM [All_customers
drawing] WHERE [All_customers
drawing].outlet = “B”;
Queries Using Multiple Tables

Queries can incorporate fields from two different tables

SELECT [Customers].[Company Name],
[Orders].[Employee ID] FROM [Customers]
INNER JOIN [Orders] ON
[Customers].[Customer ID] =
[Orders].[Customer ID]
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
27
SQL Syntax

Select Queries

SELECT <fields> FROM <table> WHERE
<condition>

SELECT <fields> FROM <table> WHERE
<condition> GROUP BY <fields> HAVING
<criteria> ORDER BY <expression>;
Action Queries

Queries that make changes to many records at once

UPDATE <table> SET <field> =
<expression> WHERE <condition>

DELETE FROM <table> WHERE
<condition>;

ALTER TABLE <name> ADD <field>
<type>,
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
28
Parameter Queries

Queries using parameters can ask for user specified
parameters when the query is run

Parameter variables are declared in the first line of the
query using a declaration in the form

PARAMETERS name type;
Calculations in Queries

Queries can automatically
perform calculations to
create new columns from
existing fields

SELECT <expression> [AS
<name>] FROM <table>;
SELECT
x.PID,
AVG
(
y.Sales
)
MAvg_Sales
FROM
BulbSales
x,
BulbSales
y
WHERE
x.PID>=6
AND
x.PID
BETWEEN
y.PID
AND
y.PID+5
GROUP BY
x.PID
ORDER BY
x.PID
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
29
Manifold SQL extensions for geospatial data

To provide additional functions within SQL for selecting
objects in drawings based on their geometric
properties.

SQL functions to manipulate geometry data saved
within tables.

Three extensions:

Spatial extensions

Raster extensions

Geocoding
extensions
Finding the features nearby
(
proximity
)
Where are my
closest customers
located?
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
30
Spatial SQL
-
Proximity

Select all customers located within 500m of outlets

SELECT All_customers. * FROM
All_customers, Outlets WHERE
DISTANCE (All_customers.ID,
Outlets.ID) < 0.0045
Finding the features within (
containment
)
Who are my
customers
currently work or
stay in East Los
Angeles CA?
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
31
Spatial SQL
-
Containment

Select customers located in East Los Angeles CA

SELECT All_customers.* FROM
All_customers, [Place2000 Drawing]
WHERE ([Place2000 Drawing].NAME =
"EAST LOS ANGELES CA") AND CONTAINS
([Place2000 Drawing].ID,
All_customers.ID)
Finding Features that intersect other features
(
intersect
)
Who are my
customers
currently work or
stay along E 3
RD
ST?
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
32
Spatial SQL
-
Intersects

SELECT All_customers.* FROM
All_customers, [Major_rd Drawing]
WHERE ([Major_rd Drawing].HWYNAME = "E
3RD ST") AND INTERSECTS ([Major_rd
Drawing].ID, All_customers.ID)
Finding the features nearby
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
33
Spatial SQL
-
Adjacent

SELECT [Blk_grps Drawing].* FROM
[Blk_grps Drawing], [Place2000
Drawing] WHERE ([Place2000
Drawing].NAME = "EAST LOS ANGELES CA")
AND ADJACENT ([Place2000 Drawing].ID,
[Blk_grps Drawing].ID)
Spatial SQL
-
Touches

SELECT [Blk_grps Drawing].* FROM
[Blk_grps Drawing], [Place2000
Drawing] WHERE ([Place2000
Drawing].NAME = "EAST LOS ANGELES CA")
AND TOUCHES ([Place2000 Drawing].ID,
[Blk_grps Drawing].ID)
IS415 Geospatial Analytics for Business
Intelligence
Lesson 4: Beyond Mapping: GIS analysis Methods
34
Reference

Michael J. de Smith et al. (2008) Geospatial Analysis,
Matador, United Kingdom.
(
http://www.spatialanalysisonline.com/
)

Manifold System 8.0 User Manual:
(
http://www.manifold.net/doc/manifold.htm
)

Tables
-
>Transform Toolbar
-
Tables

Drawing
-
> Editing Drawings
-
> Dissolve

Drawing
-
> Editing Drawings
-
> Spatial Overlay

Drawing
-
> Editing Drawings
-
> Topology Overlay

Drawing
-
> Transform Toolbar

Drawings

Queries

Manifold SQL Reference Guide