Appendices  

ILWIS expressions (menu-wise)

 

Any ILWIS operation like Filter, Cross and Distance calculation, can be performed by typing an ILWIS expression on the command line of the Main window. You can also use these expressions in scripts.

In this topic, the syntax of expressions of operations is described.

For an overview of MapCalc and TabCalc expressions, see Map and Table Calculation : Alphabetical overview of operators and functions or Map and Table Calculation : Functional overview of operators and functions

For details on creating expressions on the command line and in scripts, see Appendices : construction of expressions.

For special script commands, see Appendices : ILWIS script language (syntax).

Introduction

The general syntax for expressions is:

OUTMAP = expression

OUTMAP := expression

The definition symbol (=) is used to create a dependent output object;
the assignment symbol (:= ) is used to create an editable object.

For more information, see also Appendices : construction of expressions.

In the overview below, expression names are followed by parameters (between brackets, separated by commas), and:

-

Courier

is used for obligatory parts in expressions or in parameters;

-

Italics

is used for�parameters with special requirements, usually a short explanation follows;

-

a vertical bar | represents a choice;

-

a paramater in square brackets [ ] represents an optional parameter;

-

the phrase 'value map' or 'map with a value domain' means that the map should have domain of type Value;

-

Any operation name in the list below starting with:

MapList

creates an output map list;

Map

creates an output raster map;

PolygonMap

creates an output polygon map;

SegmentMap

creates an output segment map;

PointMap

creates an output point map;

Table

creates an output table;

Matrix

creates an output matrix;

-

Furthermore, the following predefined parameters are used:

'rasmap'

an input raster map;

'maplist'

an input map list (set of raster maps with same domain and same georeference);

'polmap'

an input polygon map;

'segmap'

an input segment map;

'pntmap'

an input point map;

'table'

an input table;

'column'

an input column;

'domain'

an existing domain;

the domain will be used for the output object;

'georef'

an existing georeference except georef None;

the georeference will be used for the output raster map;

'coordsys'

any existing coordinate system;

'sample set'

an input sample set;

'newdomain'

the output domain that will be created by the expression;

'newgeoref'

the output georeference that will be created by the expression.

Tip:

Some operations need a value input map. When your raster map is of domain type Class, ID or Group, and an attribute table is linked to the map with one or more suitable value columns, then you may type 'map.column' on the command line instead of parameter 'map' listed below. The operation then directly uses the values of the attribute column.

List of ILWIS expressions

The list below follows the order of the Operations menu in the Main window. For more information about the individual operations, click the hyper-links of the operation names.

Operation

Expression

VISUALIZATION

Apply 3D

MapApply3D(rasmap, georef3D)

 

rasmap

input raster map cannot have georef None

georef3D

a georeference 3D

RASTER OPERATIONS

Map Calculate

expression

see MapCalc and TabCalc

Attribute Map

MapAttribute(rasmap, column) | Rasmap.column

rasmap

raster map with a Class, ID, or Group domain

column

column with Value, Class, ID, Group, Picture, or Color domain; by default a column from the attribute table of the raster map.

Cross

MapCross(rasmap1, rasmap2, output cross table)

TableCross(rasmap1, rasmap2)

TableCross(rasmap1, rasmap2, output cross rasmap)

TableCross(rasmap1, rasmap2 [, output cross rasmap] [, IgnoreUndefs | IgnoreUndef1 | IgnoreUndef2 ])

rasmap2

same georeference as input raster map 1.

Aggregate Map

MapAggregateAggFunc(rasmap, groupfactor, group [, rowoffset, coloffset] [, newgeoref] )

MapAggregateAggFunc(rasmap, groupfactor, nogroup [, rowoffset, coloffset] )

