Closed GoogleCodeExporter closed 9 years ago
There's already a pretty solid mechanism for exporting shapefiles via the
lingcod.shapes app:
18 def shapefile(request):
19 from lingcod.shapes.views import ShpResponder
20 regionqs = models.StudyRegion.objects.all()
21 shp = ShpResponder(regionqs)
22 return shp()
This view could easily be added to any app as needed.
Original comment by perrygeo...@gmail.com
on 16 Aug 2010 at 8:01
Does this handle attributes?
Original comment by underbluewaters
on 23 Aug 2010 at 5:16
Yes.. but not as gracefully as the northcoast version (field names are
truncated, "choices" are not reflected, instead of following foreign key
relationships the fk integer is used, etc.). It is the best that can be done
for a generic solution.
To do it better like the northcoast mpa export requires hardcoding assumptions
about the model and having an intermediary "shp" model to flatten the original
model into a shp friendly table.
Original comment by perrygeo...@gmail.com
on 23 Aug 2010 at 5:28
Original issue reported on code.google.com by
perrygeo...@gmail.com
on 24 Jun 2010 at 1:35