GeoJSON tile view for Django
Project description
A simple Django view to serve GeoJSON tiles from a GeoDjango model
Description
The view will return a GeoJSON FeatureCollection for each tile. Each feature corresponds to a row of the model.
Setup
pip install django-geojson-tiles
Add the following to your urls.py:
from geojson_tiles.views import GeoJSONTile from your_app import GeometryModel urlpatterns = patterns('', url(r'^your_endpoint/(?P<z>\d+)/(?P<x>\d+)/(?P<y>\d+).json$', GeoJSONTile(GeometryModel, 'geometry_field', trim_to_boundary=True)) )
Notes
trim_to_boundary=True will result in GeoJSON tiles with geometries trimmed to the tile boundary
properties=[...] can be used to limit the feature’s properties that are serialized
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-geojson-tiles-0.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdddc95a656ddc1ee8b683c3c4a67a48e671af50ed8e0adb1282daf29a7f9540 |
|
MD5 | 9978b0cf2263f88c4780583d6a5ffedc |
|
BLAKE2b-256 | c81923262ea0dc6cbcdc6e3f169990c8be0d0efca0eba88fcda8394993a5a676 |