Вы находитесь на странице: 1из 45

SPATIAL DATA ANALYSIS

By
Dr. Vandita Srivastava
vandita@iirs.gov.in
Geoinformatics Department, RSGG
Indian Institute of Remote Sensing,
Dehradun, India

Satellite Based Training Programme on RS-GIS-GPS


Module 3-GIS, 8th October 2015

Coverage

Introduction to Spatial Data Analysis

Spatial Analysis Functions & Tools

08/10/2015

Why Spatial Analysis


What is special about spatial analysis
Spatial and non-spatial queries
Classification of Spatial Functions
General Operations
Retrieval & Selection
Measurement
(Re) Classification
Overlay Operations (Vector & Raster)
Neighborhood & Connectivity
Dr. Vandita Srivastava, Geoinformatics Department,
RSGG/IIRS, ISRO/DOS/GOI

Measurement

Measurement on Vector Data

Point, Line Polygon

Measurement on Raster Data

Measurement - Vector

Distance between two points


Pythagorean distance
function:
dist ( p, q) ( x p xq ) 2 ( y p yq ) 2

If one or both features are


not a point minimal

distance

Bounding box computation


Support function
Dr. Vandita Srivastava, Geoinformatics
Department, RSGG/IIRS, ISRO/DOS/GOI

Measurement - Raster

Raster measurements
include: location, distance
and area size
Location of an individual cell
derived from anchor point
and resolution
Area size number of cells
* cell size
Distance standard
distance function applied to
the locations of their midpoints

Cell size: 30 m X 30 m
900 * 5 = 4500 m2

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

(re)Classification
M:N
User controlled vs. Automatic
Equal Interval vs. Equal Frequency

Classification
Classification involves the selection and presentation of a selected
layer of data based on the classes or values of a specific attribute.

Remove detail from an input dataset to reveal important spatial


patterns or Reduce the number of classes and eliminate details.
If the input dataset itself is the result of a classification we call it a
reclassification
Reclassify data in different systems for different purposes.
Dr. Vandita Srivastava, Geoinformatics
Department, RSGG/IIRS, ISRO/DOS/GOI

Classification Types

Classification - Reclassification
Post processing
User controlled classification

Classification table

Automatic classification

Equal interval technique


Equal frequency technique
Dr. Vandita Srivastava, Geoinformatics
Department, RSGG/IIRS, ISRO/DOS/GOI

(Re) Classifications
a) one to one (1:1)
b)

many to one (M:1)

c)

one to many (1:M)

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

Example: 1:M
Attribute map: Land Use

Attribute table:
City blocks

Map: City blocks

Cityblocks Landuse
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015

Institutional
Commercial
Commercial
Residential
Residential
Residential
Industrial
Residential
Industrial
Industrial
Residential
Industrial
Residential
Residential
Residential

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

10

Example: M:1
Geological map reclassified in
7 classes based on geological
age

Geological map reclassified in


3 classes based on type of
lithology

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

11

Example: 1:1
High
Above Average
Average
Below average
Low

Classification

Reclassification

0-50,000

0-25,000

50,000-100,000

25,000-50,000

100,000-125,000

50,000-75,000

125,000-150,000

75,000-100,000

More than 150,000

More than 100,000


Dr. Vandita Srivastava, Geoinformatics
Department, RSGG/IIRS, ISRO/DOS/GOI

12

Examples using the Map calculator


Reclassification using iff:
Output_Map = Iff(Condition, Then Expression, Else Expression)

Reclassification using a table


outmap = inmap . Table
Or
outmap = inmap . Table . column
Reclassification using a domain
outmap = clfy ( inmap , domain)
08/10/2015

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

13

Reclassification
(re-assignment based on attribute name)

newmap:=iff(soils=redzina,3,0)
Soils

Newmap

Mollisol

Alfisol
Redzina
COLUMN (X-AXIS)

08/10/2015

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

3
COLUMN (X-AXIS)

14

Data reclassification from tables


(re-assigment based on attribute column)

Soils

Infilt

30

25

COLUMN(X-AXIS)

COLUMN(X-AXIS)

Soilstab.tbl
Recnr
1
2
3
08/10/2015

Type
Alfisol
Mollisol
Redzina

infilcol
30
30
25

Infilt = Soils.soilstab.infilcol

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

15

Examples using the Map calculator


Grass = Landuse = grassland
Landwat = iff (landuse = lake) or (landuse = riverbed),
water , land)
Demcl = iff(dem < 3000, low, iff(dem < 4000, moderate, high))

08/10/2015

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

16

User controlled classification

User indicates the classification attribute(s)


User specifies the classification method:
the number of output classes
the correspondence between the original attribute
values and the new attribute values
called classification table
CODE
10
20
30
40
50
60
70
80

08/10/2015

OLD TYPE
Planned Residential
Industry
Commercial
Institutional
Transport
Recreational
Non Built-up
Unplanned Residential

NEW TYPE
Residential
Commercial
Commercial
Public
Public
Public
Non Built-up
Residential

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

17

User controlled classification


Classification on a selection of features. Not selected is No Data.

08/10/2015

Dr. Vandita Srivastava,


Geoinformatics Department,
RSGG/IIRS, ISRO/DOS/GOI

18

Automatic classification

Equal interval:
class interval = (Vmax - Vmin ) / n.

Equal frequency (quantile):

maintain equal or nearly equal no. of features in


each category in the output.

08/10/2015

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

19

(Re)Classification - automatic

Equal interval
(5 classes)

EI: ~number of data values/ n


n: number of classes

Equal frequency
(5 classes)

EF:~N/n
N: number of
pixels/ number
of classes

Dr. Vandita Srivastava,


Geoinformatics Department,
RSGG/IIRS, ISRO/DOS/GOI
08/10/2015

