This is a list of trees in the City of Zürich provided as a Simple Data Format, compiled by dat.alets.ch. The metadata was collected by us through web searches and public contributions, and is provided as "best effort", without any guarantee of correctness.
To add new datasets or make modifications, please visit our GitHub repository and contact us via Issues or Pull Request.
A CSV file was created based on the GeoPackage obtained from opendata.swiss, and filtered to exclude binary blobs and extract data using an SQL query.
Note: it is no longer possible to directly fetch this data with this script. You have to visit this webpage, under the map select
Ausschnitt > Stadt Zürich
then click Download. Then selectZu Meine Bestellungen
, wait for the process to complete (2-5 minutes), and then clickHerunterladen
. Extract this ZIP in the root of this project, and you should see some CSV files in the data folder.
Run make
in the root folder to fetch and convert the data. You need to have ogr2ogr, awk and curl commands available on your system. (Note on Windwows: make sure to have both ogr2ogr, e.g. if you have QGIS installed C:\Program Files\QGIS 3.8\bin
, in your system path and the GDAL_DATA
variable, e.g. to C:\Program Files\QGIS 3.8\share\gdal
, set)
In case ogr2ogr is not available, you can run make nogeom
. For this sqlite3 needs to be installed.
This repository contains a minimalist backend service API based on the Falcon framework and Pandas DataPackage Reader. To run:
cd api
virtualenv env
. env/bin/activate
pip install -Ur requirements.txt
python server.py
At this point you should see the message "Serving on port..." Test the API using a REST client such as RESTer with queries such as:
http://localhost:8000/tree?quartier=Oerlikon
Which gives you all the trees in 'Oerlikon'. You can adjust the amount of output with a page
and per_page
parameter in your query.
This package is licensed by its maintainers under the Public Domain Dedication and License.
If you intended to use these data in a public or commercial product, please check the data sources themselves for any specific restrictions.