Map and Table Calculation

Merging domains (workaround)

Due to an error in the ILWIS software, class or ID domains are sometimes merged too early when the IFF function is used. In case domains are merged during a calculation, a warning is issued, and you may obtain an incorrect output map or output column.

For example an expression like:

OutMap = IFF(ClassMapA="ClassX", ClassMapA, ClassMapB)

returns an incorrect output map.

A workaround for this problem is to split the previous expression into two parts: one part that creates a boolean map and another part that use the boolean map in an IFF statement.

ClassX = ClassMapA="ClassX"

OutMap = IFF(ClassX, ClassMapA, ClassMapB)

Example

Unsuitable = SuitClass="Unsuitable"

CORRECT = IFF(Unsuitable, SuitClass, Urban)

SuitClass

Urban

Unsuitable

CORRECT

S S U
S M U
M U S
UR UR NU
NU UR UR
NU UR NU
F F T
F F T
F T F
UR UR U
NU UR U
NU U NU

The output map CORRECT may use domain Urban into which the domain items of map SuitClass are merged.

You can also choose to create a new domain for the output map; the domain items of the domains used by the Urban and SuitClass maps, are then merged into the new domain.

Notes:

See also:

IFF