GeoJSON tile view for Django
Project description
# Django GeoJSON Tiles
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
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
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
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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | adfa0c881191fc641e2ad367b7e039a8f4d0ddeaf97a7aa26bc3813eaf918b45 |
|
MD5 | 35edf4b69a36eebc02992c7be3343e92 |
|
BLAKE2b-256 | 16c5d27db5364a8a937e48ce8aeb6c15881471de773c7239ad4ecb7b69110b42 |