Select Templates

Templates in the Select panel of the Contents pane provide point-and-click selection of objects in a drawing.   Selection templates allow us to select objects based on their geometric characteristics, such as which objects are areas, lines or points, by the characteristics of their attributes, such as which objects have fields that contain a specific text string, or by their spatial relationship to objects in other drawing layers in a map, such as which objects intersect or are adjacent to objects in a given layer.

Templates for Drawings

Areas

Select objects that are areas.

 

il_select_template_areas_dlg.png

 

Choose Areas as the template, specify the geometry field in the active layer and press Replace Selection.

 

il_select_template_areas.png

Area objects are selected.

 

Between

Select objects for which the value of the specified field is between the given upper and lower bounds, inclusive.

 

il_select_template_between_numeric01.png

 

Use a numeric field mfd_id we can search for values between 5 and 7.  We choose Expression in the pull down menus for the lower and upper bounds and then enter numbers.

 

il_select_template_between_numeric02.png

 

 Between is often used with numbers, but also can be used with other data types, such as text fields.

 

il_select_template_between_text01.png

 

Using a text field called Name we can search for values between 'charlie' and 'foxtrot', in lexicographic order.   We choose Expression in the pull down menus for the lower and upper bounds and then enter strings using single ' quote characters.

 

The use of single quotes is unusual, but that is because we are working with a Select template that can work with various data types.  It does not know we mean text, since we have chosen Expression.  In SQL expressions, text literals are quoted using single ' quote characters, so that is what we do.

 

il_select_template_between_text02.png

 

Equal

Select objects for which the value of the specified field is equal to the Compare to value.

 

il_select_template_equal_text01.png

In the illustration we find objects with a Name text field that is equal to 'delta'.   We choose Expression in the pull down menu for the Compare to box, and then enter the string using single ' quote characters.

 

The use of single quotes is unusual, but that is because we are working with a Select template that can work with various data types.  It does not know we mean text, since we have chosen Expression.  In SQL expressions, text literals are quoted using single ' quote characters, so that is what we do.

 

il_select_template_equal_text02.png

 

Geoms Adjacent

Available for maps that contain at least two drawing layers when one of the drawing layers is the active layer.  Select all objects in the source drawing that are adjacent to any object in the overlay drawing.  See illustrations below.

Geoms Contained

Available for maps that contain at least two drawing layers when one of the drawing layers is the active layer.  Select all objects in the source drawing that are contained by any object in the overlay drawing.  See illustrations below.

Geoms Containing

Available for maps that contain at least two drawing layers when one of the drawing layers is the active layer.  Select all objects in the source drawing containing any object in the overlay drawing.  See illustrations below.

Geoms Intersecting

Available for maps that contain at least two drawing layers when one of the drawing layers is the active layer.  Select all objects in the source drawing intersecting any object in the overlay drawing.  See illustrations below.

Geoms Touching

Available for maps that contain at least two drawing layers when one of the drawing layers is the active layer.  Select all objects in the source drawing touching any object in the overlay drawing.  See illustrations below.

Geoms with Curves

Select objects that contain curved segments.  Points do not have curved segments, so only areas and lines can be selected.

 

il_select_template_with_curves_dlg.png

 

Choose Geoms with Curves as the template, specify the geometry field in the active layer and press Replace Selection.

 

il_select_template_with_curves.png

Objects that contain curved segments are selected.

 

Geoms with Z

Select objects that include a Z (height) value.  

 

il_select_template_with_z_dlg.png

 

Choose Geoms with Z as the template, specify the geometry field in the active layer and press Replace Selection.

 

il_select_template_with_z.png

 

Objects that have a Z value specified are selected.   In the illustration above we have added a labels layer, where the Z values, if any, for objects are taken from a computed field that reports the Z value set for an object.

 

The computed field that shows the Z value (height), if any, for an object was created using the expression:

 

VectorValue(GeomCoordXYZ([Geom], 0),2)

 

