A plugin reporting overlapping GIS datasets
GTS Recommended - Use Geospatial or ArcGIS 10.8 (BCGW queries are very slow if run locally)
- Create a new profile in QGIS if desired (Settings/User Profiles/New Profile)
- In File Explorer, head to
...\script_whse\python\Reporting\In_Progress\dissect
and runinstall.bat
- When prompted, hit enter or select the QGIS profile you'd like to install on
- Restart QGIS if necessary
- Download repo
- Copy
example_config.yml
to the root folder and rename toconfig.yml
- Modify optional default parameters as desired
- Run
install.py
:- Open QGIS and run the script from the Python Console (
CTRL+ALT+P
): 1) Show editor, 2) Open script, 3) Run script - if you have a standalone QGIS build, simply run
install.bat
(and changebcgov_qgis_boiler_plate
ininstall.py
to your package) - in either case, you will be prompted to select a QGIS profile to install on. You can simply press enter to select the default profile.
- Open QGIS and run the script from the Python Console (
- Configure
data_config.xlsx
as desired.
- Modify default parameters in
config.yml
- then runinstall.bat/py
again- Defaults can also be set in QGIS after install in Settings > Options > Advanced > dissect.
- Modify html
templates
for output reports - Configure protected tables in
protected.yml
- Protected tables will provide only intersect summary stats - geometries will not be exported.
- Start QGIS
- Add a file that contains your area of interest polygon (or create a new temp layer )
- Open the Processing Toolbox (CTRL+ALT+T) and select
dissect
from Scripts at the bottom of the toolbox
- Select your area of interest
- Add your database credentials (+).
This login will be stored in an encrypted file within your QGIS profile. If you haven't done so previously, you will be asked to set a master password to edit/view stored configurations - this can be whatever you want.
Give the configuration a name and enter the username and password for the database you are accessing (e.g. BCGW)
- If desired, check 'Add overlapping interests to map' to have intersecting features added in QGIS (including all original attributes).
- Run! (Expected runtimes are roughly 2 min for a 100 ha AOI or 8 min for a 10 000 ha AOI with the default Terrestrial Datasets configuration)
When complete, the Results Viewer panel should open on the bottom right with a hyperlink directly to the report file. The html report file contains summary statistics as well as geospatial data for all interests (except protected tables, which have summary stats only).
Use the buttons below the map to filter interests by category. Use the 'Draw on map' switch to make interests visible on the map.
At the bottom of the report page, failed layers, ie data which could not be processed and are not included in the report, are listed. The comment included should provide direction for how to resolve the issue, if possible, or whether perhaps you lack access to the requested data.
We encourage contributions. Please see our CONTRIBUTING guidelines. BC Government employees should also ensure they review BC Open Source Development Employee Guide
- Contribute tools and plugins into tools, standalone scripts and modules to scripts, and small snips and script examples to recipes.
- Please do your best to document your scripts and provide tool documentation
Copyright 2019 BC Provincial Government
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.