20

Overlay
Vector (point, lines, polygons)

Clip, Erase, Split


Intersection, Union, Identity

Raster

Arithmetic, Relational & Logical operators


Local, focal, zonal and global functions
Using other methods(iff, table, column..)

Overlay

The principle of spatial overlay is to compare the


characteristics of the same location in both data layers,
and to produce a new output value for each location.

08/10/2015

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

22

General Principles of vector overlay


6

Spatial join = join attribute tables (include fields from both tables) based on the spatial relationship (not on attribute)
Dr. Vandita Srivastava, Geoinformatics
08/10/2015
Department, RSGG/IIRS, ISRO/DOS/GOI
23

Vector Overlay Operations

08/10/2015

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

24

Raster Functions

Using local, focal, zonal and global


functions

08/10/2015

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

25

Raster Overlay using arithmetic operators


Map A

Map C

15 15 12 12

MapC= MapA + 10 15 15 15 12

16 12 12 12

16 16 16 16

Map B
4

08/10/2015

MapC1= MapA + MapB

Map C1
9

10 10

10

10

14 14

MapC2= ((MapA - MapB)/(MapA + MapB)) *100

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

Map -C211 11 60 60
11 11 11 60
- 60
71 33 33
71 71 14 14

26

Relational overlays
Map A
5

Map B

08/10/2015

Output = MAP A > MAP B

Output
0

0 = FALSE
1 = TRUE
Dr. Vandita Srivastava, Geoinformatics
Department, RSGG/IIRS, ISRO/DOS/GOI

27

Raster Overlay using Logical Operators


Overlaying using AND statement
Landuse = forest

08/10/2015

AND

Slope = steep

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

28

Combining Relational and logical operators


F

F
F

F
F

F = forest
7 = 700 m
6 = 600 m
4 = 400 m

Map D
0

MapD=(MapA= Forest) and (MapB <500)


MapD1=(MapA= Forest) or (MapB <500)

Map D2

Map D1

MapD2=(MapA= Forest) xor (MapB <500)

MapD3=(MapA= Forest) and not (MapB <500)

0 1

08/10/2015

0 = false
1 = true

Map D3

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

29

Conditional functions

Output_Map = Iff(Condition, Then Expression, Else Expression)


Map C
F
F

MapC= iff(MapA= Forest,1,?)

F
F

F
F

MapC1=iff((MapA= Forest)
7

08/10/2015

and (MapB= 700),1,0)


F = forest
7 = 700 m
6 = 600 m
4 = 400 m

0 = false
1 = true
? = undefined

Map C1
1

0 0

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

30

Neighbourhood functions

Many Decisions depend not only on what is at the


location, but also what is near the location!
Reveal characteristics of the vicinity (neighborhood) of
a location

08/10/2015

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

31

Neighborhood functions
1. Target: medical clinics
2. Neighborhood

2 km
distance

3. Characteristics

2 km travel
distance

In a straight
line

How many people live in the area


What is their average household income
Are there any high-risk industries located in the neighborhood
08/10/2015

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

32

Buffer zone generation

Fixed & Variable width

Buffer of 500 meters around


the Main Roads

08/10/2015

Buffer of 1 km around the


Highways

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

33

Multiple Ring Buffer

Between
0- 100 m
Between
100-200 m
Between
200-300 m

08/10/2015

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

34

Networks

Network is a set of connecting lines


Network can represent rivers, roads, pipelines,
telecommunication lines etc.
Network analysis can be done in raster or in vector.

08/10/2015

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

35

Network analysis

Types of networks
Directed network and undirected network
Planar network and non-planar network
Two types of operations
Optimal path finding
Ordered
Unordered
Network partitioning
Network allocation
Trace analysis
08/10/2015

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

36

Planar Non-planar
Multi-level
crossings

Embedded in a
2-dimensional
plane

Underpasses
Overpasses

Non-Planar

08/10/2015

Planar

Dr. Vandita Srivastava,


Geoinformatics Department,
RSGG/IIRS, ISRO/DOS/GOI

37

Cost factor
37
0.38 minutes
0.31
min
36

Arc 89

Arc 119

Node 71
0.50 minutes
08/10/2015

Dr. Vandita Srivastava,


Geoinformatics Department,
RSGG/IIRS, ISRO/DOS/GOI

38

Ordered and unordered pathfinding

08/10/2015

3
2

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

39

Network partitioning network allocation

08/10/2015

Dr. Vandita Srivastava,


Geoinformatics Department,
RSGG/IIRS, ISRO/DOS/GOI

40

Network partitioning - trace

Tracing upstream

08/10/2015

Tracing downstream

Tracing without condition


on direction

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

41

Steps for performing spatial analysis


Step
Step
Step
Step
Step
Step
Step
Step

1.
2.
3.
4.
5.
6.
7.
8.

Establish the objectives & criteria for the analysis


Selection of right parameters necessary for analysis
Data collection and input to GIS System.
Prepare data for spatial operations and tabular analysis
Perform spatial and tabular operations
Carryout final analysis by combining various layers
Evaluate & interpret the results
Refine the analysis if necessary
08/10/2015

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

42

Types of Spatial Analyses

Single layer operations


Multi layer operations (Topological overlay)
Geometric modeling

Calculating the distance between geographic features


Calculating area, length and perimeter
Geometric buffers

Point Pattern Analysis


Network analysis
Surface analysis
Fuzzy Spatial Analysis
Geostatistical Analysis
Raster/Grid analysis

08/10/2015

Dr. Vandita Srivastava, Geoinformatics


Department, RSGG/IIRS, ISRO/DOS/GOI

43

Thankyou for your attention!

Interactive Session

Вам также может понравиться