kartoza / GeoContextQGISPlugin

A QGIS Plugin for the GeoContext API
GNU General Public License v3.0
1 stars 2 forks source link

GeoContext QGIS plugin

A QGIS plugin which retrieves data for a provided geographic position. Data is fetched from the GeoContext data server which can make use of WMS and WFS. The plugin allows the user to click in the QGIS map canvas, which will fetch the information for the location. Results are shown in a table. Another feature of the plugin is a processing tool. The tool retrieves values for each point in a point layer. Results are stored in the attribute in a newly created layer. If any transformation are required it is automatically done by the plugin. The following data option are available:

Visit the GeoContext home page for more details.

This plugin is Free and Open Source Software and is released under the GPL V2. See the LICENSE file included with the plugin (and in this repository) for more information about this license.

Installing the plugin

There are several approach to which a user can install a plugin:

Plugin manager

This will be the easiest way to install the plugin:

  1. Click on 'Plugins' -> 'Manage and install plugins' in QGIS;
  2. Click on the 'All' tab; and

qgis_install

  1. Click 'Install plugin'.

ZIP file

A zip file of the plugin can be downloaded and installed as follows:

  1. Go to the pluging gitHub repository: https://github.com/kartoza/GeoContextQGISPlugin;
  2. Click on 'Code' -> 'Download ZIP';

github_zip

  1. In QGIS, click on 'Plugins' -> 'Manage and install plugins';
  2. Click on the 'Install from ZIP' tab;
  3. Select the plugin ZIP file; and
  4. Click 'Install plugin'.

qgis_zip

Repository clone

The user can also directly clone the repository and manually copy it to the QGIS plugin folder:

  1. Clone the reposity using git: 'git clone https://github.com/kartoza/GeoContextQGISPlugin';
  2. Go to the QGIS plugins folder. It should be similar to 'C:\Users\USERNAME\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\GeoContextQGISPlugin', where USERNAME is your Windows username;
  3. Copy the cloned folder to the plugin's folder; and
  4. Enable the plugin in the QGIS Plugin manager. A QGIS restart might be required.

Plugin guide

This section provides a short guide on how to use the plugin, ranging from how to use the panel, the processing tool, and how to make changes to the option/settings of the plugin. Printscreens are also provided to make the guide easy to understand.

Plugin menu and toolbar

The toolbar can be used to open the GeoContext docking panel. The panel allows the user to select point locations using the cursor. The figure which follows indicate, highlighted in red, the GeoContext toolbar.

toolbar

To open the processing tool or the option's dialog for the plugin, the user can go to 'Plugins' -> 'GeoContext'. Here is an example of the menu:

plugin_menu

Panel

This panel can be opened when clicking on the toolbar button. When the panel has been opened, the user can select a point location using the cursor. The coordinates of the point location will be retrieved, which will then be used to perform a request for the selected registry type and key name. Here is a quick explanation of each of the panel's features:

panel

Processing tool

The processing tool can be accessed via the QGIS toolbox. This tool allows the user to provide a point vector file as input to perform requests with. A request will be performed for each of the points contained by the vector layer. Any points with no geometry will be ignored. Here is a quick explanation on the parameters of the tool:

processing_dialog

Results from processing tool

The figure which follows show the extracted elevation values for points. This has been obtained using 'Service' registry type.

result_service

Notable is that the attribute table which follows contains a large number of added values/attributes. This is because the request were done on a 'Collection', in this case on 'Global climate collection' - the results therefore contains several attributes, e.g. bioclimatic conditions, rainfall, temperature, etc.

result_collection

Options dialog

The option's dialog is used to set the settings for the plugin. It can be accessed by clicking on 'Plugins' -> 'GeoContext' -> 'Options'. Here is a quick explanation of the available options:

options

Contributing

If you would like to contribute an enhancement, bug fix, translation etc. to this plugin, please make a fork of the repository on Github at:

https://github.com/kartoza/GeoContextQGISPlugin

Then make your improvements and make a Github pull request. Please follow the existing coding conventions if you want us to include your changes.

This plugin was implemented by:

Kartoza (Pty) Ltd. https://kartoza.com/

Divan Vermeulen divan@kartoza.com

kartoza_logo