GIS Functions and Operators

GIS Functions and Operators

The functions associated with raster cartographic
modeling can be divided into five types:
Those that work on single cell locations (local functions
or operators)
 Those that work on cell locations within a neighborhood
(focal functions)
 Those that work on cell locations within zones (zonal
f ti )
functions)
 Those that work on all cells within the raster (global
functions)
 Those that perform a specific application (for example,
hydrologic analysis functions)

Map Algebra




Map algebra is a language specifically designed for
geographic cell
cell--based systems and provides the basis
for cartographic modeling.
Based on concepts originally presented by Joe Berry
and C.
C Dana Tomlin.
Tomlin
Map algebra provides a language to conveying logic
constructs while maintaining the power of the
mathematical
th
ti l base
b
underlying
d l i the
th cellcell
ll-based
b d
structure.
Mapp Algebra
g
operators
p
and functions apply
pp y
mathematical computations on a raster “map” vs.
matrix algebra.
Local Functions

Local functions apply their calculations to a single cell location before
calculating the next location, until all cells have been processed. To
pperform the calculation,, the local function onlyy needs to know the values
at the location for a single raster or for multiple rasters, as well as, in
some cases, a comparison value.
Operations or functions can be
applied on single or multiple grids:
output
t t = (inlayer1
(i l
1 + inlayer2)
i l
2) / 2
output = sin(inlayer1)
output = min(inlayer1, inlayer2, inlayer3)
Operators and Functions

There are three types of operations:



Arithmetic operators: *, /, -, +
Boolean operators:
p
And, Or, Xor, Not
Relational operators: ==, >, <, <>, >=, <=
Output  ([ Inlayer1]  [ Inlayer 2]) / 2
Operators and Functions

Mathematical functions are applied to the values in a
single
i l input
i
raster. There
Th are four
f
groups off
mathematical functions





Logarithmic
Arithmetic
Trigonometric
Powers
Other local functions compute
p statistics,, combine,, or
other operations from a list of multiple inlayers.
Output = min(Inlayer1,
min(
min(Inl
Inl
Inlayer1,
1 Inlayer2,
Inl 2 Inlayer3)
Inlayer3
Inl 3)
3)
Focal Functions
Focal (or neighborhood) functions compute an output grid in which the
output value at each cell location is a function of the input cells in the
specified neighborhood “around” each output (or target) location.
Neighborhoods can be
different sizes and geometries.
Different arithmetic and
statistical functions can be
applied to summarize a
neighborhood values.
Example:
Output = focalsum (Input,
rectangle 3,3)
rectangle,
3 3)
Zonal Functions

Zonal functions compute an output raster dataset where the
output value for each location depends on the value of the cell
att the
th location
l ti andd the
th association
i ti that
th t location
l ti has
h within
ithi a
cartographic zone.
Output = zonalsum(inlayer,
zonalsum(inlayer, zonelayer)
zonelayer)
Output = zonalgeometry(zonelayer
zonalgeometry(zonelayer,
zonelayer, all)
Global Functions

Global, or perper-raster, functions compute an output raster
d
dataset
i which
in
hi h the
h output value
l at eachh cell
ll location
l
i is
i
potentially a function of all the cells combined from the
various input
p raster datasets. There are two main groups
g p of
global functions: Euclidean distance and weighted distance.
O t t from
Output
f
the
th Euclidean
E lid
distance function, each cell
contains the shortest distance to
any input point.
Application Functions



There are a wide series of cellcell-based modeling functions
developed
p to solve specific
p
applications.
pp
There is some overlap in the categorization of an application
function and the local, focal, zonal, and global functions (such
as the fact that even though
g slope
p is usuallyy used in the
application of analyzing surfaces, it is also a focal function).
Application functions include the following:







Density analysis
Surface generation
Surface analysis
Hydrologic analysis
Geometric transformation
Generalization
Resolution altering