Downloads GML files from a set of WFS service in a pseudo-paginated way using bounding boxes and combine them again to one file.
pip install wfs-downloader
Create a config.yml specifying your setup like this:
url: http://fbinter.stadt-berlin.de/fb/wfs/data/senstadt/s_wfs_baumbestand_an
layer: fis:s_wfs_baumbestand_an
bbox:
west: 370000.0
south: 5800000.0
east: 415000.0
north: 5837000.0
size: 10000
outputfile: strassenbaeume.xml
projection: EPSG:25833
tmpdir: /tmpwhere:
urlis the url of the WFS Service,layeris the name of the Layer,bboxis the bounding box for th objects you want to retrieve,sizeis the extend of a single request (or page),outputfileis the name of the resulting GML file,projectionis the used projection, andtmpfileis the path to the directory to store temporary files for each request.
Then run the script with the config.yml as argument:
wfs-downloader config.yml
$ wfs-downloader --help
usage: Downloads GML files from a set of WFS service in a pseudo-paginated way using bounding boxes and combine them again to one file. The WFS services are specified in settings.py.
positional arguments:
config config file
optional arguments:
-h, --help show this help message and exit
--no-download skip the download
--no-combine skip the combine