See the Example: Add a Computed Field to a Table topic for discussion and explanation of the above.

 

Greater

Select objects for which the value of the specified field is greater than the Compare to value.

 

il_select_template_greater01.png

In the illustration we find objects with an mfd_id field that is greater than 4.  We choose Expression in the pull down menu for the Compare to box and then enter a number.

 

il_select_template_greater02.png

Greater or Equal

Select objects for which the value of the specified field is greater than or equal to the Compare to value.

JSON Boolean

Select objects for which the value of the named JSON boolean tag in the specified field is true.

 

il_select_template_json_boolean01.png

In the illustration we find objects for which the Photo boolean tag is true in the JSON_Info text field containing a JSON string.  We choose Value in the pull down menu for the Name box and then enter the desired text, no quotes.

 

il_select_template_json_boolean02.png

 

The illustration uses a table of Carolingian coin hordes where the Photo tag is either true or false depending on whether there is a photograph for that particular horde.  See the discussion for the JSON Boolean transform template in the Transform Templates - Boolean topic.  See the Example: Construct JSON String using Select and Transform topic for an example creating the table illustrated above.

 

Less

Select objects for which the value of the specified field is less than the Compare to value.

 

il_select_template_less01.png

In the illustration we find objects with an mfd_id field that is less than 4.  We choose Expression in the pull down menu for the Compare to box and then enter a number.

 

il_select_template_less02.png

Less or Equal

Select objects for which the value of the specified field is less than or equal to the Compare to value.

Like

Select objects for which the value of the specified string field is like the Pattern.    Syntax for patterns is syntax for the SQL LIKE Operator, a simplified pattern matching syntax that is much easier for most people than full regular expression syntax.

 

il_select_template_like01.png

In the illustration we find objects with a Name field that is like the pattern %o.  We choose Value in the pull down menu for the Pattern box and then enter the desired text pattern, no quotes.

 

il_select_template_like02.png

 

The SQL Like operator allows pattern matching using two wildcard characters, a % character that matches zero or more characters of any kind and the underscore _ character that matches any single character.   The pattern used above matches any string that ends in a lower case o character.   See the LIKE Operator topic for examples.

 

Lines

Select objects that are lines.

 

il_select_template_lines01.png

 

Choose Lines as the template, specify the geometry field in the active layer and press Replace Selection.

 

il_select_template_lines02.png

Line objects are selected.

 

Non-null Values

Select objects for which the value of the specified field is not NULL.

il_select_template_not_null01.png

In the illustration we find objects with a Zvalue field that is not NULL.  

il_select_template_not_null02.png

The Zvalue field in this example is a computed field that reports the Z value set for an object using the expression:

 

VectorValue(GeomCoordXYZ([Geom], 0),2)

 

Normalized Geoms

Select objects for which geoms have been normalized.

Not Equal

Select objects for which the value of the specified field is not equal to the Compare to value.

Null Values

Select objects for which the value of the specified field is NULL.

Points

Select objects that are points.

 

il_select_template_points01.png

 

Choose Points as the template, specify the geometry field in the active layer and press Replace Selection.

 

il_select_template_points02.png

Point objects are selected.

 

Text Contains

Select objects where the specified string field contains the specified sub-string.

 

il_select_template_text_contains01.png

In the illustration we find objects with a Name field that contains the sub-string ha. We choose Value in the pull down menu for the Search for box and then enter the desired text, no quotes.

 

il_select_template_text_contains02.png

 

Both alpha and charlie contain the sub-string ha.

Text Contains, Intl

Same as Text Contains, with the option to specify a language, and additional options to ignore case, accent, and symbols.

Text Ends with

Select objects where the specified string field ends with the specified sub-string.

Text Ends with, Intl

Same as Text Ends with, with the option to specify a language, and additional options to ignore case, accent, and symbols.

Text Matches Regexp

Select objects for which the value of the specified string field matches the regular expression Pattern.

 

il_select_template_matches_regexp01.png

