Skip to main content

QGIS plugin for visualizing quality check results.

Project description

quality-result-gui

QGIS plugin for visualizing quality check results.

Plugin

Not implemented yet.

Library

To use this library as an external dependency in your plugin or other Python code, install it using pip install quality-result-gui and use imports from the provided quality_result_gui package. If used in a plugin, library must be installed in the runtime QGIS environment or use qgis-plugin-dev-tools to bundle your plugin with runtime dependencies included.

Minimal working example (with JSON file)

For quality dock widget to work, a subclass of QualityResultClient needs to be first implemented. Instance of the created API client class is then passed to QualityErrorsDockWidget. For a real-world application, a separate backend application is needed for checking data quality and provide the quality check results for the QGIS plugin.

Example of the expected api response can be seen in this file. Example parser class for json response is also provided for the following example to work:

import json

from qgis.utils import iface

from quality_result_gui.api.quality_api_client import QualityResultClient
from quality_result_gui.api.types.quality_error import QualityError
from quality_result_gui_plugin.dev_tools.response_parser import QualityErrorResponse
from quality_result_gui.quality_error_manager import QualityResultManager


class ExampleQualityResultClient(QualityResultClient):

    def get_results(self) -> Optional[List[QualityError]]:
        """
        Retrieve latest quality errors from API

        Returns:
            None: if no results available
            List[QualityError]: if results available

        Raises:
            QualityResultClientError: if request fails
            QualityResultServerError: if check failed in backend
        """
        full_path_to_json = "some-path/example_quality_errors.json"
        example_response = json.loads(Path(full_path_to_json).read_text())

        return QualityErrorResponse(example_response).quality_results

    def get_crs(self) -> QgsCoordinateReferenceSystem:
        return QgsCoordinateReferenceSystem("EPSG:3067")



api_client = ExampleQualityResultClient()
quality_manager = QualityResultManager(api_client, iface.mainWindow())
quality_manager.show_dock_widget()

Development of quality-result-gui

See development readme.

License & copyright

Licensed under GNU GPL v3.0.

This tool is part of the topographic data production system developed in National Land Survey of Finland. For further information, see:

Copyright (C) 2022 National Land Survey of Finland.

CHANGELOG

2.0.9 - 2025-01-29

  • Fix: Fix missing localization by including them in setuptools build

2.0.8 - 2024-09-27

  • Feat: Add finnish translations
  • Fix: Set annotation rendering order based on priority

2.0.7 - 2024-01-17

  • Fix: Process modifications in quality error tree correctly when multiple filters are present

2.0.6 - 2024-01-05

  • Fix: Show correct results when user processed filter is toggled with map extent filter active

2.0.5 - 2023-12-12

  • Fix: Filter newly inserted quality error rows correctly with user processed and map extent filters

2.0.4 - 2023-10-05

  • Fix: Redraw map when an error is selected and errors are not visualized on map

2.0.3 - 2023-09-12

  • Fix: Include .qm translation files to the zip generated by release workflow action

2.0.2 - 2023-09-06

  • Fix: Make Finnish translations visible

2.0.1 - 2023-07-12

  • Feat: Add Finnish translations

2.0.0 - 2023-07-11

  • Refactor!: replace hierarchical representation of quality errors with a flat quality error list

1.1.6 - 2023-05-23

  • Feat: Add functionality to display quality error feature type and attribute names from layer aliases.

1.1.5 - 2023-03-29

  • Fix: Do not zoom to error when geometry is null geometry

1.1.4 - 2023-03-08

  • Fix: Show correct error count when errors are filtered
  • Fix: Remove selected error visualization from map when error is removed from list

1.1.3 - 2023-03-03

  • Feat: Add method to hide dock widget and functionality to recreate error visualizations

1.1.2 - 2023-03-01

  • Fix: Do not hide filter menu when a filter is selected
  • Fix: Fix missing marker symbol from line type annotations
  • Feat: Allow configuring quality layer styles
  • Feat: Add keyboard shortcut for visualize errors on map

1.1.1 - 2023-02-23

  • Feat: Change Show user processed filter into checkbox selection

1.1.0 - 2023-02-16

  • Feat: Add optional extra info field to quality error. Extra info is displayed in the tooltip of error description and may contain html formatted text.
  • Refactor: Remove language specific description fields from quality error and include only a single field for description.

1.0.0 - 2023-02-14

  • Feat: Added an API to add custom filters for errors.
  • Fix: Hide empty branches from quality error list when user processed errors are hidden and user processes all errors for a feature
  • Fix: Error layer stays visible after minimizing QGIS.

0.0.4 - 2022-12-28

  • Feat: Emit mouse event signal for selected error feature
  • Feat: New filter to filter quality errors by error attribute value
  • Feat: Add tooltip for quality error description
  • Feat: Update data in tree view partially when data changes
  • Fix: Minor styling fixes of tree view
  • Fix: Visualize error when description is clicked

0.0.3 - 2022-12-15

  • Fix: Use glob paths for missing build resource files

0.0.2 - 2022-12-14

  • Fix: Fix missing ui and svg files by including them in setuptools build

0.0.1 - 2022-12-14

  • Initial release: QGIS dock widget for visualizing quality check results

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quality_result_gui-2.0.9.tar.gz (61.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quality_result_gui-2.0.9-py3-none-any.whl (85.2 kB view details)

Uploaded Python 3

File details

Details for the file quality_result_gui-2.0.9.tar.gz.

File metadata

  • Download URL: quality_result_gui-2.0.9.tar.gz
  • Upload date:
  • Size: 61.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for quality_result_gui-2.0.9.tar.gz
Algorithm Hash digest
SHA256 18622a193663cd1873a2cb488dcb828c627bccd1bce389a0ae7a4e07d6786caa
MD5 947a44f7eb16adf02acf7f5a2e3cc6c2
BLAKE2b-256 cd0f31c2ef7b7e3a4420cc222daf426fa68a56e50fff210caeaaf0282017bb90

See more details on using hashes here.

File details

Details for the file quality_result_gui-2.0.9-py3-none-any.whl.

File metadata

File hashes

Hashes for quality_result_gui-2.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 acce0f883a51108bf12fe59ca6ed4d0785e7bc3cb56b4a4815efcd59cc25d293
MD5 e402e2762e5b8c0dd341d89543a8d4f7
BLAKE2b-256 0b142ccef347a4e4f361ab8e5c802781a8031f0f0bd1e449b4adac9fcd77c4d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page