Mask polygons
Functionality
The Mask Polygons operation allows you to selectively copy polygons of an input polygon map into a new output polygon map. The user has to specify a mask to select and retrieve the class names, IDs or values of the polygons that are to be copied.
By specifying a mask, you can search for polygons with a certain class name, ID or value. A mask is in fact a simple query to find (retrieve), display or use only those polygons in a map that have certain class names, identifiers or values. A mask contains one or more search strings in which wild cards, asterisks (*) and question marks (?), are allowed. You can enter as many search strings in a mask as you like; separate the strings by commas.
Mask syntax:
- search strings in a mask are compared with the classes, IDs or values of the domain of a map; when a map uses a class or ID domain and the classes or IDs have codes, the mask works on the codes and on the names and on the combination of codes and names,
- to find/retrieve one specific class name, identifier or value: type that class name, ID or identifier in the mask,
- to find/retrieve multiple class names, identifiers or values: separate the different class names, identifiers or values in the mask by commas (it does not matter whether you use spaces before or after a comma)
- you can use asterisks as wild cards to replace zero or more characters in class names, IDs or values, for example for*,wat* or 1*,2*,3* , or even *25,*50,*75,*00, or A*b*,D*g*
- you can use question marks as wild cards to replace single characters in class names, identifiers or values, for example Ab?,D?,Gl? or ?p,??i, or A*b??,D*g??
- in a dialog box, you should not use quotes around class names, identifiers or values,
- on the command line, you must use double quotes around the complete mask.
Examples:
- When a polygon map contains topographic features, and you want to copy the polygons in which part of the class name is 'park' or 'square'; use as mask: *park*,*square*
- When a polygon map contains cadastral plots identified by IDs between 1000 and 9999, and you want to copy the polygons with an ID that starts with a 1, e.g. IDs 101, 102, 103, etc.; use as mask: 1*
- When a polygon map contains information on population density per polygon, and you want to copy the polygons with a population density between 200 and 250; use as mask: 20*,21*,22*,23*,24*,250
For more information, see How to use masks.
Requirements for input polygon map:
No special input map requirements.
Domain and coordinate system of output map:
The output polygon map uses the same domain as the input polygon map.
The output polygon map uses the same coordinate system and coordinate boundaries as the input polygon map.
Tip:
This operation creates a new polygon map. You can also display specific polygons of a polygon map in a map window without creating a new polygon map: select the Mask check box in the Display Options dialog box of the polygon map which appears when you open the polygon map. Then, specify the mask, i.e. the class names, identifiers or values of the polygons that you want to display.
See also:
Mask polygons : dialog box
Mask polygons : command line
Mask polygons : algorithm