[OSM-dev] Multiple temporary API instances

Josh Doe josh at joshdoe.com
Wed Aug 24 12:53:12 BST 2011

I'm interested in providing a facility whereby users can create and
edit copies of OSM data for a small region, say 16 sq miles (~40 sq
km). This is for a project [0] that I'm working on which would allow
for users to experiment with adding/removing walking and bicycling
infrastructure around a school to see how the changes impact
accessibility (i.e. how many more kids can walk or bike to school
given a specific change). While I'm quite a ways from implementing a
full web app for all of this, I'd like to understand the challenges
I'd be facing.

I'd like to allow all of this to be done via a web interface, and I
think Potlatch2 would be a good editor to provide. For that I'd need
to set up a server side API, for which I believe the "rails port" is
the only option. For a given school, it's possible that there could be
dozens of users making changes to the same area, and each user may
want to try out different combinations of changes. Therefore it makes
sense to introduce the concept of "scenarios", where each scenario
consists of a copy of the main OSM data. Users should be able to
create, copy, and destroy these scenarios on demand.

Each scenario should likely exist as a separate set of tables in the
database sharing a unique prefix. A fork of the rails port would then
need to be modified to allow the URL to specify which scenario
(prefix) to use, and would then query those tables. Potlatch2 could
then point to this scenario-dependent URL for the API, and everything
would work magically. :) Seriously though I have no actual experience
using the rails port or Potlatch2 (as a developer), this is all based
off my reading of the wiki documentation, and I'm sure things are much
more complicated and this project would require extensive modification
of the rails port, if not necessitating writing something from
scratch. I also have no idea how this sort of implementation would
scale up to thousands of scenarios.

Thanks for your input,

[0]: http://wiki.openstreetmap.org/wiki/Safe_Routes_to_School_Mapping_Toolkit

More information about the dev mailing list