Spatial Query

The Spatial Query module only allows query operations on geo-objects that might be associated with 2D graphic representations (points, lines and regions). Since geo-objects algebra operations may involve spatial restrictions, it would be essential characterize the spatial relationships that may be divided in (Güting, 1994):

  • topological relationships between two entities are defined in terms of intersections, inside, adjacent, invariant under translation, rotation and scale;
  • metric relationships: distance operations supposing the existence of a metric space (for instance,
    distance < 100);
  • directional relationships: above, below, north of, south of etc.

The definition of a minimum set of operators is a very controversial issue in the literature:

  • Freeman (1975) defines a set of 12 operators: near, far, touching, adjacent, left of, right of, inside, outside, above, below, upon, and beneath
  • Egenhofer (1994) uses: DC (disconnection), EQ (equality), PO (partial overlap), EC (external connection), TTP (tangential proper part), and NTTP (non tangential proper part).

Since there are many different proposals, it is very important to formalize the spatial relationships when we are dealing with geo-objects algebra for a well defined set of geographic objects (simple cases of regions with no holes and continuous lines).

We will be using the terms proposed by Clementi et al. (1993) for topological relationships analysis between point-line-area elements: Touch, Intersection, Inside, Cross, and Disjoint.

We say that a set of points w1 touches another set w2 if the only thing in common between them is inside the union of their borders, as shown on the figures below:

Figure 1 - Examples of the topological relationship touch: two areas (a, b), two lines (c, d), line and area (e, f, g), a point and a line (h) and a point and an area (i). Adapted from Clementini et al. (1993).

We say that a set of points is Inside another w2 set when the intersection of the two sets of points is the w1 set itself (see Figure 2 below). In this case we can also say that w2 contains w1. If, besides that, the set of points of w2 is inside the w1 set, we say that w1 set is equal to w2 set.

Figure  2 - Examples of the Inside relationship.

We say that the w1 line intersects the w2 line when the intersection happens in an internal point to both of them (notice that the intersection of their boundary points would be defined as Touch); similarly, a line intersects an area if the line is partially inside and outside this area.

We say that a set of points w1 covers a set w2, or, equivalently that a set of points w2 is covered by w1, when the results of their intersection is a figure with the same dimensions of both. This relationship is only valid for homogeneous elements.

Finally, two set of points are disjoint if their intersection is empty.

See the examples below:

Figure 3  - Examples of relationships:

1. Cross between two lines(a),line and area (b, c).
2. Intersection between two areas(d), two lines (e, f).
3. Disjoint between two areas (g), line and area (h), two points (i). (Adapted from Clementini et al. (1993)).

Relationships based on topology of geographic entities allow queries such as "list all public schools from Jardim Satélite district".

In case of directional relationship, SPRING implements the following criteria: North, South, East, West, Northwest, Northeast, Southeast, Southwest and Center.

The directional relationship is represented by a 3x3 matrix where the central element corresponds to the bounding box of the base element for comparison. The other cells correspond to the neighbor positions of the same dimension on the basic cardinal directions:

[1, 1] - Northwest; [1, 2] - North; [1, 3] - Northeast;
[2, 1] - West; [2, 2] - Center; [2, 3] - East;
[3, 1] - Southwest; [3, 2] - South and [3, 3] - Southeast.

The analysis is done from the position of the matrix central cell that contains the base element for comparison. The bounding boxes of the objects that might intercept the directional cells are used as comparison elements.

This kind of search allows queries such as: "list the schools located on the northeast of a certain district".

The metric relationship implemented in SPRING allows the use of proximity between objects as a search criterion. It is necessary to fix some boundaries for the distance using the operators "<" and ">=" and values provided directly on the interface.

The search using metric criterion allows queries such as: "list all schools located less than 500 m from the highway".

The "Data to be compared" item on the query interface is used to choose objects collections in cadastral maps that will be compared with elements from the comparison base. They must correspond to the features of the cadastral map active in the control panel.

The "Selection Option" item contains the following options:

All: selects all objects that are active on the query module.
New: performs a new query based on the options chosen and active objects.
Add: adds the new outcome, using all objects, to the set of current selected objects.
Refine: uses a query only on the current selected objects.

Check below the basic steps for spatial query operation in SPRING.

Spatial Query operation:

  1. visualize on the active screen and the Cadastral model IL where you want to perform the spatial query and click on Query...
  2. on the Visualizing Objects window, click on Edit - Spatial Query...
  3. choose the type of Operation (Topology, Direction or Metric) and the type of Relationship. For topological operations it is only possible to select a relationship at a time. For direction operations several relationships might be selected from the list. In case the operation is metric, the relationship list is disabled and the user must define a value in meters for the distance.
  4. choose the Objects category, IL and a Collection (if this is the case) that will be compared with the active data from the query. For example, imagine that the objects being queried are they District type and we want to know which districts are crossed by a certain River. In this case, we must select the object category River, the information layer where these objects are represented, and a collection that might be ALL (all objects will be represented) or any collection that has been previously defined ( generating collections modules).
  5. select a query option (All, New, Add, Refine - see below).
  6. click on Apply. The outcome is presented on the active screen.

Canceling a query:

  1. on the Visualizing Objects window, click on Edit - Reset Queries

 

See also:

Database Query
How to control Objects Visualization .
Attributes Query.
Spatial Query
Attributes Table.
Pointing and Photo Module.

Query Models.