Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A street tree API (work in progress).

NotificationsYou must be signed in to change notification settings

codeforberlin/trees-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An API for Berlin's street trees.Based on Django and PostgreSQL/PostGIS.

Trees are extracted fromBaumbestand Berlin.

Overview

Somewhat related

Roadmap / features

  • 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.

Set up

$ 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

Making Queries

REST style object retrieval

http://localhost:8000/trees/http://localhost:8000/trees/1

Location queries

Distance to point

http://localhost:8000/trees/?dist=100&point=13.381018,52.498606

On TMS tile

http://localhost:8000/trees/?tile=15/17602/10749

In bounding box

http://localhost:8000/trees/?in_bbox=13.20,52.427,13.21,52.428

Properties

http://localhost:8000/trees/?art_dtsch=LINDE&bezirk=Spandau

Releases

No releases published

Packages

No packages published

Contributors4

  •  
  •  
  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp