Hello all!
I was wondering if anyone knew if there was a way to output a
shapefile from a django database. I didn't find anything in previous
posts, and couldn't figure anything out just yet looking at django/
contrib/gis/gdal/datasource.py
I was hoping I could do something like the following:
>>> import os
>>> from geodjango import world
>>> world_shp = os.path.abspath(os.path.join(os.path.dirname(world.__file__),
... 'data/TM_WORLD_BORDERS-0.3.shp'))
>>> from django.contrib.gis.gdal import *
>>> ds = DataSource(world_shp)
>>> ds.save('data/TM_WORLD_BORDERS-0.3_new.shp')
I'm working on creating an application where users can create their
own dataset using OpenLayers or Google Maps, and I would like to
create an option to export the data in a shapefile format.
Thanks,
Evan
I am Django (and so can you!)
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.