Outdated version of the documentation. Find the latest one here.

Plugin Spatial Query

The spatialQuery Spatial Query Plugin allows you to make a spatial query (i.e., select features) in a target layer with reference to another layer. The functionality is based on the GEOS library and depends on the selected source feature layer.

Gli operatori spaziali sono:

  • Contiene

  • E’ uguale a

  • Sovrappone

  • Attraversa

  • Interseca

  • E’ disgiunto

  • Tocca

  • E’ contenuto

Come usare il plugin

Come esempio: trova le regioni dell’Alaska che contengono areoporti. Sono necessari i seguenti passaggi:

  1. Start QGIS and load the vector layers regions.shp and airports.shp.
  2. Load the Spatial Query plugin in the Plugin Manager (see La finestra di dialogo Plugins) and click on the spatialQuery Spatial Query icon, which appears in the QGIS toolbar menu. The plugin dialog appears.
  3. Seleziona il layer regions come layer principale airports come layer di riferimento.

  4. Seleziona l’operatore ‘Contains’e clicca [Apply].

Ora avrai una lista di risultatu IDs dall’interrogazione, come mostra la figure_spatial_query_1

  • Click on selectSubsetLayer Create layer with list of items.
  • Select an ID from the list and click on selectCreateLayer Create layer with selected.
  • Select ‘Remove from current selection’ in the field And use the result to selectString.
  • You can checkbox Zoom to item or display checkbox Log messages.
  • Additionally in Result Feature ID’s with the options ‘Invalid source’ and ‘Invalid reference’ you can have a look at features with geometry errors. These features aren’t used for the query.

Figure Spatial Query 1:


Spatial Query analysis - regions contain airports