Skip to main content

WFS Downloader

Downloads GML files from a WFS 2.0 service in a pseudo-paginated way using bounding boxes and combines them again into one file.

Many WFS services limit how many features a single request may return. wfs-downloader splits a large bounding box into square tiles, downloads each tile with a separate GetFeature request, and then merges all tiles into one GML file.

Setup

pip install wfs-downloader                                       # from PyPI
pip install git+https://github.com/codeforberlin/wfs-downloader  # directly from GitHub

Usage

Create a config.yml specifying your setup, e.g. for all street trees in Berlin:

url: https://gdi.berlin.de/services/wfs/baumbestand
layer: baumbestand:strassenbaeume

bbox:
  west:   360000.0
  south: 5790000.0
  east:   420000.0
  north: 5840000.0

size: 10000
outputfile: strassenbaeume.xml
projection: EPSG:25833
tmpdir: tmp

where:

  • url is the URL of the WFS service, without query parameters,
  • layer is the name of the layer (the typeNames of the request),
  • bbox is the bounding box for the objects you want to retrieve, in the units of projection,
  • size is the edge length of a single tile (or page), in the units of projection,
  • outputfile is the path of the resulting GML file,
  • projection is the projection used for the requests and the result, and
  • tmpdir is the directory to store the downloaded tiles. It is created if it does not exist.

The example covers Berlin with 6 × 5 tiles of 10 × 10 km, i.e. 30 requests.

Then run the script with the config.yml as argument:

wfs-downloader config.yml

To only download the tiles, or to only merge tiles that were already downloaded, use:

wfs-downloader config.yml --no-combine
wfs-downloader config.yml --no-download

Metadata

Release files for wfs-downloader 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wfs-downloader 1.3.0
File Size Uploaded Provenance Actions
wfs_downloader-1.3.0.tar.gz 4.7 kB Without provenance Details for wfs_downloader-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wfs-downloader 1.3.0
File Interpreter ABI Platform Actions
wfs_downloader-1.3.0-py3-none-any.whl Python 3 none any Details for wfs_downloader-1.3.0-py3-none-any.whl

Total release size: 10.0 kB

Release files / wfs_downloader-1.3.0.tar.gz

Download URL wfs_downloader-1.3.0.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9c0398d3e5f046c0bb3ab2baed4e170651dd96f04b4b4d4fdc59f096dfcacdcb
BLAKE2b-256 checksum
How to use checksums
eac25bdc7aef3a788fbabf15fb383f4074489b300615aba78edf7dcb4f5197d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.8

Release files / wfs_downloader-1.3.0-py3-none-any.whl

Download URL wfs_downloader-1.3.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83945c0f9d9ca0675d61055d52efe134d1ff0982353f201975e25b9865f7728c
BLAKE2b-256 checksum
How to use checksums
a4e32acaef8c0ed9c506e49adce5ef66aae4f7153d9e8be20150d2ca39b603b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.8

Security for wfs-downloader 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page