[GIS] Using OpenLayers to collect data by CrowdSourcing

crowdsourcingeditingopenlayers-2

I'm currently making my first steps in OpenLayers, trying to build a page showing a map where people can add data, which is then saved back in our database.

(Background: Mapping of the distribution of indigenous vegetables. We have some data, but the "crowd" should be able to add their information, too).
Similar to this example (but in my case polygons should get added): http://ediblecities.org/

Is this possible with OpenLayers?

And this is maybe a too open question, but how? (a reference to a simple example would already be helpful).
It does not seem possible to somehow use the tools offered in the toolbar (OpenLayers.Control.EditingToolbar(vlayer)) for this.


A more concrete follow-up question as to HOW to collect data via Openlayers, Geoserver and PostGIS can be found here: How to collect data via WFS and Popup

Best Answer

Yes, openlayers supports vector editing in the browser and provides means for saving those vectors back to a database. As you guessed when you said "this is maybe a too open question", the full "how" is an involved answer.

Assuming that each user is not working from a blank slate, and can see the other submissions, it seems like the basic steps you want would be to

  1. load the data into the browser
  2. create/edit the data
  3. save the data

Creating polygons and editing them is the simple part. Openlayers is built to support this. An example is here: http://dev.openlayers.org/releases/OpenLayers-2.8/examples/editingtoolbar.html

Steps one and three involve OpenLayers (or something in your browser) interacting with your web server: your web server needs to "serve up" the data and then accept new versions of it.

To help you figure out what needs to be done to allow that interaction, we'd need to know more about your software stack. Do you have a database set up yet? What kind? Do you have a webserver, or a map server like MapServer or ArcGIS to serve up vectors? Or, are these things you still need to learn about? We'd/I'd be happy to help point you towards learning resources.