GeoDjango Datasource

GeoDjango extends the Django ORM with support for spatial databases.

class shelley.datasources.geodjango.FeatureSource(queryset, geometry_field=None)
Parameters:
  • querset – queryset to select features
  • geometry_field (string) – database field containing the feature’s geometry

Example

>>> import world.models # django app
>>> queryset = world.models.WorldBorders.objects.all()
>>> from shelley.datasources.geodjango import FeatureSource
>>> data_source = FeatureSource(queryset, 'mpoly')
>>> features = data_source.features()

Table Of Contents

Previous topic

GDAL Datasource

Next topic

Mapnik mapper

This Page