` `

Complemento de Consulta Espacial

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.

Operações possíveis:

  • Contém

  • Igual

  • Sobrepõe

  • Cruza

  • Intersecta

  • Disjunto

  • Toca

  • Dentro

Usando complemento

Como exemplo, nós queremos encontrar as regiões no conjunto de dados do Alaska que contém os aeroportos. Os seguintes passos são necessários:

  1. Start QGIS and load the vector layers regions.shp and airports.shp.
  2. Load the Spatial Query plugin in the Plugin Manager (see Diálogo de Complementos) and click on the spatialQuery Spatial Query icon, which appears in the QGIS toolbar menu. The plugin dialog appears.
  3. Selecione a camada regions como camada fonte e airports como camada de elementos referência.

  4. Selecione ‘Contém’ como operador e clique [Aplicar].

Now you get a list of feature IDs from the query and you have several options, as shown in figure_spatial_query.

  • 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.
  • Você pode checkbox Zoom no item ou exibição checkbox Mensagem de Log.

  • 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.
../../../_images/spatial_query_sample.png

Spatial Query analysis - regions contain airports