Tests whether the string(s) specified in the "Mask" occur in String.
Syntax
INMASK(String, "Mask")
Input
String | is a string |
Domain type: | any Class or ID domain, or system domain String |
Mask | is the mask. In the mask, you can specify multiple search strings, each separated by a comma; you may use wildcards, i.e. asterisks (*) and question marks (?) |
Output
INMASK returns: | a boolean value, i.e. True, False or undefined |
Domain: | system domain Bool |
Notes:
Tips:
Usable in
MapCalc, TabCalc, Simple calculators
Examples
Pocket line calculator examples:
? INMASK("VeryLongString","Long") |
returns False |
? INMASK("VeryLongString","*Long*") | returns True |
? INMASK("VeryLongString","123") | returns False |
MapCalc example:
Raster map Geomorphology uses class domain Geomorphology which contains among others the items "Glacial cirque", "Glacial lake", "Glacial slope", "Glacial valley", "Active landslide" and "Old landslide". To find all areas that are glacial or that contain landslides, type on the command line of the Main window:
OutMap1 = INMASK(Geomorphology,"Glacial*,*landslide")
Geomorphology |
OutMap1 |
||||||||||||||||||
|
|
Legend |
|
al |
Active landslide |
gc |
Glacial cirque |
gl |
Glacial lake |
gs |
Glacial slope |
gv |
Glacial valley |
il |
Infilled lake |
ol |
Old landslide |
se |
Slope with minor erosion |
sf |
Steep slope near a fault |
Raster map Geomorphology has attribute table Geomorphology, in which class column Zonation contains several times the item "Steep slopes". To find all areas with steep slopes in map Geomorphology, type on the command line of the Main window:
OutMap2 = INMASK(Geomorphology.Zonation,"Steep*")
Output map OutMap2 will return True for all areas of the Geomorphology map where attribute column Zonation contains the string "Steep" and False for all other classes.
TabCalc example:
Code = CODE(%K)
OutCol1 = INMASK(%K,"Glacial*,*landslide")
OutCol2 = INMASK(%K,"g?,al,ol")
OutCol3 = INMASK(Zonation,"Steep*")
Domain of table Geology |
Code |
Zonation |
OutCol1 |
OutCol2 |
OutCol3 |
Accumulation of debris on slope |
ad |
Steep slopes |
False |
False |
Not Suitable |
Active landslide |
al |
Steep slopes |
True |
True |
Not Suitable |
Alluvial fan (flooding possible) |
af |
Alluvial fan |
False |
False |
Suitable |
Alluvial fan (no flooding possible) |
an |
Alluvial fan |
False |
False |
Suitable |
Dipslope |
ds |
Highest part |
False |
False |
Suitable |
Face slope |
fs |
Highest part |
False |
False |
Suitable |
Flat area near a fault |
fa |
Steep slopes |
False |
False |
Not Suitable |
Glacial cirque |
gc |
Highest part |
True |
True |
Suitable |
Glacial lake |
gl |
Highest part |
True |
True |
Suitable |
Glacial slope |
gs |
Highest part |
True |
True |
Suitable |
Glacial valley |
gy |
Highest part |
True |
True |
Suitable |
Heavily eroded area |
he |
Steep slopes |
False |
False |
Not Suitable |
Hills near a fault |
hf |
Steep slopes |
False |
False |
Not Suitable |
Infilled lake |
il |
Flat area |
False |
False |
Suitable |
Old landslide |
ol |
Steep slopes |
True |
True |
Not Suitable |
Ridge |
ri |
Steep slopes |
False |
False |
Not Suitable |
Slope with minor erosion |
se |
Steep slopes |
False |
False |
Not Suitable |
Steep slope near a fault |
sf |
Steep slopes |
False |
False |
Not Suitable |
Valley in alluvial fan |
yf |
Alluvial fan |
False |
False |
Suitable |
%K calculates with the items in the domain of the table. For OutCol1, the calculation is performed on the class names in the domain. For OutCol2, the calculation is performed on the codes of the domain items. For OutCol3 choose a user-defined Bool domain containing "Not Suitable" as True string and "Suitable" as False string. The result is "Suitable" for all records that are not steep.
See also:
STRGE | ||
How to use masks |