Skip to main content

Generate mviewer XML configurations from QGIS Server projects and WMS capabilities.

Project description

pymviewer

pymviewer generates mviewer XML configuration files from QGIS Server projects and WMS GetCapabilities documents.

Install

python -m pip install -e qgisxmviewer

CLI

Generate from a QGIS project:

pymviewer from-qgs \
  --project /path/to/project.qgs \
  --output /path/to/config.xml \
  --service-url http://localhost:90/ogc/data

Generate from a WMS GetCapabilities file:

pymviewer from-capabilities \
  --capabilities /path/to/GetCapabilities.xml \
  --output /path/to/config.xml \
  --service-url http://localhost:90/ogc/data

Python API

from pathlib import Path
from pymviewer.qgisxmviewer import create_mviewer_config_from_wms_capabilities

create_mviewer_config_from_wms_capabilities(
    Path("data_getcapabilities.xml"),
    Path("data.xml"),
    "http://localhost:90/ogc/data",
)

Notes

  • mviewer layer id values are normalized and unique.
  • WMS layer names are preserved in the layers attribute.
  • WMS legend URLs are encoded and can be rebased to an override service URL.
  • .qgs projects are supported. .qgz archives are not supported yet.

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

pymviewer-0.1.0.tar.gz (27.1 kB view details)

Uploaded Source

Built Distribution

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

pymviewer-0.1.0-py3-none-any.whl (30.5 kB view details)

Uploaded Python 3

File details

Details for the file pymviewer-0.1.0.tar.gz.

File metadata

  • Download URL: pymviewer-0.1.0.tar.gz
  • Upload date:
  • Size: 27.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pymviewer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cae832f41dd08da2b7053eb514481971138c56ef7b4c2a5cbf24c21c5c524588
MD5 73edecfb1d4c7bafb4334060cdc66765
BLAKE2b-256 6387898d6a7d1ecb535291cdfe266ade1f782487f55bd20e96d15224adb29436

See more details on using hashes here.

File details

Details for the file pymviewer-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pymviewer-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 30.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pymviewer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 927268d5fd478e11781833c99b5bc32690b5ee28601cb480d8b257f43f32c2e1
MD5 876087b81418930e9f2f735b24451976
BLAKE2b-256 98d3730c6779fc3f5faa920e963a38b2f32fdedfbe92f2601c21fbe3869e3781

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