The project can be found at https://github.com/JeffHeard/ga_ows
Core to Geoanalytics are the Open Geographic Consortium’s Open Web Services. ga_ows is a reusable GeoDjango webapp that provides you the ability to expose GeoDjango models and Python objects as geographic webservices.
A geographic webservice allows you to access data in your GeoDjango models by bounding box and other filters; these data can then be imported into other geographic databases, or perhaps more importantly as layers on a map. For layering WFS services, see the OpenLayers project .
How does it work? OWS is based on Django’s class-based generic views. The following in your urls.py will create a WFS service for a the models in your app:
from ga_ows.views.wfs import WFS from myapp import models as m urlpatterns = patterns('', # ... url(r'^wfs/?', WFS.as_view( models=[m.MyModel1, m.MyModel2], # everything but this is optional. title='My app\'s WFS', keywords=['some','keywords'], fees='one dollar', provider_name='RENCI', addr_street='100 Europa Dr. ste 529', addr_city='Chapel Hill', addr_admin_area='NC', addr_postcode='27515', addr_country='USA', email@example.com' )), # ... )
This will create a WFS endpoint at $django_server/$myapp_root/wfs that serves up features in GML and any of the formats that support the creation of single-file dataset in OGR_ (note that for now this means shapefiles are not supported for output since they require multiple files, although they will be in the near future).