In the illustration we find objects with a Name field that matches the regular expression pattern .+a.+.  We choose Value in the pull down menu for the Pattern box and then enter the desired rexexp pattern, no quotes.

 

il_select_template_matches_regexp02.png

 

In regular expression syntax, the dot and plus sign .+ combination matches one or more of any character.  The .+a.+ pattern used above therefore matches any string that has one or more characters followed by an a character that is then followed by one or more characters.  The result is to find all strings that contain the letter a, but not only at the very beginning or the very end of the string.

 

The values bravo and charlie are thus selected, because those words have a letter a inside the word.   The values alpha and delta are not selected because those words only have the letter a either at the beginning or the end of the word.   

 

See the Regular Expressions topic for details on regular expression syntax and examples of use.

 

Text Sounds like

Select objects for which the value of the specified string field sounds like the Compare to pattern, using the Soundex algorithm for English language.

 

il_select_template_sounds_like01.png

In the illustration we find objects with a Name field that in English pronunciation sounds like the pattern eko.  We choose Value in the pull down menu for the Compare to box and then enter the desired text, no quotes.

 

il_select_template_sounds_like02.png

 

The ch character sequence in the English word echo is pronounced like a hard k character, so the word echo is pronounced in English as though it were spelled eko and thus is selected.   Additional examples from the above table would be to use the pattern alfa to select the record for alpha, or to use the pattern charly to select the record for charlie.

 

See the discussion of the StringSoundex function in the SQL Functions topic.   See also the discussion of the Text Sounds like template in the Transform Templates - Boolean topic.

Text Starts with

Select objects where the specified string field starts with the specified sub-string.

Text Starts with, Intl

Same as Text Starts with, with the option to specify a language, and additional options to ignore case, accent, and symbols.

 

Spatial Selection Templates

Given two drawings in a map, spatial selection templates select objects in the active layer, called the source drawing, based upon a spatial relationship with an overlay drawing.    In the following examples we will use two drawings that appear as layers in a map.

 

eg_select_geoms_xxx01_00.pngeg_select_geoms_xxx01_00a.png

 

One drawing we call the Source Green drawing.   It shows objects that are points, areas and a line in green color, using diamond symbols for points. The Source Green drawing will be used as the source drawing.   The other drawing is called the Overlay Brown drawing.  It shows areas, lines and points in brown color and will be used as the overlay drawing.  The Overlay Brown drawing uses a formatting style for areas with horizontal line pattern and transparent fill color, so any objects in other layers within the areas can be seen through the areas.   The Overlay Brown drawing uses round symbols for points.  It will be used as the overlay drawing.

 

eg_select_geoms_xxx01_01.png

 

Seen together as layers in the map, we can see the various spatial relationships between objects in the two drawings.  

 

Geoms Adjacent

Available for maps that contain at least two drawing layers when one of the drawing layers is the active layer.  Select all objects in the source drawing that are adjacent to any object in the overlay drawing.   Mnemonic:  Source objects adjacent to Overlay objects.

 

eg_select_geoms_xxx01_02.png eg_select_geoms_xxx01_03.png

 

There are two objects in the source drawing that are adjacent to objects in the overlay drawing.   One of the areas in the source drawing is adjacent to an area in the overlay drawing.  One of the lines in the source drawing is adjacent to two of the lines in the overlay drawing.  The area and the line have been selected.

 

Geoms Contained

Available for maps that contain at least two drawing layers when one of the drawing layers is the active layer.  Select all objects in the source drawing that are contained by any object in the overlay drawing.   Mnemonic:  Source objects contained by Overlay objects.

 

eg_select_geoms_xxx01_04.png eg_select_geoms_xxx01_05.png

 

Four of the points within the source drawing are contained by area objects in the overlay drawing.   Those four points are shown in red selection color above, and are seen through the transparent fill color of the two areas in the overlay drawing.

 

Geoms Containing

