Spatial extension of the SELVANS information system - a forest managment application | Read-only mirror of https://github.com/sitn/SelvansGeo — Canton de Neuchâtel. Issues & pull requests at the source.
  • Python 96.9%
  • Makefile 2.5%
  • PowerShell 0.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Michael Kalbermatten edd3332201
Merge pull request #39 from sitn/mssql
Use Windows authentication to connect to SQL Server
2025-09-16 10:21:55 +02:00
core Use Windows authentication to connect to SQL Server 2025-09-02 15:49:33 +02:00
datamodel Update model 2022-09-23 16:34:17 +02:00
images add output example 2017-07-25 09:17:00 +02:00
scripts Add deploy script 2022-09-23 16:34:56 +02:00
.gitignore Lost connection after project reload 2018-11-05 16:09:00 +01:00
__init__.py Licensing stuff 2018-05-08 15:48:00 +02:00
icon.png update icon style to make the difference between 2 and 3 versions 2017-07-24 11:12:44 +02:00
LICENSE Licensing stuff 2018-05-08 15:48:00 +02:00
Makefile public_version_pep8_checked 2017-06-30 15:28:46 +02:00
metadata.txt Use Windows authentication to connect to SQL Server 2025-09-02 15:49:33 +02:00
pb_tool.cfg Add GUI compile files & re-compile GUI 2019-08-15 13:25:22 +02:00
README.md README 2022-09-23 16:36:52 +02:00
resources.py Add GUI compile files & re-compile GUI 2019-08-15 13:25:22 +02:00
resources.qrc public_version_pep8_checked 2017-06-30 15:28:46 +02:00
resources_qgis2.py Backward compatibility QGIS3=>2 2017-07-25 08:32:11 +02:00
selvansgeo.py OID and Yaml warning 2022-09-23 16:33:58 +02:00
selvansgeo.yaml_template rename yaml template and update it 2017-07-25 08:47:18 +02:00
selvansgeodialog.py Backward compatibility QGIS3=>2 2017-07-25 08:32:11 +02:00
ui_selvansgeo.py Update version 2025-09-16 10:16:10 +02:00
ui_selvansgeo.ui Update version 2025-09-16 10:16:10 +02:00
ui_selvansgeo_qgis2.py Backward compatibility QGIS3=>2 2017-07-25 08:32:11 +02:00

SelvansGeo

Spatial extension of the SELVANS information system - a forest managment application

This plugin is not generic and is designed for specific database structure dedicated to forest surveys analysis and forest cadastre edition.

QGIS 3 and QTDesigner

The UI can be edited using QTDesigner that is shipped with QGIS standalone installation. On windows, you'll usually find it following a path analog to: C:\Program Files\QGIS 2.99\apps\Qt5\bin\designer.exe

Be sure to have the Python Script folder in your path in order to be able to use the commands here under.

Building UI for QGIS 3

If any changes are made to the UI, this one should be rebuilt using the following commands:

pyrcc5 -o resources.py resources.qrc
pyuic5 -o ui_selvansgeo.py ui_selvansgeo.ui

You do not need to install pyQT as it is already installed with QGIS (C:\Program Files\QGIS 3.22.3\apps\Python39\Scripts)

To use these commands, you need to open an cmd and define all the needed environment variables

You can inspire ourself with the following file: C:\Program Files\QGIS 3.22.3\bin\qgis.bat

This one sets all the needed variables, just get rid of the last line in order not to start QGIS.

Most important, do not modify this file!! Copy it and create another one.

Configuration and default QGIS project

The configuration file (selvangeo.yaml) must be created and edited before starting the plugin

Simply fill the values here https://github.com/sitn/SelvansGeo/blob/master/selvansgeo.yaml_template, rename the file to .yaml and reload the plugin

The default QGIS project must be copied in a qgisprj directory at plugin root level.

Example of analysis output: tree volume by hectare at last survey.

Volume by hectare

Developer environment

To easily develop and link the plugin, one should consider creating a linked folder between the QGIS Python plugin folder and the work/development folder. To do so, you can use a symlink:

  1. Create your working folder and link it to your Github repositories (something like c:/projects/selvansgeo)
  2. In the Python plugin folder of QGIS (if on Windows 64bits, it would be somewhere like C:\Program Files\QGIS 3.0\apps\qgis\python\plugins.
  3. Open a command prompt as Administrator and run:
    mklink /D "c:\Program Files\QGIS 3.0\apps\qgis\python\plugins\selvansgeo" "c:\projects\selvansgeo"

Now you can develop in your working and tested it live in QGIS (using the plugin reloader).

Deployment

First run the deployment script:

    .\scripts\deploy.ps1

Then copy the created file to the QGIS plugin repository.

Do not forget to edit the qgis plugin XML to add the new created version.