<< Click to Display Table of Contents >>

 

Selecting features by attributes

 

 

In addition to select features by selecting records, users can click "Option" button and click "Select By Attributes." Then, "Select by Attributes" window shows. In this window, you can select the layer you would like to query and set the selection mode. Also, you can select the field name in "Fields" and the attribute value in "Values." Then, the expression you set will be displayed in the text box at the bottom of the window (to select the field name or value, please double-click). As the expression is set already, please click "Query." Then, the features matching the expression will be selected.

 

   

 

 

Take the map for example. Choose “Union” for "layer" and “New selection” for "selection mode", then set [STRATE50_]= 150 as the expression. Then, click "Query." The features in the map window matching the expression will be selected. Meanwhile, "Select by Attributes" window will show the number of the found records in the map window.

 

 

NOTE: 4 selection modes are provided:

New selection: Clear the previous records and select features by the current expression.

Append selection: Append the current records to the previous records.

Remove from current selection: Remove the current records from the previous records.

Select from current selection: Select the records from the previous records.

 

 

 

 

The operators in Select by Attributes window:

Equal to = can be used for calculation with numeric and comparison with strings.

·

[area] = 1945 means that features whose [area] field is 1945 will be selected.

·

[GROUPNAME] = 'park' means that features whose GROUPNAME field exactly matches park will be selected.

 

Less than <, Greater than >, Less than or equal to <=, Not equal to <>, Greater than or equal to >= all can be used for calculation with numeric.

·

[length] >= 210 means features whose length is greater than or equal to 210 will be selected.

 

And, Or, Not can be used to combine more than one expression.

·

[GROUPNAME] = 'park' AND [length] > 210 will select the features whose GROUPNAME field is park and the perimeter is greater than 210.

·

[GROUPNAME] = 'school' OR [area] >2000 will select the features whose GROUPNAME field is school or the area is greater than 2000. (The selected features only need to match one of the expressions.)

·

[ITEM_NAME1] = 'primary school' NOT [area] > 1900 will select the features whose ITEM_NAME1 field is primary school but the area is not greater than 1900.

 

Like is usually used with ? and %, ? represents any single character and % represents any group of characters.

·

[ITEM_NAME1] LIKE '?unior high school' will select the features whose ITEM_NAME1 field is “junior high school” because ? represents any single character.

·

[ITEM_NAME1] LIKE '% school' will select the features whose ITEM_NAME1 field might be “primary school”, “junior high school”, ”senior high school” because % represents any group of characters.

 

()means the expression in the bracket need to be calculated first.

·

[area] < 2*( [length] + 1000) will select the features whose area field must be less than twice the results of length plus 1000.

 

 


©2015 Supergeo Technologies Inc. All rights reserved.