Skip to main content

Simple client for DOV WMS services.

Project description

dovwms

Release Build status codecov Commit activity License DOI

Simple client for DOV WMS services.

Lightweight Python client to fetch soil texture and elevation data from Belgian WMS services (DOV and Geopunt). The package provides convenience clients for the two services and a small helper to fetch a soil profile at a point location.

Features

  • Fetch clay/silt/sand fractions for standard depth layers from DOV WMS
  • Fetch elevation from Geopunt WMS
  • Small, testable API with helpers for convenience and easy mocking

Installation

Requires Python 3.11+. Install from PyPI (when released):

pip install dovwms

For development from source (recommended):

git clone git@github.com:zawadzkim/dovwms.git
cd dovwms
make install   # installs dev dependencies (uses poetry or pip in Makefile)

You can also install the package in editable mode:

python -m pip install -e .

Quickstart

Simple usage with the convenience function:

from dovwms import get_profile_from_dov

# Coordinates in the default CRS (EPSG:31370 / Lambert72)
profile = get_profile_from_dov(247172.56, 204590.58, fetch_elevation=True)

if profile is None:
    print("Could not fetch profile")
else:
    # profile is a dict with keys 'layers' (list) and optional 'elevation'
    print("Elevation:", profile.get('elevation'))
    for layer in profile['layers']:
        print(layer['name'], layer['sand_content'], layer['silt_content'], layer['clay_content'])

Using the low-level clients:

from dovwms import DOVClient, GeopuntClient
from shapely.geometry import Point

client = DOVClient()
pt = Point(247172.56, 204590.58)

# Fetch texture layers
profile = client.fetch_profile(pt, fetch_elevation=False)

# Fetch elevation directly
g = GeopuntClient()
elev = g.fetch_elevation(pt)

Notes

  • fetch_profile returns a dict with a layers key (list of layer dicts).
  • Use the module-level loggers to enable/inspect runtime information; the library does not configure logging handlers by default.

Testing

Run the test suite with pytest (excl. integration tests). Development dependencies include pytest.

make test

Integration tests that require network access are marked integration and can be executed explicitly:

pytest -q -m integration

Contributing

Contributions are welcome. Please open issues or pull requests. Follow the project's code style and run tests before submitting changes.

License

MIT


Repository scaffolded from fpgmaas/cookiecutter-poetry.

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

dovwms-0.0.4.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

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

dovwms-0.0.4-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file dovwms-0.0.4.tar.gz.

File metadata

  • Download URL: dovwms-0.0.4.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.11.13 Linux/6.11.0-1018-azure

File hashes

Hashes for dovwms-0.0.4.tar.gz
Algorithm Hash digest
SHA256 5f628c4d3407cd1db928c9112ff55103578fd923bf9dca3b9faee5d63086b992
MD5 be5e34b8d2ff933d86e2f93baffa5ffe
BLAKE2b-256 6a624562219f86632b3eec722223cb118cc9a3ae91cd51cae35d7ca57f3bcd1d

See more details on using hashes here.

File details

Details for the file dovwms-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: dovwms-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.11.13 Linux/6.11.0-1018-azure

File hashes

Hashes for dovwms-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d4e787dcc31ccdc8346b0faf6f4a9103d16a74b14d6a87ac52ea85fbd50b9552
MD5 7c9b509ed2c5db8c324ea4a0b4817b6c
BLAKE2b-256 4497734c19f81bc088b11dfad2d221608df4faa21b318accc017ce2caf0c3c5e

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