Skip to content

User guide

QGIS Conefor is a plugin for the Open Source GIS software QGIS that allows to interact with the Conefor application.

This plugin includes an interface which can be used for preparing inputs to use by Conefor as a separate application.

Running Conefor algorithms from inside QGIS

This plugin also aims to provide a bridge between QGIS and Conefor, allowing you to run Conefor's landscape connectivity analysis algorithms from inside QGIS, through the QGIS Processing framework/toolbox.

This feature is still work-in-progress and is therefore not available yet. When ready, it will present a convenient environment for landscape and habitat analysis, enabling Conefor algorithms to be directly integrated in more complex workflows through models and scripts and use all other GIS algorithms included in the QGIS processing framework/toolbox.

Stay tuned for future updates on the landing of this feature.

Once installed, the plugin tools can be reached in different places:

  • From the main menu: vector > Conefor inputs
  • The Vector toolbar also shows a button to launch the plugin dialog
  • Processing toolbox (see below, "Using Conefor inside QGIS" paragraph)
Note

In QGIS the toolbars can be activated/deactivated by using the following menu:

_View > toolbars_

The content of a toolbar may vary depending on what tools/plugins are installed/active in a specific QGIS installation

Usage

This plugin has two main intended usage workflows:

  1. As a means for generating the Conefor input files (nodes and connections) from geospatial layers and then running the standalone Conefor application with the tese input files. For this you can either:

  2. Use the plugin's main dialog

  3. Use the Processing algorithms present in Processing toolbox > Conefor > Prepare input files

  4. As way to run the Conefor application from inside QGIS. In this workflow you can both prepare the Conefor input files and run the Conefor analysis by combining the Processing algorithms present in Processing toolbox > Conefor

Preparing the inputs for post-processing with Conefor

The icon/shortcut available in the Vector > conefor inputs menu or in the Vector toolbar provides access to an interface that allows you to create the input files to be then processed with the Conefor application. For information on how to use the Conefor application, see the Conefor user manual.

The tool allows to compute distance analysis and node (feature) queries:

  • Distance from edges (for polygon layers)
  • Distance from centroids (for polygon layers)
  • Compute area of polygons (for polygon layers)
  • Extract one attribute

The results are placed into (separate) text files (with the .txt file extension) inside an output folder.

For distance queries is available the option to compute also a vector layer that represents the segments with the minimum distance between the input features.

Upon opening the tool, it will load all currently selected vector layers. Additional layers can also be selected by adding rows to the tool's main table.

{Insert image of the dialog}

The options are described here below:

  • Layer: the list of loaded layers to be analyzed/queried. If the user mistakenly loads a layer that is not to be used, then it can double click on its name and a dropdown will show, allowing to choose any other proper layer loaded in the QGIS project.

  • NODE ID: this option allows to choose what is the attribute to be used as unique ID. The plugin is also able to autogenerate an ID

  • Node Attribute: this option allows the user to query (extract) one attribute from the table of attributes of the input layer. Results will be placed in a text file beside the "NODE ID" values.

    If you select the value, the plugin will the area of each feature as the node attribute. Areas are computed using the ellipsoid and units defined in the QGIS Project. You can manage them by going to the QGIS main menu Project > Properties... > General > Measurements

  • Remove layer/Add layer buttons: These buttons allow you to remove/add layers to be processed

  • Calculate node connections as:

    • Edge distances - When this option is active an output text file will be created and it will contain the minimum distance between the edges (boundaries) of each feature.

    • Centroid distances - When this option is active an output text file will be created and it will contain the minimum distance between the centroids of features.

  • Only use selected features: If a selection is made in the QGIS canvas (in one or more input layers) and this option is checked, then the analysis/queries will be run only using the selected features.

  • Lock field names to first layer: before running any analysis/query, for each layer it is mandatory to select a few options (a unique ID among the others, see below for details). If the number of layers to be analyzed/queried is high then this can become a tedious operation. By checking this option the user can force the tool to assume that the same analysis/queries have to be run for all the layers. The tool will also assume that all the layers have a unique ID with the same name.

  • Output directory: the folder where output Conefor nodes and connections files will be placed. The output file names contain the type of query and the layer name. For example, if the input file name is "espacios_natura2000" then all the possible outputs will be:

    • distances_centroids_espacios_natura2000.txt
    • distances_edges_espacios_natura2000.txt
    • nodes_calculated_area_espacios_natura2000.txt
    • nodes_NODE_ATTRIBUTE_espacios_natura2000.txt

    Note

    When running multiple times the same analysis/query then the output files will not be overwritten, instead an underscore and a progressive number is added at the end of the output file name, for example:

    • distances_centroids_espacios_natura2000_2.txt
    • distances_centroids_espacios_natura2000_2.txt
    • distances_centroids_espacios_natura2000_3.txt
    • ...
  • Run button: to run the analysis/queries.

When running, the plugin dialog will close itself and the processing will be taking place as a background task. The progress is displayed in QGIS status bar. You can also cancel the execution by clicking on the progress indicator and then clicking the cancel button.

When finished, the plugin displays a notification to let you know its work is done.