Coverage for gws-app/gws/plugin/qgis/__init__.py: 0%
1 statements
« prev ^ index » next coverage.py v7.8.0, created at 2025-04-17 01:37 +0200
« prev ^ index » next coverage.py v7.8.0, created at 2025-04-17 01:37 +0200
1"""QGIS support.
3The QGIS plugin supports parsing and writing QGIS projects, stored in paths or in a Postgres database.
4The parsing is based on directly reading project XML files; no QGIS APIs are used.
5The projects are parsed into capabilities objects, from which QGIS-based layers and finders can be created.
6The rendering of QGIS layers is achieved by sending requests to a QGIS Server instance.
9Project and layer extents
10-------------------------
12QGIS does not provide a way to obtain complete project and layer extents, with respect to symbology.
13Only data-based extents are known at parse time. We compute extents with the following logic:
15- if a project provides an explicit WMS extent (Project Properties->QGIS Server->WMS), this extent is used as project render extent (`bounds`)
16- otherwise, if `useCanvasExtent` is true, the canvas extent is used
17- otherwise, the project render extent is set to the union of layers' data extents + the configured `extentBuffer`
18- if the render extent is empty, the CRS extent is taken
19- for layers, the data extent is either an explicit extent (Layer Properties->Metadata->Extent) or an implicit data extent
20- the layer data extent is used as a "zoom" extent, but when rendering a layer, the project extent is used
21"""
23from . import provider, project, caps