Select - Geometry: Spatial

The Spatial template appears in the Select pane template list for maps that contain at least two drawing layers, when a geometry field of type geom, geommfd, or geomwkb, has been picked. The Spatial Select pane template select objects in the designated drawing also called the source drawing, based upon a spatial relationship objects in a second drawing, called the Overlay drawing.

The following examples use two drawings that appear as layers in a map.

One drawing we call the Green drawing.   It shows objects that are points, areas and a line in green color, using diamond symbols for points. The Green drawing will be used as the designated drawing.

The other drawing is called the Brown drawing.  It shows areas, lines and points in brown color and will be used as the overlay drawing.  The 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 Brown drawing uses round symbols for points.  It will be used as the overlay drawing.

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

 Spatial Available for maps that contain at least two drawing layers.  Select by making spatial comparisons between objects in the designated drawing (also called the source drawing) and objects in the Overlay drawing.  For example, we can select all objects in the designated drawing which are touching any object in the overlay drawing.   Operation options:   adjacent -  Select all objects in the designated drawing that are adjacent to any object in the overlay drawing. contained - Select all objects in the designated drawing that are contained by any object in the overlay drawing. containing - Select all objects in the designated drawing that are containing any object in the overlay drawing. intersecting - Select all objects in the designated drawing intersecting any object in the overlay drawing.   In this template, 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.   touching - Select all objects in the designated drawing touching any object in the overlay drawing.     Launch the template by choosing a geometry field in the Select pane and then double-clicking the Spatial template.  When the template launches we can specify options. Spatial : adjacent Select all objects in the designated drawing that are adjacent to any object in the overlay drawing.   An object in the designated drawing is adjacent to an object in the overlay drawing if both objects have at least one boundary location in common but have no interior locations in common.  Any locations in common between an object in the designated drawing and an object in the overlay drawing are only on the boundaries of the objects, and nowhere else.   An object that is adjacent to another object also touches that other object, but it does not intersect the other object.  Objects that are contained by or which contain another object are not adjacent.     The operation selects all objects in the Green layer that are adjacent to any object in the Brown layer.   The selected line is adjacent at each end to a brown line.   The selected triangular area is adjacent to a brown triangular area.     Note that pushing the Preview button also works.   The above shows a preview of the two objects, a line and a triangular area drawn using blue preview color, that will be selected by the adjacent operation. Spatial : contained Select all objects in the designated drawing that are contained by any object in the overlay drawing.   An object in the designated drawing is contained in an object in the overlay drawing only if all locations in the object in the designated drawing are entirely within the object in the overlay drawing.   An object that is contained in another object also touches that other object but it is not adjacent to and it does not intersect that other object.     The operation selects all objects in the Green layer that are contained in any object in the Brown layer.   The four green points are selected because they are contained in the two brown triangles. Spatial : containing Select all objects in the designated drawing that are containing any object in the overlay drawing.   An object in the designated drawing contains an object in the overlay drawing if all locations in the object in the overlay drawing are entirely within the object in the designated drawing.   An object that contains another object also touches that other object but it is not adjacent to and it does not intersect that other object.     The operation selects all objects in the Green layer that are containing any object in the Brown layer.   The three green triangles are selected because they contain two brown points, three brown points, and one brown line, respectively. Spatial : intersecting Select all objects in the designated drawing intersecting any object in the overlay drawing.     An object in the designated drawing  intersects an object in the overlay drawing if both objects have at least one interior location in common and also at least one exterior location not in common.   An object that intersects another object also touches that other object, but it is not adjacent to, is not contained in, and does not contain the other object.     The operation selects all objects in the Green layer that are intersecting any object in the Brown layer.   The three green triangles are selected because they each intersect a brown line.    Note that the two green triangles which contain three brown points or a single brown line are not selected, since containing is not intersecting. Spatial : touching Select all objects in the designated drawing touching any object in the overlay drawing.   An object in the designated drawing touches an object in the overlay drawing if there is any location in common between the two.   One object that touches another object may or may not be intersecting, and it may or may not be adjacent to the other object.  Objects that are contained by or which contain another object are also touching.     The operation selects all objects in the Green layer that are touching any object in the Brown layer.   All of the green objects are selected, except the single green point that has no location in common with any brown object.

Notes

Two meanings of "intersect" - There are two notions of what "intersect" should mean, both of which are used by Manifold.   Topology overlays, as discussed in the Topology Overlays topic, 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 pane templates and spatial joins in Join, where an object that is entirely contained within another object does not "intersect" that object but is contained by that object.  In the Join dialog and in Select pane templates, 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.

Virtual drawings - Operations on geometry can use any table with a geometry field. The geometry field does not have to be part of a spatial index, although having such an index will frequently help performance. A query function that operates on geometry can accept either a physical drawing component stored in a database, or a virtual drawing created on a geometry field (using the ComponentFieldDrawing function) of a table or of a query component.  A virtual drawing supports all functions available for regular components:  for example, it can report its coordinate system or the name of the underlying component.  Both physical and virtual drawings can be limited to using only selected records with the result being accepted as a drawing by query functions.

Select - Geometry

Select - Geometry: Expression

Select - Geometry: Null

Select - Geometry: Search

Select Reference

Select - Expression