- Notifications
You must be signed in to change notification settings - Fork4
A street tree API (work in progress).
NotificationsYou must be signed in to change notification settings
codeforberlin/trees-api
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
An API for Berlin's street trees.Based on Django and PostgreSQL/PostGIS.
Trees are extracted fromBaumbestand Berlin.
- Data source:Baumbestand Berlin
- Data extraction viacodeforberlin/wfs-downloader
- This is the API
- Map fortrees.codefor.de viacodeforberlin/trees-map
- The map tiles and also the tree tiles are generated usingcodeforberlin/trees-mapnik
- codeforberlin/treemeta collects botanical names which might be integrated in the API or by a client application.
- codeforberlin/tree-column-names is not directly used in this project but the basis for thecolumn-names.json that is used.
- Command to import GML file
- API endpoint to filter by properties
- API endpoint to filter by distance from point
- API endpoint to filter by bounding box
- Filter combining by properties, distance from point, bounding box (Django filters, DRF-GIS)
- Advanced filtering such as greater then year, fuzzy search on strings
- Server-side clustering
tbc.
$ git clone https://github.com/codeforberlin/trees-api$cd trees$ virtualenv env$source env/bin/activate$ pip install -r requirements.txt$ cp trees/settings/sample.local.py trees/settings/local.py
edittrees/settings/local.py for your database connection
DATABASES= {'default': {'ENGINE':'django.contrib.gis.db.backends.postgis','NAME':'trees','USER':'postgres','PASSWORD':'secret','HOST':'localhost','PORT':'5432', }}
$ ./manage.py migrate$ ./manage.py createsuperuser$ ./manage.py ingest GMLFILE 2016-02-29T13:00Z$ ./manage.py runserver
go tohttp://localhost:8000/admin/ orhttp://localhost:8000
http://localhost:8000/trees/http://localhost:8000/trees/1
http://localhost:8000/trees/?dist=100&point=13.381018,52.498606
http://localhost:8000/trees/?tile=15/17602/10749
http://localhost:8000/trees/?in_bbox=13.20,52.427,13.21,52.428
http://localhost:8000/trees/?art_dtsch=LINDE&bezirk=Spandau
About
A street tree API (work in progress).
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Contributors4
Uh oh!
There was an error while loading.Please reload this page.