You are on page 1of 49

GNR402: Introduction to Geographic Information

Systems: VECTOR ANALYSIS

Surya S. Durbha, PhD


Professor
CSRE, IITB

Vector Analysis
▪ Identifies spatial relationship within a layer or
between the spatial layers.
▪ Can be carried out using both spatial and
attribute data.
▪ Vector analysis functions are limited
compared to raster analysis functions.

Vector Systems
❑ Vector systems are database management-
oriented.
❑ The graphical display of the properties is directly
related to the database of attribute data.
❑ one of the most frequently used operations is
determination of distances between two points, or
move around the boundaries of a specific area and
the establishment of the perimeter
Nonspatial Query

❑ Use the attribute data base to select


features that meet certain criteria.
❑ Select the villages in a Block that have at
least one primary school and a bank.
❑ Nonspatial query runs on a single layer.

4
5

Operations Involving Two Layers

➢ Union
➢ Intersect
➢ Symmetrical Difference (XOR)
➢ Identity
➢ Clip
➢ Update
➢ Erase
➢ Split

6

Operations Involving Two Layers
(Contd..)

❑ Operations are formed between two


different layers to look at the relationships
between them.

❑ As long as these layers share a common


coordinate system, they can be related
together.

❑ They can be overlaid and combined to form


a new layer and new table gets generated
showing how these layers are related to
each other.


7
http://cret.cnu.edu.cn/syjx/Content/giswb/vol2/cp4/4-7.gif 8
Point in Polygon Overlay

❑ Input layer is a point layer.


❑ Polygon layer is the overlay layer.
❑ Output layer is a point layer with same input point
features of the input layer but each point is assigned
with attributes of the polygon within which it falls.

*1 *1B

*2
1 +2 A B = *2A

Point in Polygon Overlay


❑ Which Mumbai house sales fall within which census
block groups
❑ We want to know about the neighborhood
surrounding lower-price homes…

10
Line in Polygon Overlay

❑ Input is a line layer.


❑ Overlay layer is a polygon layer.
❑ Output layer contains the same line features as
the input layer but each line feature is dissected
by the polygon boundaries of the overlay layer.
❑ Hence output layer contains more line segments
than the input layer and each line has attributes
of the polygon within which it falls.

11

1
+ A B = 1A
1B

12
logging roads (lines) and vegetation types (polygons) are
overlayed to create a new line layer.
Line in Polygon Overlay
❑ Which roads are in the flood plain?
❑ Should you cut up the road segments or list line segments
with part (>50%) inside?

http://web.mit.edu/11.520/www/lectures/lecture7.html
14

15
Union

❑ Operates on two layers.


❑ A new polygon layer is created by overlaying features
from two input polygon layers.
❑ Union makes a spatial join.
❑ It is equivalent to ‘or’ Boolean operator.
❑ The output layer contains
➢ the contained polygons.
➢ attributes of both the layers.
➢ Area extent combines the area extents of both input
layers
16

Union Illustration
1 1 2

1 U2 1 2 =
2 3 4

SID Concatenated UID

1 Soil 1 & Slope 1


SID UID SID UID
1 Soil1 1 Slope 2 Soil 1 & Slope 2
1
2 Soil2 2 Slope
3 Soil 2 & Slope 1
2

4 Soil 2 & Slope 2


http://resources.esri.com/help/9.3/ArcGISEngine/java/Gp_ToolRef/
geoprocessing/gpc_ovr_flood2.gif
Intersect

❑ It is an overlay operation created by overlaying 2


layers.
❑ A new output layer is created.
❑ Layer 1 can be point or line or polygon layer.
❑ Layer 2 is a polygon layer.

Layer 1 Layer 2 Output Layer

Point Polygon Point

Line Polygon Line

Polygon Polygon Polygon

19


Intersect Contd.

2
1

2B
1 2 B 1B
1A 2A
+ A =
4 3B 3A 4A
3

20

▪It is equivalent to ‘and’ Boolean operator.
▪The output layer contains only those portions
of features that are in the area occupied by
both the input layers.

22

Symmetrical Difference

❑ Operates on two layers.


❑ A new polygon layer is created by overlaying
features from two input polygon layers.
❑ It preserves features that fall within the area extent
that is common to only one of the inputs.
❑ This operator is opposite to intersect in terms of the
output’s area extent. The output is (A U B) - (A ∩ B).

1
1
1
2
+22 A B
=

23
Features or portions of features in the input and update
features which do not overlap will be written to the
Output Feature Class

http://resources.esri.com/help/9.3/ArcGISEngine/java/Gp_ToolRef/
analysis_tools/symdiff_esri.gif
Identity
❑ It is an overlay operation created by overlaying 2
layers.
❑ A new output layer is created.
❑ Layer 1 can be point or line or polygon layer.
❑ Layer 2 is a polygon layer.
❑ [(Input layer ∩ Identity layer) U Input Layer].

