Selection based on spatial relationships

Introduction

Various forms of topological relationships  between spatial objects were discussed in  Topology. These relationships can be useful to select features as well. The steps to be carried out are:

  1. select one or more features as the selection objects; and

  2. apply a chosen spatial relationship function to determine the selected features that have that relationship with the selection objects.

Explanation

Selecting features that are inside selection objects

This type of query uses the containment relationship between spatial objects. Obviously, polygons can contain polygons, lines or points, and lines can contain lines or points, but no other containment relationships are possible.

Figure a illustrates a containment query. Here, we are interested in finding the location of medical clinics in Ilala District. We first selected all areas of Ilala District using the technique of selection by attribute condition District = “Ilala”. Then, these selected areas were used as selection objects to determine which medical clinics (as point objects) were within them.

Figure: Spatial selection using topological relationships: (a) selection of medical clinics (dark purple) located inside the selected district (violet); (b) selection of roads (dark purple) that are partially located in the selected district (violet); (c) selection of the areas (dark purple), adjacent to the selected urban industrial area (violet); (d) selection of roads within 200 m of a clinic.

Selecting features that intersect

The intersect operator identifies features that are not disjoint. Figure b provides an example of spatial selection using the intersect relationship between lines and polygons. All roads intersecting Ilala District were selected.

Selecting features that are adjacent to selection objects

Adjacency is the meet relationship described in the subsection Topology. The adjacency operator identifies those features that share boundaries and, therefore, applies only to line and polygon features. Figure c illustrates a spatial adjacency query. We want to select all parcels adjacent to an industrial area. The first step is to select the industrial area (in dark blue) and then apply the adjacency function to select all land use areas (delineated in light blue) that are adjacent to it.

Selecting features based on their distance

One may also want to use the distance function of a GIS as a tool for selecting features. Such selections can be searches for features within a given distance of the selection objects, at a given distance, or even beyond a given distance. There is a whole range of selections of this type. For example:

  • Which medical clinics are within 2 km of a selected school? (Information needed for the school’s emergency procedures.)

  • Which roads are within 200 m of a medical clinic? (These roads must have a high priority for road maintenance.)

Figure d illustrates a spatial selection using distance. In this case, we executed the selection of the second example directly above. Our selection objects were all clinics, and we selected the roads that pass within 200 m of a clinic. For situations in which we know the distance criteria to use—for selections within, at or beyond that distance value—the GIS has many (straightforward) computations to perform. Things become more complicated if the distance selection condition involves the word “nearest” or “farthest”. The reason is that not only must the GIS compute distances from a selection object A to all potentially selectable features F , but also that it must find the feature F that is nearest to (or farthest away from) object A. So, this requires an extra computational step to determine minimum (maximum) values. Most GIS packages support this type of selection, though the mechanics (“the buttons to use”) differ among packages.

 

Learning outcomes

  • 11 - Spatial analysis: classes of functions

    Classify and explain spatial analysis functions (measurements, classification, overlay, neighbourhood and connectivity) in a raster and vector environment (level 1 and 2).

Prior knowledge

Outgoing relations

  • Selection based on spatial relationships is a kind of Query

Incoming relations

Learning paths