MapListApplic(maplist, MapAggregateAggFunc(##, groupfactor, group [, rowoffset, coloffset] [, newgeoref] ))

MapListApplic(maplist, MapAggregateAggFunc(##, groupfactor, nogroup [, rowoffset, coloffset] ))

AggFunc

avg | cnt | max | med | min | prd | std | sum

When no aggregation function is specified, the upper left pixel of each block is used.

rasmap

raster map with a value domain for aggregate functions avg, max, min, std, sum; raster map with a class, ID, or value domain for aggregate function med ; raster map with any domain for aggregate function prd

groupfactor

a value (>= 1) to define the size of the blocks of input pixels to be aggregated; a value of 4 means that each block of 4 x 4 input pixels will be aggregated.

group

each block of input pixels is aggregated to 1 output pixel; a georeference factor is created with the same name as the output map.

nogroup

each block of input pixels is aggregated and the output value is stored in all pixels of the block. that correspond to the considered block of input pixels; the output map uses the same georeference as the input map.

rowoffset

optional parameter to skip the specified number of rows.

coloffset

optional parameter to skip the specified number of columns.

newgeoref

when using option group, optional parameter to specify the name of the output georeference; if not specified, the output georeference obtains the same name as the output map.

Distance

MapDistance(source rasmap [, weight rasmap | 1] )

MapDistance(source rasmap, [weight rasmap | 1] , output rasmap Thiessen)

MapThiessen(source rasmap [, weight rasmap | 1] , output rasmap Distance)

source rasmap

input raster map of any domain type; for all pixels with the undefined value, a distance value is calculated

[weight rasmap| 1]

weight map is an optional parameter to specify a map with weight factors; raster map of domain type Value. When a 1 is specified or when the parameter is not used, weight factor 1 is used for all pixels.

output rasmap Thiessen

name of output Thiessen raster map

output rasmap Distance

name of output Distance raster map

Iteration

MapIter(StartMap, IterExpr [, nr of iterations] )

MapIterProp(StartMap, IterExpr [, nr of iterations] )

StartMap

raster map that is used in the IterExpr.

IterExpr

an expression for neighbourhood operations.

nr of iterations

optional parameter to specify the maximum number of iterations; if not specified, the operation continues until no more changes occur.

Area Numbering

MapAreaNumbering(rasmap, 8|4)

8 | 4

8-connected areas or 4-connected areas

Sub Map

MapSubMap(rasmap, start row, start col [, nr rows, nr cols] [, newgeoref] )

MapSubMapCorners(rasmap, start row, start col, end row, end col [, newgeoref] )

MapSubMapCoords(rasmap, start X-coord, start Y-coord, end X-coord, end Y-coord [, newgeoref] )

MapListApplic(maplist, MapSubMap(##, start row, start col [, nr rows, nr cols] [, newgeoref] ))

MapListApplic(maplist, MapSubMapCorners(##, start row, start col, end row, end col [, newgeoref] ))

MapListApplic(maplist, MapSubMapCoords(##, start X-coord, start Y-coord, end X-coord, end Y-coord [, newgeoref] ))

newgeoref

optional parameter to specify a name for the output georeference; if not specified, then the output georeference obtains the same name as the output map.

Glue Maps

MapGlue( [georef.grf,] rasmap1, rasmap2 [, rasmaps] [, newdomain] [, replace] )

georef.grf

optional parameter to specify an existing georeference for the output map; extension .grf is required.

If not specified, then the system will automatically create a georeference for the output map.

rasmap1

input raster map; if no existing georeference is specified, the georeference of this first map will be used as a basis for the georeference for the output raster map.

rasmap2

input raster map that will be resampled if needed.

rasmaps

optional parameter to specify more input raster maps. You can specify as many input raster maps as you like; comma delimited.

newdomain

optional parameter, when merging class or two ID maps, to specify the name of the output domain into which all items of the input domains are merged; if not specified, the output domain will be stored by the output raster map (internal domain).

replace

optional parameter to use for overlapping pixels the values of the last input map; if not specified, the values of the first input map are used for overlapping pixels.

Mirror Rotate

MapMirrorRotate(rasmap, rotate type)

MapListApplic(maplist, MapMirrorRotate(##, rotate type))

rotate type

mirrhor | mirrvert | mirrdiag | transpose | rotate90 | rotate180 | rotate270 | normal

IMAGE PROCESSING

Filter

MapFilter(rasmap, filter name| filter expression)

MapListApplic(maplist, MapFilter(##, filter name| filter expression))

rasmap

all filters use input raster maps with a value domain; the Binary filters and the Majority filters also work on other domain types.

filter name

avg3x3 | binmajor | conn8to4 | d2fdx2 | d2fdxdy | d2fdy2 | dfddn | dfdup | dfdx | dfdy | dilate4 | dilate8 | edgesenh | inbnd4 | inbnd8 | laplace | lifegame | majority | majundef | majzero | med3x3 | med5x5 | outbnd4 | outbnd8 | peppsalt | shadow | shrink4 | shrink8 |

user-defined filter on disk

filter expression

FilterLinear(rows, cols, expression) |
Average(rows, cols) |
RankOrder(rows, cols, rank [, threshold] ) |
Median(rows, cols [, threshold] ) |
Majority(rows, cols) |
ZeroMajority(rows, cols) |
UndefMajority(rows, cols) |
Pattern(threshold) |
FilterStandardDev(rows, cols)

rows,cols

size of filter in rows and columns; odd values >= 1.

threshold

if the difference between the resulting value and the original pixel value is smaller than or equal to the threshold, the calculated value is used. If the difference between the resulting value and the original pixel value is larger than the threshold, the original pixel value is retained.

rank

the rank number of which the pixel value is assigned to the central pixel.

expression

fill the values in the filter by an expression in which you can use the parameters x, y, and r.

Stretch

MapStretch[Linear](rasmap, range from, domain)

MapStretch[Linear](rasmap, range from, domain, range to)

MapStretchHistEq(rasmap, range from, intervals)

MapListApplic(maplist, MapStretch[Linear](##, range from, domain))

MapListApplic(maplist, MapStretch[Linear](##, range from, domain, range to))

MapListApplic(maplist, MapStretchHistEq(##, range from, intervals))

rasmap

input raster map using a value domain

range from

min:max | perc

perc

real value > 0

intervals

number of output intervals

domain

output value domain

range to

value range of output map as:
min:max | min:max:prec| ::prec

Slicing

MapSlicing(rasmap, domain group)

rasmap

input raster map using a value domain

Color Separation

MapColorSep[aration](rasmap, color) | rasmap.color

rasmap

input raster map using a Picture domain or the Color domain

color

red | green | blue | yellow | magenta | cyan | grey | gray | hue | saturation | sat | intensity | intens

Color Composite

MapHeckbert(maplist, nr of colors)

MapColorComp[Linear](maplist, range1, range2, range3)

MapColorCompHistEq(maplist, range1, range2, range3)

MapColorComp24[Linear](maplist [, range1, range2, range3])

MapColorComp24HistEq(maplist, range1, range2, range3)

MapColorComp24HSI(maplist)

maplist

existing map list which contains three raster maps of the Image domain or definition of map list as:

mlist(ImageRed, ImageGreen, ImageBlue)

range1,2,3

min:max|perc

perc

0 real value < 50

nr of colors

2 integer value 255

Cluster

MapCluster(maplist, nr of clusters [, output attrib table] )

maplist

a map list which contains 1, 2, 3, or 4 raster maps that use the Image domain

nr of clusters

an integer value between 2 and 60 for the number of clusters in the output map.

Sample

-

Classify

MapClassify(sample set, classifier)

classifier

ClassifierBox(factor) |
ClassifierMinDist ( [threshold] ) |
ClassifierMinMahaDist ( [threshold] ) |
ClassifierMaxLikelihood ( [threshold] ) |
ClassifierPriorProb (table, column) |
ClassifierPriorProb (threshold, table, column)

Resample

MapResample(rasmap, georef, resamp meth [, Patch | NoPatch] )

MapListApplic(maplist, MapResample(##, georef, resamp meth [, Patch | NoPatch] ))

resamp meth

NearestNeighbour | BiLinear | BiCubic

Stereo pair from DTM

StereoPairFromDTM(rasmap, DTM)

StereoPairFromDTM(rasmap, DTM [, look angle [, ref height [, look modus [, resamp modus] ] ] ] )

DTM

raster map with a value domain

look angle

optional parameter to specify the 'projection' of the two output raster maps (degrees); 0 real value 90; if not specified, a default of 30 will be used.

ref height

optional parameter to specify the height value (real value) that will appear at the level of your monitor; if not specified, a default of ((minimum height value in DTM + maximum height value in DTM) / 2) will be used.

look modus

Left | Both | Right

optional parameter to specify how the look angle should be divided over both output raster maps.

resamp modus

Fast | Accurate

optional parameter to specify manner and speed of resampling.

STATISTICS

Histogram

TableHistogram(rasmap)

rasmap

input raster map of any domain type. Mind: the output raster histogram table will always have the same name as the input raster map.

TableHistogramPnt(pntmap)

pntmap

input point map of any domain type. Mind: the output point histogram table will always have the same name as the input point map.

TableHistogramPol(polmap)

polmap

input polygon map of any domain type. Mind: the output polygon histogram table will always have the same name as the input polygon map.

TableHistogramSeg(segmap)

segmap

input segment map of any domain type. Mind: the output segment histogram table will always have the same name as the input segment map.

RASTER

Autocorrelation

TableAutoCorrSemiVar(rasmap [, max shift] )

max shift

maximum pixel shift; integer value > 0; if not specified, a default of 20 will be used, but if either number of rows or number of columns in map is less than 100, a default of (map/5)+1 will be used.

Variogram Surface

MapVariogramSurfaceRas(rasmap [, nr of lags] )

rasmap

input raster map with a value domain

nr of lags

optional parameter to specify the number of directional distance classes (lags) in both horizontal and vertical direction; 1 <= integer value <= 4000, but not larger than neither the number of rows nor the number of columns in the input map; if not specified, default of 10 lags.

MAP LIST

Principal Components

MatrixPrincComp(maplist [, nr of output bands] )

maplist

map list containing raster maps with a value domain

Factor Analysis

MatrixFactorAnal(maplist [, nr of output bands] )

maplist

map list containing raster maps with a value domain

POLYGONS

Neighbour Polygons

TableNeighbourPol(polmap)

polmap

input polygon map with a Class, ID or Group domain

SEGMENTS

Direction Histogram

TableSegDir(segmap)

POINTS

Spatial correlation

TableSpatCorr(pntmap [, lagspacing [, plane | sphere] ] )

TableSpatCorr(pntmap [, lagspacing [, direction [, tolerance [, bandwidth] ] ] ] )

pntmap

input point map with a value domain

lagspacing

parameter to specify length of linear distance intervals; if not specified, the output table will use logarithmic distance intervals

plane | sphere

optional parameter to calculate distances in a plane (plane), or on the sphere by using the projection of the coordinate system of the point map (sphere); if not specified, distances will be calculated in a plane

direction

optional parameter to find point pairs in this direction; clockwise angle from Y-axis; 0� direction 90�

tolerance

optional parameter to specify half of the opening angle with which points in the specified direction should be found; 0� < tolerance 45�

bandwidth

optional parameter to limit the tolerance angle to a certain maximum width

Variogram Surface

MapVariogramSurfacePnt(pntmap [, lagspacing [, nr of lags] ] )

pntmap

input point map with a value domain

lagspacing

optional parameter to specify the distance in meters for the directional distance classes (lags); 0 < real value < diagonal of point map; if not specified, default of 0.5 Ö ((point map height * point map width) / nr of points)

nr of lags

optional parameter to specify the number of directional distance classes (lags) in both horizontal and vertical direction; 1 <= integer value <= 45; if not specified, default of 10 lags.

Cross Variogram

TableCrossVariogram(pntmap, columnA, columnB, lagspacing [, plane | sphere] )

pntmap

input point map with an ID domain and linked attribute table

columnA

attribute column with value domain

columnB

attribute column with value domain

lagspacing

parameter to specify length of linear distance intervals

plane | sphere

optional parameter to calculate distances in a plane (plane), or on the sphere by using the projection of the coordinate system of the point map (sphere); if not specified, distances will be calculated in a plane

Pattern Analysis

TablePattAnal(pntmap)

pntmap

input point map with more than two points

INTERPOLATION

Densify map

MapDensify(rasmap, factor, interpol meth)

MapListApplic(maplist, MapDensify(##, factor, interpol meth))

rasmap

raster map with a value domain for a BiLinear or Bicubic interpolation; raster map with any domain for Nearest Neighbour.

factor

real value > 1

interpol meth

BiLinear | BiCubic | NearestNeighbour

Kriging from Raster

MapKrigingFromRaster(rasmap, SemiVarModel [, LimDist [, Distance Unit [ , 1 | 0 [, min, max] ] ] ] )

rasmap

input raster map with a value domain

SemiVarModel

Model(nugget, sill, range) |
Power
(nugget, slope, pow)

Model

Spherical | Exponential | Gaussian | Wave | Circular | RatQuad

LimDist

limiting distance either in meters or in number of pixels

Distance Unit

m | p

defines whether limiting distance is expressed in meters (m) or in pixels (p)

1 | 0

optional parameter to create an error map: 1 do create error map, 0 do not create error map; if not specified, no error map will be created

min, max

optional parameters to specify the minimum and maximum number of input pixels with a value to be taken into account within the limiting distance

Contour Interpolation

MapInterpolContour(segmap, georef)

segmap

input segment map with a value domain.

MapInterpolContour(rasmap)

rasmap

input raster map with a value domain; mind: algorithm only works well for rasterized contour lines.

Point Interpolation:

 

Nearest Point

MapNearestPoint(pntmap, georef [, plane | sphere] )

 

plane | sphere

optional parameter to calculate distances in a plane (plane), or on the sphere by using the projection of the coordinate system as used by the georeference of the output raster map (sphere); if not specified, distances will be calculated in a plane

Moving Average

MapMovingAverage(pntmap, georef, weight func [, plane | sphere] )

 

pntmap

input point map with a value domain

 

weight func

InvDist(Exp,LimDist) | Linear(Exp,LimDist)

 

Exp

weight exponent

 

LimDist

limiting distance

 

plane | sphere

optional parameter to calculate distances in a plane (plane), or on the sphere by using the projection of the coordinate system as used by the georeference of the output raster map (sphere); if not specified, distances will be calculated in a plane

Trend Surface

MapTrendSurface(pntmap, georef, surface type)

 

pntmap

input point map with a value domain

 

surface type

Plane | Linear2 | Parabolic2 | 2 | 3 | 4 | 5 | 6

Moving Surface

MapMovingSurface(pntmap, georef, surface type, weight func [, plane | sphere] )

 

pntmap

input point map with a value domain

 

surface type

Plane | Linear2 | Parabolic2 | 2 | 3 | 4 | 5 | 6

 

weight func

InvDist(Exp,LimDist) | Linear(Exp,LimDist)

 

Exp

weight exponent

 

LimDist

limiting distance

 

plane | sphere

optional parameter to calculate distances in a plane (plane), or on the sphere by using the projection of the coordinate system as used by the georeference of the output raster map (sphere); if not specified, distances will be calculated in a plane

Kriging

MapKrigingSimple(pntmap, georef, SemiVarModel [, plane | sphere] [, 1 | 0 [, remove duplic [, tolerance] ] ] )

MapKrigingOrdinary(pntmap, georef, SemiVarModel [, plane | sphere] , LimDist [, 1 | 0 [, min, max [, remove duplic [, tolerance] ] ] ] )

 

pntmap

input point map with a value domain

 

SemiVarModel

Model(nugget, sill, range) |
Power
(nugget, slope, pow)

 

Model

Spherical | Exponential | Gaussian | Wave | Circular | RatQuad

 

plane | sphere

optional parameter to calculate distances in a plane (plane), or on the sphere by using the projection of the coordinate system as used by the georeference of the output raster map (sphere); if not specified, distances will be calculated in a plane

 

LimDist

limiting distance

 

1 | 0

optional parameter to create an error map: 1 do create error map, 0 do not create error map; if not specified, no error map will be created

 

min, max

optional parameters to specify the minimum and maximum number of points to be taken into account within the limiting distance

 

remove duplic

no | average | firstval

optional parameter to handle possible coinciding points

 

tolerance

optional parameter to specify a distance value in meters with which is determined whether points are coinciding or not

Anisotropic Kriging

MapKrigingAnisotropic(pntmap, georef, SemiVarModel, LimDist, angle, ratio [, 1 | 0 [, min, max [, remove duplic [, tolerance] ] ] ] )

MapKrigingUniversal(pntmap, georef, SemiVarModel, LimDist, 0, angle, ratio [, 1 | 0 [, min, max [, remove duplic [, tolerance] ] ] ] )

 

0

if using the MapKrigingUniversal syntax, obligatory parameter to indicate that there is no trend

 

angle

anisotropy angle (clockwise angle in degrees from North; -360 <= angle <= 360)

 

ratio

anisotropy ratio; largest semi-variogram range divided by smallest semi-variogram range (1 < ratio <= 10)

 

other parameters

see Kriging

Universal Kriging

MapKrigingUniversal(pntmap, georef, SemiVarModel, LimDist, trend type, 0, 1 [, 1 | 0 [, min, max [, remove duplic [, tolerance] ] ] ] )

 

trend type

0 | 1 | 2

 

0,1

parameters to indicate that there is no anisotropy (angle and ratio)

 

other parameters

see Kriging

CoKriging

MapCoKriging(pntmapPred, pntmapCovar, georef, SemiVarModelPred, SemiVarModelCovar, CrossVarModel, LimDist [, 1 | 0 [, min, max [, remove duplic [, tolerance [, plane | sphere] ] ] ] ] )

 

pntmapPred

input point map for predictand

 

pntmapCovar

input point map for covariable

 

SemiVarModelPred

semi-variogram model for predictand, see Kriging

 

SemiVarModelCovar

semi-variogram model for covariable, see Kriging

 

CrossVarModel

cross-variogram model for both variables, see Kriging

 

other parameters

see Kriging

VECTOR OPERATIONS

Unique ID

PolygonMapNumbering(polmap [, , prefix] )

SegmentMapNumbering(segmap [, , prefix] )

PointMapNumbering(pntmap [, , prefix] )

prefix

optional parameter to specify a user-defined prefix for the output IDs; if this parameter is not specified, the output IDs will simply be pol 1, pol 2, pol 3, or seg 1, seg 2, seg 3, or pnt 1, pnt 2, pnt 3, etc.

POLYGONS

Attribute Map

PolygonMapAttribute(polmap, column)

polmap

polygon map with a Class, ID, or Group domain.

column

column with a Value, Class, ID, or Group domain; by default a column from the attribute table of the polygon map.

Mask Polygons

PolygonMapMask(polmap, "mask")

"mask"

a mask consists of (multiple) search strings; asterisks and question marks can be used as wild cards; on the command line, the total mask needs to be surrounded by double quotes.

Assign Labels

PolygonMapLabels(polmap, pntmap)

Transform Polygons

PolygonMapTransform(polmap, targetcoordsys [, interval] )

interval

distance interval at which additional intermediate points should be inserted along polygon boundaries to densify the coordinates of the polygon boundaries; real value > 0

ID Grid Map

PolygonMapGrid (coordsys, originX, originY, width, height, nrVertical, nrHorizontal, , , [directionX], [directionY], [table], [label],  [order], [startcorner], [startnumber], [steps], [prefix], [postfix])

PolygonMapGrid (coordsys, originX, originY, width, height, , , oppositeX, oppositeY, [directionX], [directionY], [table], [label], [order], [startcorner], [startnumber], [steps], [prefix], [postfix])

PolygonMapGrid (coordsys, originX, originY, , , nrVertical, nrHorizontal, oppositeX, oppositeY [directionX], [directionY], [table], [label], [order], [startcorner], [startnumber], [steps], [prefix], [postfix])

coordsys

input coordinate system (metric or latlon)

originX, originY

X and Y coordinates of the origin. The origin is the lower left corner of the output polygon map.

width, height

width and height of an ID grid cell

nrVertical, nrHorizontal

number of vertical and horizontal grid cells

oppositeX, oppositeY

X and Y coordinates of the opposite corner coordinate. The opposite corner coordinate is the corner opposite the corner specified as 'origin coordinate'.

directionX, directionY

X and Y coordinates of the direction point. The direction point is a point on the positive Y-axis from the lower left corner (origin) of the ID grid map and is used to rotate the grids.

table

an existing attribute table with an ID domain

label

LabelPoints | NoLabelPoints

generate a point map with label points. Do not generate a point map. If omitted NoLabelPoints will be assigned.

order

direction for labeling the grid cells. Available option are: Horizontal (H), Horizontal Continues (HC), Vertical (V) and Vertical Continues (VC). If omitted Horizontal (H) will be assigned.

startcorner

starting corner for labeling. Available option are: Lower Left (LL), Lower Right (LR), Upper Left (UL) and Upper Right (UR). If omitted Lower Left (LL) will be assigned.

startnumber

an integer that will be used as initial number to start labeling the grid cells. If the value for this parameter is omitted, 1 will be assigned.

steps

step size. The step size is a positive or negative integer that is used to determine the increase/decrease of each individual grid cell during the labeling process.

prefix

optional parameter to specify some characters that should be used as prefix for the IDs in the output polygon map.

postfix

optional parameter to specify some characters that should be used as postfix for the IDs in the output polygon map.

SEGMENTS

Attribute Map

SegmentMapAttribute(segmap, column)

segmap

segment map with a Class, ID, or Group domain.

column

column with a Value, Class, ID, or Group domain; by default a column from the attribute table of the segment map.

Mask Segments

SegmentMapMask(segmap, "mask")

"mask"

a mask consists of (multiple) search strings; asterisks and question marks can be used as wild cards; on the command line, the total mask needs to be surrounded by double quotes.

Assign Labels

SegmentMapLabels(segmap, pntmap [, set domain] )

set domain

yes | no

optional parameter to set the domain of the output segment map to the domain of the input segment map or to the domain of the input point map; if this parameter is not specified, the output segment map will use the same domain as the input segment map.

no

domain of output segment map is domain of input segment map.

yes

domain of output segment map is domain of input point map.

Sub Map

SegmentMapSubMap(segmap, minX, minY, maxX, maxY)

SegmentMapSubMap(segmap, minLon, minLat, maxLon, maxLat)

minX

minimum X-coordinate of output map.

minY

minimum Y-coordinate of output map.

maxX

maximum X-coordinate of output map.

maxY

maximum Y-coordinate of output map.

in case input map uses coordinate system of type latlon:

minLon

minimum Longitude of output map (signed decimal degrees).

minLat

minimum Latitude of output map (signed decimal degrees).

maxLon

maximum Longitude of output map (signed decimal degrees).

maxLat

maximum Latitude of output map (signed decimal degrees).

Glue Segment Maps

SegmentMapGlue(segmap1, "mask1", segmap2, "mask2" [,...] [, newdomain] )

SegmentMapGlue(minX, minY, maxX, maxY, segmap1,"mask1", segmap2, "mask2" [, ... ] [, newdomain] )

segmap1,2, ...

are the input segment map names to be combined into one output segment map

"mask1"

a mask consists of (multiple) search strings; asterisks and question marks can be used as wild cards; on the command line, the total mask needs to be surrounded by double quotes.

minX

minimum X-coordinate of output map.

minY

minimum Y-coordinate of output map.

maxX

maximum X-coordinate of output map.

maxY

maximum Y-coordinate of output map.

newdomain

optional parameter, when merging Class or ID maps, to specify a name for the output domain into which all items of the input domains are merged; if not specified, the output domain will be stored by the output map (internal domain).

Densify Coords

SegmentMapDensifyCoords(segmap, distance)

distance

is the distance in meters at which extra intermediate points should be inserted into segments; real value > 0

Transform Segments

SegmentMapTransform(segmap, targetcoordsys [, interval] )

interval

distance interval at which additional intermediate points should be inserted along segments to densify the segment coordinates; real value > 0

Tunneling

SegmentMapTunneling(segmap, tunnel width, remove node)

tunnel width

tunnel width in meters; real value >= 0

remove node

yes | no

remove superfluous nodes or not.

POINTS

Attribute Map

PointMapAttribute(pntmap, column)

pntmap

point map with a Class, ID, or Group domain

column

column with a Value, Class, ID, or Group domain; by default a column from the attribute table of the point map.

Mask Points

PointMapMask(pntmap, "mask")

"mask"

a mask consists of (multiple) search strings; asterisks and question marks can be used as wild cards; on the command line, the total mask needs to be surrounded by double quotes.

Sub Map

PointMapSubMap(pntmap, minX, minY, maxX, maxY)

PointMapSubMap(pntmap, minLon, minLat, maxLon, maxLat)

minX

minimum X-coordinate of output map.

minY

minimum Y-coordinate of output map.

maxX

maximum X-coordinate of output map.

maxY

maximum Y-coordinate of output map.

in case input map uses coordinate system of type latlon:

minLon

minimum Longitude of output map (signed decimal degrees).

minLat

minimum Latitude of output map (signed decimal degrees).

maxLon

maximum Longitude of output map (signed decimal degrees).

maxLat

maximum Latitude of output map (signed decimal degrees).

Glue Point Maps

PointMapGlue(pntmap1, "mask1",pntmap2, "mask2" [,... ] [, newdomain] )

PointMapGlue(minX, minY, maxX, maxY, pntmap1,"mask1", pntmap2, "mask2" [, ... ] [, newdomain] )

pntmap1,2, ...

are the input point map names to be combined into one output point map

"mask1"

a mask consists of (multiple) search strings; asterisks and question marks can be used as wild cards; on the command line, the total mask needs to be surrounded by double quotes.

minX

minimum X-coordinate of output map.

minY

minimum Y-coordinate of output map.

maxX

maximum X-coordinate of output map.

maxY

maximum Y-coordinate of output map.

newdomain

optional parameter, when merging Class or ID maps, to specify a name for the output domain into which all items of the input domains are merged; if not specified, the output domain will be stored by the output map (internal domain).

Transform Points

PointMapTransform(pntmap, targetcoordsys)

RASTERIZE

Polygon to Raster

MapRasterizePolygon(polmap, georef)

Segment to Raster

MapRasterizeSegment(segmap, georef)

Segment Density

MapSegmentDensity(segmap, "mask", georef)

"mask"

a mask consists of (multiple) search strings; asterisks and question marks can be used as wild cards; on the command line, the total mask needs to be surrounded by double quotes.

Point to Raster

MapRasterizePoint(pntmap, georef, point size)

point size

size in pixels; integer value > 0

Point Density

MapRasterizePointCount(pntmap, georef, point size)

MapRasterizePointSum(pntmap, georef, point size)

point size

size in pixels; integer value > 0

VECTORIZE

Raster to Polygon

PolygonMapFromRas(rasmap [, 8|4 [, smooth|nosmooth] ] )

rasmap

input raster map cannot have georef None

8|4

distinguish 8-connected or 4-connected areas;

default 8.

smooth

smooth polygon boundaries; default.

nosmooth

do not smooth polygon boundaries.

Raster to Segment

SegmentMapFromRasAreaBnd(rasmap, 8|4, smooth|nosmooth, single|unique)

rasmap

input raster map cannot have georef None

8|4

distinguish 8-connected or 4-connected areas.

smooth

smooth segments.

nosmooth

do not smooth segments.

single

assign the name 'Boundaries' to all output segments (internal output domain).

unique

assign unique names like 'Boundary 1', 'Boundary 2', etc. to the output segments; an attribute table will be created storing the names of the mapping units on both sides of each output segment and the lengths of the extracted segments. Output map and attribute table will use an internal UniqueID domain.

Raster to Point

PointMapFromRas(rasmap)

rasmap

input raster map cannot have georef None

Polygon to Segment

SegmentMapPolBoundaries(polmap, "mask", single | unique)

"mask"

a mask consists of (multiple) search strings; asterisks and question marks can be used as wild cards; on the command line, the total mask needs to be surrounded by double quotes.

single

assign the name 'Boundary' to all output segments (internal output domain).

unique

assign unique names like 'Boundary 1', 'Boundary 2', etc. to the output segments; an attribute table will be created storing the names of the polygons on both sides of each output segment and the lengths of the extracted segments. Output map and attribute table will use an internal UniqueID domain.

Polygon to Point

PointMapPolLabels(polmap [, AlsoUndefs] )

AlsoUndefs

optional parameter to also obtain label points for polygons which have no class name, ID or value.

Segment to Polygon

PolygonMapFromSegment(segmap [, "mask" [, labelpntmap | unique | domain [, auto] ] )

PolygonMapFromSegmentNonTopo(segmap [, "mask" [, segments | labelpntmap | unique | domain] )

"mask"

a mask consists of (multiple) search strings; asterisks and question marks can be used as wild cards; on the command line, the total mask needs to be surrounded by double quotes; if not specified all segments are used.

labelpntmap

optional parameter to automatically assign names to the output polygons according to a specified point map labelpntmap which contains the labels.

segments

optional parameter to polygonize non-topological segments while assigning to each polygon the code of the segment which encloses the polygon.

unique

optional parameter to polygonize the segments while assigning unique names to the polygons as Pol 1, Pol 2, etc. (internal domain).

domain

mainly used during polygonization in the Segment editor (see Segment editor, Polygonize); optional parameter to use a specified domain for the output polygon map; in the output map, the polygons will not have names yet: you will need to manually assign names to the polygons according to the selected domain.

If none of the parameters labelpntmap, segments, unique, or domain are specified, the Unique option will be used.

auto

optional parameter during topological polygonization to automatically correct erroneous segments in the input map; deletes false polygons, deletes segments with dead ends, insert nodes when needed; if not specified and an error is found, the program stops and no polygon map is calculated.

Segment to Point

PointMapSegCoords(segmap)

PointMapSegDist(segmap, distance)

PointMapSegNodes(segmap)

distance

distance interval in meters; real value > 0

TABLE OPERATIONS

Transpose Table

TableTranspose(table, col domain)

TableTranspose(table, col domain, valuerange)

table

input table with a domain none, class or ID and maximum 1000 records

col domain

the domain that will be used for all columns in the transposed table

valuerange

if the column domain is a value domain, specify the value range as min:max : prec that will be used for all columns in the transposed table

Change Domain

TableChangeDomain(table, None | domain)

TableChangeDomain(table, column[, avg | min | max | sum | last | no] )

domain

parameter to specify the name of an existing class or ID domain on disk. The output table will use this class or ID domain.

column

parameter to specify the name of a class or ID column in the input table; the output table will use the domain of the specified column. When no aggregation function is used, the classes or IDs in the specified column should be unique.

avg|min|max|sum|last|no

parameter to specify the aggregation method for other value columns, when the classes or IDs in the specified column are not unique: average, minimum value, maximum value, sum, last value encountered or no aggregation.

Table to PointMap

PointMapFromTable(table, XYcoordcolumn [, prefix | attribcolumn] )

PointMapFromTable(table, [Xcolumn, Ycolumn,] coordsys [, prefix | attribcolumn] )

XYcoordcolumn

parameter to specify name of a coordinate column in the table which contain the XY-coordinates for the points as (X,Y); column should use a coordinate system as its domain.

Xcolumn, Ycolumn

parameters to specify names of columns in the table which contain the X- and Y-coordinates for the points; do not need to be specified when table contains columns with names X and Y.

prefix

optional parameter for a table with domain None to create a new ID domain for the output point map and table, the IDs will consist of specified prefix followed by the record number of the table; if not specified, the new IDs will use prefix Pnt followed by the record numbers of the table.

attribcolumn

optional parameter to use a domain of a column in the table as the domain of the output point map.

Glue Tables

TableGlue(table1, table2 [, more tables] [, vertical] )

TableGlue([newdomain,] table1, table2 [, more tables] )

more tables

optional parameter to specify more input tables. You can specify as many input tables as you like; comma delimited.

vertical

in case the input tables have domain None: optional parameter to specify that tables should be merged vertically; if not specified, columns of the input tables will all appear as new columns in the output table (horizontally).

newdomain

in case the input tables have class or ID domains: optional parameter to specify a name for the domain of the output table; if not specified; the output domain will obtain the same name as the output table.

DEM-HYDRO PROCESSING

FLOW DETERMINATION

Fill Sinks

MapFillSinks(rasmap)

rasmap

input raster map is supposed to be a Digital Elevation Model (DEM), i.e. a raster map with a value domain.

Flow Direction

MapFlowDirection(rasmap, [slope | height] )

rasmap

input raster map is supposed to be a sink-free Digital Elevation Model (DEM), i.e. a raster map with a value domain.

slope | height

optional parameter to choose how flow direction should be determined:
Slope : water flows to neighbouring pixel according to steepest slope;
Height : water flows to neighbouring pixel with lowest elevation.
If not specified, slope will be used.

Flow Accumulation

MapFlowAccumulation(flowdir_rasmap)

flowdir_rasmap

as input map, use the output map of the Flow Direction operation, i.e. raster map with system class domain FlowDirection.

FLOW MODIFICATION

DEM optimization

MapDemOptimization(rasmap, segmap, table, col_buffer_dist, col_smooth_drop, col_sharp_drop)

MapDemOptimization(rasmap, segmap, bufferdist, smoothdrop [, sharpdrop] )

MapDemOptimization(rasmap, polmap, poldrop)

rasmap

input raster map is supposed to be a Digital Elevation Model (DEM), i.e. a raster map with a value domain.

segmap

input segment map (Class or ID domain) containing drainage features or watershed-divide features.

table

attribute table of the segment map.

col_buffer_dist

column in the attribute table containing buffer distance values for individual segment classes/IDs; real value > 0.

col_smooth_drop

column in the attribute table containing smooth drop values for individual segment classes/IDs; positive values represent a drop; negative values represent a raise.

col_sharp_drop

column in the attribute table containing additional sharp drop values for individual segment classes/IDs; positive values represent a drop; negative values represent a raise.

bufferdist

buffer distance value for all segments (real value > 0).

smoothdrop

smooth drop value for all segments; positive value represents a drop; negative value represents a raise.

sharpdrop

optional additional sharp drop value for all segments; positive value represents a drop; negative value represents a raise.

polmap

input polygon map (any domain) containing drainage features or catchment features.

poldrop

(sharp) drop value for all polygons; positive value represents a drop; negative value represents a raise.

Topological Optimization

MapTopologicalOptimization(drainnetwork_rasmap, flowdir_rasmap, stream_segmap, output_modified_flowdir_rasmap)

drainnetwork_rasmap

a raster map that is the outcome of the Drainage Network Extraction operation, i.e. a raster map with a Bool domain.

flowdir_rasmap

a raster map that is the outcome of the Flow Direction operation, i.e. a raster map with system domain FlowDirection.

stream_segmap

a segment map that will be used to improve the drainage network map.

output_modified_flowdir_rasmap

the name of a new (updated) flow direction raster map.

Variable Threshold Computation

MapVariableThresholdComputation(rasmap, filter_size, nr_classes, "UpperBounds_and_ThresholdVals", output_internal_relief_rasmap)

rasmap

input raster map is supposed to be a Digital Elevation Model (DEM), i.e. a raster map with a value domain.

filter_size

a value to define the size of the window that will move over the input map(s); filter size 3, means that each time 3 x 3 input pixels are considered.

nr_classes

value to define the number of output 'classes' that you wish to obtain in the output threshold map (1 integer value 5)

"UpperBounds_and_ThresholdVals"

string in which, for each class at a time, the upper boundary value for internal relief values is specified, followed by the desired output threshold value. Boundary values and corresponding threshold values are separated by commas, this is repeated for each output 'class'; on the command line, the total string needs to be surrounded by double quotes.

output_internal_relief_rasmap

true | false

specify true to obtain an additional raster map with the internal relief values.

specify false if no internal relief map is desired.

NETWORK AND CATCHMENT EXTRACTION

Drainage Network Extraction

MapDrainageNetworkExtraction(flowacc_rasmap, threshold)

MapDrainageNetworkExtraction(flowacc_rasmap, threshold_rasmap, flowdir_rasmap)

flowacc_rasmap

a raster map that is the outcome of the Flow Accumulation operation, i.e. a raster map with a value domain.

threshold

a value (> 0) to define the minimum number of pixels (i.e. the contributing area) that should drain into the pixel examined to form a network channel.

threshold_rasmap

a raster map which pixel values define the minimum number of pixels (i.e. the contributing area) that should drain into the pixel examined to form a network channel.

flowdir_rasmap

a raster map that is the outcome of the Flow Direction operation, i.e. a raster map with system domain FlowDirection.

Drainage Network Ordering

MapDrainageNetworkOrdering(DEM_rasmap, flowdir_rasmap, drainnetwork_rasmap, minLength)

DEM_rasmap

a raster map containing height values, i.e. a raster map with a value domain.

flowdir_rasmap

a raster map that is the outcome of the Flow Direction operation, i.e. a raster map with system domain FlowDirection.

drainnetwork_rasmap

a raster map that is the outcome of the Drainage Network Extraction operation, i.e. a raster map with a Bool domain.

minLength

value for the minimum drainage segment length (in m) that will remain in the drainage network (value ≥ 0)

Catchment Extraction

MapCatchmentExtraction(drainorder_rasmap, flowdir_rasmap)

drainorder_rasmap

a raster map that is the outcome of the Drainage Network Ordering operation, i.e. a raster map with an Identifier domain.

flowdir_rasmap

a raster map that is the outcome of the Flow Direction operation, i.e. a raster map with system domain FlowDirection.

Catchment Merge

MapCatchmentMerge(drainorder_rasmap, flowdir_rasmap, flowacc_rasmap, outlet_pntmap, include_undefs, extract_segments [, output_segmap_longestFlow] )

MapCatchmentMerge(drainorder_rasmap, flowdir_rasmap, flowacc_rasmap, order_system, stream_order [, output_segmap_longestFlow] )

drainorder_rasmap

a raster map that is the outcome of the Drainage Network Ordering operation, i.e. a raster map with an Identifier domain.

flowdir_rasmap

a raster map that is the outcome of the Flow Direction operation, i.e. a raster map with system domain FlowDirection.

flowacc_rasmap

a raster map that is the outcome of the Flow Accumulation operation, i.e. a raster map with a value domain.

outlet_pntmap

a point map that contains one or more outlets; sub-catchments draining into these outlets will be merged.

include_undefs

true | false

specify true to include pixels that have value undefined in the DEM into a catchment; this can only be used when there is a single outlet point in the point map.

specify false to do nothing special.

extract_segments

true | false

specify true to obtain an additional segment map and attribute table with new IDs etc., see Catchment Extraction.

specify false to not obtain an additional segment map and attribute table.

order_system

strahler | shreve

the drainage order method that should be used to merge catchments; specify either strahler or shreve.

stream_order

a stream order value, according to the Strahler or Shreve method; integer value > 0. Connected sub-catchments that have an order number smaller than or equal to the specified value will be merged.

output_segmap_longestFlow

optional parameter to generate an output segment map (specify a name for this segment map) that will contain the longest flow path for each sub-catchment; an extra attribute table will also be created.

COMPOUND PARAMETER EXTRACTION

Overland Flow Length

MapOverlandFlowLength(drainorder_rasmap, flowdir_rasmap)

drainorder_rasmap

a raster map that is the outcome of the Drainage Network Ordering operation, i.e. a raster map with an Identifier domain.

flowdir_rasmap

a raster map that is the outcome of the Flow Direction operation, i.e. a raster map with system domain FlowDirection.

STATISTICAL PARAMETER EXTRACTION

Horton Statistics

TableHortonPlots(catch_extr_rasmap, catch_merge_rasmap, drainorder_rasmap)

catch_extr_rasmap

a raster map that is the outcome of the Catchment Extraction operation, i.e. a raster map and its linked attribute table, both using an ID domain (in fact the ID domain of the network ordering raster map and its attribute table).

catch_merge_rasmap

a raster map that is the outcome of the Catchment Merge operation, i.e. a raster map and its linked attribute table, both using an ID domain.

drainorder_rasmap

a raster map that is the outcome of the Drainage Network Ordering operation, i.e. a raster map and its linked attribute table, both using an ID domain.

COLUMN OPERATIONS (Table window, Columns menu)

TabCalc

ColumnCalculate,
see Map and Table Calculation : Alphabetical overview of operators and functions

Statistics

see Column Statistics

Join

ColumnJoin(table, column [, key1] )

ColumnJoin2ndKey(table, column [, key1], key2)

ColumnJoinAggFunc(table, column, key2 [, weight [, key1] ] )

Aggregation

ColumnAggregate[Cnt|Max|Min|Sum](column [, group] )

ColumnAggregate[Avg|Med|Prd|Std](column [, group [, weight] )

ColumnAggregate[Avg|Med|Prd|Std](column [, , weight] )

Cumulative

ColumnCumulative(column [, sortcolumn] )

Least Squares

ColumnLeastSquaresFit(column1, column2, Function, n)

Semi-variogram

ColumnSemiVariogram(DistanceColumn, SemiVarModel)

See also: