Tests whether a is undefined or not known.
Syntax
ISUNDEF(a)
Input
a | is the test condition: a boolean expression containing at least one map name or one column name |
Output
ISUNDEF returns: | if a is undefined, True is returned;
if a is not undefined, False is returned. |
Domain: | system domain Bool |
Notes:
Tips:
Usable in
Examples
MapCalc example using a value map:
Below, the ISUNDEF function is combined with a conditional IFF function.
OutMap = IFF(ISUNDEF(DEM),1000,DEM)
DEM |
OutMap |
||||||||||||||||||
|
|
Note:
Expressions OutMap = IFUNDEF(DEM,1000) or OutMap = IFUNDEF(DEM,1000,DEM) give the same results.
MapCalc example using a class map:
OutMap = IFF(ISUNDEF(Landuse),"Mountains",Landuse)
Landuse |
OutMap |
||||||||||||||||||
|
|
In OutMap, class name "Mountains" (i.e. M) is assigned for every undefined pixel in map Landuse. To all other pixels, the original class name is assigned (F=Forest, G=Grassland, L=Lake).
Note:
Expressions OutMap = IFUNDEF (Landuse,"Mountains") or OutMap = IFUNDEF(Landuse,"Mountains",Landuse) give the same results.
TabCalc examples:
OutCol1 = ISUNDEF(Population)
OutCol2 = IFF(ISUNDEF(Population),0,Population)
OutCol3 = IFF(ISUNDEF(Landuse),"Mountains",Landuse)
Sitenr |
Population |
Landuse |
OutCol1 |
OutCol2 |
OutCol3 |
1 |
850 |
Crops |
False |
850 |
Crops |
2 |
? |
Grassland |
True |
0 |
Grassland |
3 |
600 |
Urban area |
False |
600 |
Urban area |
4 |
950 |
? |
False |
950 |
Mountains |
5 |
1250 |
Crops |
False |
1250 |
Crops |
6 |
450 |
? |
False |
450 |
Mountains |
7 |
? |
Grassland |
True |
0 |
Grassland |
8 |
900 |
Urban area |
False |
900 |
Urban area |
See also:
IFUNDEF |
IFNOTUNDEF |
IFF |
Map and Table Calculation : Assigning undefined values |
How to calculate with undefineds in maps and tables |