Available for maps that contain at least two drawing layers when one of the drawing layers is the active layer.  Select all objects in the source drawing containing any object in the overlay drawing.  Mnemonic:  Source objects containing Overlay objects.

 

eg_select_geoms_xxx01_06.png eg_select_geoms_xxx01_07.png

Three of the areas in the source drawing are containing objects in the overlay drawing and are selected.

 

Geoms Intersecting

Available for maps that contain at least two drawing layers when one of the drawing layers is the active layer.  Select all objects in the source drawing intersecting any object in the overlay drawing.   Mnemonic:  Source objects intersecting Overlay objects.

 

eg_select_geoms_xxx01_08.png eg_select_geoms_xxx01_09.png

Three of the areas in the source drawing intersect objects in the overlay drawing.   The three areas intersect lines in the overlay drawing.    Note that an object which is entirely within an area in the source drawing is said to be contained by that area, and is not intersected.   Objects in the source drawing intersect an object in the overlay only if that object in the overlay is partially within and partially outside the source drawing object.

 

Geoms Touching

Available for maps that contain at least two drawing layers when one of the drawing layers is the active layer.  Select all objects in the source drawing touching any object in the overlay drawing.   Mnemonic:  Source objects touching Overlay objects.

 

eg_select_geoms_xxx01_10.png eg_select_geoms_xxx01_11.png

Any object in the source drawing which is adjacent, contained by, containing or intersecting any object in the overlay is also touching an object in the overlay.

 

 

Flipping Source and Overlay Drawings

To illustrate how choosing which drawing is the source drawing and which drawing is the overlay drawing makes a difference in which objects are selected, we can use the Brown drawing as the source and the Green drawing as the overlay.

 

eg_select_geoms_xxx01_12.png

 

We could do that without changing names, but in the illustration above and in the following examples we have renamed the drawings so the active layer, that is, the source drawing, is called Source Brown and the overlay drawing is called Overlay Green.

 

 

Geoms Adjacent

Available for maps that contain at least two drawing layers when one of the drawing layers is the active layer.  Select all objects in the source drawing that are adjacent to any object in the overlay drawing.  Mnemonic:  Source objects adjacent to Overlay objects.

 

eg_select_geoms_xxx01_13.png eg_select_geoms_xxx01_14.png

The template selects the two lines and one area in the Source Brown drawing which are adjacent to objects in the Overlay Green drawing.

 

Geoms Contained

Available for maps that contain at least two drawing layers when one of the drawing layers is the active layer.  Select all objects in the source drawing that are contained by any object in the overlay drawing.  Mnemonic:  Source objects contained by Overlay objects.

 

eg_select_geoms_xxx01_15.png eg_select_geoms_xxx01_16.png

 

The template selects points and one line in the Source Brown drawing that are contained by areas in the Overlay Green drawing.

 

Geoms Containing

Available for maps that contain at least two drawing layers when one of the drawing layers is the active layer.  Select all objects in the source drawing containing any object in the overlay drawing.  Mnemonic:  Source objects containing Overlay objects.

 

eg_select_geoms_xxx01_17.png eg_select_geoms_xxx01_18.png

 

The template selects two areas in the Source Brown drawing containing points in the Overlay Green drawing.

eg_select_geoms_xxx01_19.png

 

Red selection color fills in selected areas.   We can use the Layers panel to set transparency of the Source Brown layer to 50% so we can see through the red selected areas to view the points within the Overlay Green layer.

 

Geoms Intersecting

Available for maps that contain at least two drawing layers when one of the drawing layers is the active layer.  Select all objects in the source drawing intersecting any object in the overlay drawing.  Mnemonic:  Source objects intersecting Overlay objects.

 

eg_select_geoms_xxx01_20.png eg_select_geoms_xxx01_21.png

 

The template selects three lines within the Source Brown layer which intersect objects in the Overlay Green layer.

 

Geoms Touching