Layer 1 Layer 2 Output Layer

Point Polygon Point

Line Polygon Line

Polygon Polygon Polygon

25

Identity Contd.

1
+ =

The output layer contains


– all the features of layer 1.
– Those portions of layer 2 features that
overlap layer1 .
26

The Input Features or portions thereof that overlap Identity


Features will get the attributes of those Identity Features

http://resources.esri.com/help/9.3/ArcGISEngine/java/Gp_ToolRef/analysis_tools/identity_esri.gif
Overlay Operations And Topology

▪ All the three operations union, intersect


and identity create new layers and new
topology gets built.
▪ Attribute tables are updated. The
attribute table contains items from both
the input layers.
▪ Therefore all items from the input layers’
attribute tables are retained except for
the geometric measures (area and
perimeter in the case of polygon layers).
28
Overlay Operations And Topology

overlay a soils map


on a vegetation map
and create a new
set of polygons with
a new set of
attributes

29
Overlay Operations And Topology

after intersections have been found, six new arcs are


formed, three from arc 1 and three from arc 2:

1. (0,1) (0,3) (2,3) (2,2)


2. (2,2) (2,1) (1,1)
3. (1,1) (0,1)
4. (1,0) (3,0) (3,2) (2,2)
5. (2,2) (1,2) (1,1)
6. (1,1) (1,0)

30


















Overlay Operations And Topology

Polygon overlay is numerically intensive and time consuming,


therefore it is the most complex operation of most vector-based
GIS programs

31
Clip

❑ It operates on 2 layers input.


❑ Extracts a part of an input layer that
intersects with the clip layer.
❑ The features of the input layer are retained
in the output layer.

32
Clip Contd.
▪The attribute table of the output layer
contains the same attributes as of the input
layer.
▪Input layer can be point, line or polygon layer.
▪Clip layer must be a polygon layer.
▪The output layer is of the same feature type
as the input layer.

Input layer Clip layer 33 Output layer


Erase

❑ It operates on 2 layers.
❑ Erase is similar to clip, except that the input layer
features that overlap with erase layer polygons are
erased in the output layer.
❑ Input layer can be point, line or polygon layer.
❑ Erase layer must be a polygon layer.
❑ The output layer is of the same feature type as the
input layer.
❑ When input and erase layers are polygon layers,
interchange of layers give different results.
34

Erase Illustration

Input layer Erase layer Output layer

35
Update

❑ It operates on 2 polygon layers.


❑ The features of the input layer are updated with the
features of update layer.
❑ When input and update layers are polygon layers,
interchange of layers give different results.

36

Update Illustration

1 2
0 1 2 7 8 7
8
4 9 9
3
3 4

Input layer Update layer Output layer

37
Split
❑ Split is operated on two layers. Split performs a
series of clip operations on the input layer and
creates multiple output layers.
❑ Each output layer contains only those portions of
input layer features which are overlapped by the
specified polygon of the split layer.
❑ Input layer can be points, line or polygons.
❑ Split layer must be a polygon layer.
❑ The split item is used to determine which polygon of
the split layer will be used to split the input layer.

38

Split Illustration

Before Split

Split layer

39
Single Layer Operations

➢Eliminate
➢Dissolve
➢Buffer

40


Eliminate

❑ It operates on a single layer.


❑ Merges selected polygons with neighboring polygons
that have the largest shared border between them, or
that have the largest area.
❑ Often used to remove sliver polygons created during
an overlay operation of 2 layers.
❑ During overlay operation of 2 layers, the layers have
a nearly perfect boundary match, but not exact
match which creates thousands of thin sliver
polygons.

41

Eliminate Illustration

Before Elimination After Elimination

▪Eliminate command removes these very skinny


polygons (Slivers).
▪The sliver is reassigned to the polygon with which it
shares the longest boundary.

42

Dissolve

Operation Output

❑ It operates on a single layer.


❑ Dissolve merges adjacent polygons or lines which
have the same User ID.
❑ In polygon layer, it removes the segment between
adjacent polygons containing same User IDs.
43

▪In the case of segment layer, nodes between


segments are dissolved.
▪Dissolve helps to create a simple layer from a
complex layer.
▪Dissolve can be used to undo an Union operation.
▪Dissolve command can be used to generalize the
unioned layer.

44

Buffer

❑ Buffer creates buffer polygons around specified


features in a layer.
❑ Buffer creates a new polygon layer.
❑ Input layer can be point or segment or polygon layer.
❑ In a segment or polygon layer, one can create inside
or outside or both side buffers.
❑ Using a single buffer distance, it creates buffer zones
of the same width around the selected features.
❑ Incremental buffers are created for a set of distances
around a selected feature.

45

Illustration

Point Buffer
Line Buffer

Internal External Buffer


Buffer
46
‘Much of the life of the mind consists in applying concepts to things’
(Fodor 1998:24)

You might also like