Skip to main content

GeoJSON tile view for Django

Project description

A simple Django view to serve GeoJSON tiles from a GeoDjango model


The view will return a GeoJSON FeatureCollection for each tile. Each feature corresponds to a row of the model.


pip install django-geojson-tiles

Add the following to your

from geojson_tiles.views import GeoJSONTile
from your_app import GeometryModel

urlpatterns = patterns('',
        GeoJSONTile(GeometryModel, geometry_field='geometry_field', trim_to_boundary=True))


  1. geometry_field='geometry_field' specifies the geometry to use in the feature. If no geometry_field is specified: the first GeometryField in the model’s field set is used.
  2. trim_to_boundary=True will result in GeoJSON tiles with geometries trimmed to the tile boundary
  3. properties=[...] can be used to limit the feature’s properties that are serialized
  4. properties={'field_name': 'property name'} will limit the feature’s properties and map field names (keys) to property names (values).

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
django-geojson-tiles-0.1.2.tar.gz (4.9 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page