[OSM-dev] dropping segments

Steve Coast steve at asklater.com
Fri Jul 27 00:55:11 BST 2007


Over in the current data model thread Frederik declared consensus in  
dropping segments. Is that really the case? I've thought it was  
before and been wrong.

Frederik also noted that it's mostly the case that there is no top  
down design in OSM, just whoever does the work. I know some of you  
want that leadership, so I hereby order you all to drop segments.  
Please have this on my desk by Monday. :-P

But seriously.

Dropping segments should be approximately trivial if we make a break  
with the past. Here's Steves n-point plan to success:

* dump planet.osm in to a db
* Create tables that look the same as the ways and old_ways tables.  
I'm going to call these paths and old_paths
* Using the n/s/w data, create paths for every exisiting way. These  
consist of ordered lists of nodes, much like a way is an ordered list  
of segments
** Split branched, inconsistent and disconnected ways in to multiple  
paths. Remember what these ones are and put them on a wiki page for  
people to check them over
** The path table begins at id=1, so where our existing ways might  
begin with 3,10,200 - these are assigned path ids 1,2,3 etc.
* DROP TABLE segments
* DROP TABLE old_segments
* modify ways and oldways rails models and controllers to think in  
terms of lists of nodes not segments
* increment osm API version to 0.5
* force all potlatch code to use path controller methods and not its  
own SQL
* wait for JOSM, osm2pgsql etc to catch up

Our data model is then nodes and paths.

We would begin without any history for paths. I don't think this will  
really matter.

I'd bet money that we could get all this done in a weekend with a few  
key people in a room, much like the dev day in Oxford.

have fun,

SteveC | steve at asklater.com | http://www.asklater.com/steve/






More information about the dev mailing list