Available for maps that contain at least two drawing layers when one of the drawing layers is the active layer.  Select all objects in the source drawing touching any object in the overlay drawing.  Mnemonic:  Source objects touching Overlay objects.

 

eg_select_geoms_xxx01_22.png eg_select_geoms_xxx01_23.png

The template selects areas, lines and points in the Source Brown layer which touch objects in the Overlay Green layer.  

 

 

Symmetric Spatial Selection Templates

The Adjacent, Intersecting and Touching templates are symmetric, in that the same sets of objects are adjacent, intersecting or touching regardless of which is the source drawing and which is the overlay drawing.  The only question is which drawing is the source drawing, and thus the set of objects that are selected.

 

 

Geoms Adjacent

Available for maps that contain at least two drawing layers when one of the drawing layers is the active layer.  Select all objects in the source drawing that are adjacent to any object in the overlay drawing.  Mnemonic:  Source objects adjacent to Overlay objects.

 

eg_select_geoms_xxx01_03.png eg_select_geoms_xxx01_14.png

 

Geoms Intersecting

Available for maps that contain at least two drawing layers when one of the drawing layers is the active layer.  Select all objects in the source drawing intersecting any object in the overlay drawing.  Mnemonic:  Source objects intersecting Overlay objects.

 

eg_select_geoms_xxx01_09.png eg_select_geoms_xxx01_21.png

 

Geoms Touching

Available for maps that contain at least two drawing layers when one of the drawing layers is the active layer.  Select all objects in the source drawing touching any object in the overlay drawing.  Mnemonic:  Source objects touching Overlay objects.

 

eg_select_geoms_xxx01_11.png eg_select_geoms_xxx01_23.png

 

 

Asymmetric Spatial Selection Templates

The Contained and Containing templates are asymmetric in that the set of objects selected as contained or containing usually depends on which drawing is the source drawing and which is the overlay drawing.

 

Geoms Contained

Available for maps that contain at least two drawing layers when one of the drawing layers is the active layer.  Select all objects in the source drawing that are contained by any object in the overlay drawing.  Mnemonic:  Source objects contained by Overlay objects.

 

eg_select_geoms_xxx01_05.png eg_select_geoms_xxx01_16.png

 

Geoms Containing

Available for maps that contain at least two drawing layers when one of the drawing layers is the active layer.  Select all objects in the source drawing containing any object in the overlay drawing.  Mnemonic:  Source objects containing Overlay objects.

 

eg_select_geoms_xxx01_07.png eg_select_geoms_xxx01_18.png

 

 

Notes

 

Allow parallel execution - If checked (default) the template will allow execution using CPU parallelism in multiple threads with as many CPU cores as are available, providing faster performance.   Checking this box is equivalent to commanding THREADS SystemCpuCount() in SQL within templates.

 

Transition from pre-Radian products -  The Select panel provides within a single panel the functionality of the Selection Toolbar, Saved Selections pane and Selection Modes in pre-Radian versions of Manifold GIS.

 

Two meanings of "intersect" - There are two notions of what "intersect" should mean, both of which are used by Manifold.   Topology overlays use the classic set-theoretic meaning of "intersect," in which objects that are entirely contained by other objects are said to intersect as well.   A different meaning is used in Select panel templates and spatial overlays, where an object that is entirely contained within another object does not "intersect" that object but is contained by that object.  In Select panel templates and spatial overlays, an object only intersects another object if some part of the object is outside the other object and some part is within the other object.   This allows the use of contained and containing to provide different selection criteria instead of simply duplicating what intersect does in a selection.

 

See Also

Contents Pane

 

Contents - Select

 

Tables

 

Selection

 

Drawings

 

Example: Using the Select Panel Template Tab -  A sequence of actions using Select panel templates.

 

Example:  Using the Select Panel Saved Tab - How to save selections and then use them later.

 

Example: Construct JSON String using Select and Transform - Use the  Select and Transform panels to manually construct a JSON string using values from other fields in a table. Shows how we can manipulate text to build desired contents in a field.