0

I would like to build a django webapp. One part of this should allow the user to interactively select geographic areas from a map. The map should come from openstreetmap, and the user should be able to do different kinds of selections:

  • freehand
  • rectangles
  • circles

For further processing, the selected area needs to be converted into a shapefile / OGR geometry.

Probably there are already solutions for the individual steps, and I'll have to integrate those. So my question is:

  • What's the best way to display a OSM map in my django app?
  • How do I select the regions?
  • How can I convert the selection to an OGR geometry?

Note: If I should make this into seperate questions, let me know!

andreas-h
  • 10,679
  • 18
  • 60
  • 78
  • What have you found online so far? – Simeon Visser May 25 '13 at 19:56
  • Well, there's geodjango, which has GEOS bindings, which I could probably convert to OGR. Regarding the OSM integration, I haven't really found anything which looked useful to me. Some projects which have map stuff in the django admin, but I want the map and selection be exposed to the user. – andreas-h May 25 '13 at 20:02

1 Answers1

0

I think you should rather asked this question on the SE GIS site because it is rather about web mapping techniques than django.

Concerning your questions I advice you to have a look at leaflet, a js library that makes map and geometry integration very easy. I both use them in my django projects. For geometry creation you need a add-on called leaflet draw. I haven't used it yet but it looks very promising.

To create shapefiles I often use leaflet it in combination with a pure python package called pyshp.

I hope this helps to get you started.

LarsVegas
  • 6,522
  • 10
  • 43
  • 67