[OSM-talk] Another point in support of ways as ordered lists
Joerg Ostertag (OSM Munich/Germany)
openstreetmap at ostertag.name
Fri Sep 22 19:30:46 BST 2006
On Friday 22 September 2006 17:22, Gabriel Ebner wrote:
> On Thu, Sep 21, 2006 at 09:21:30AM +0200, Joerg Ostertag (OSM
Munich/Germany) wrote:
> > The problem is: how do I take
> > node 11 ...lat/lon=a/b tag=x
> > node 12 ...lat/lon=c/d tag=y
> > segment 9 ...from=11 to=12 tag=w
> > way ... seg=...,9,... tag=u
> > into something like
> > segment 9 ... lat/lon1=a/b lat/lon2=c/d tag=u,w,x,y,
> > with the complete planet.osm with
> > - low memory consumption (<1GB)
> > - and fast (<10 hours)?
>
> One option is to read the planet into a flat-file database (a simple
> home-made one, just lists of nodes/segs/..., lookup using binary search),
> adding segment-on-node and way-on-segment data. This takes around 10min on
> my dual opteron (including bunzip2 and UTF8sanitize) and 5M of heap (for
> buffering).
>
> Then you can traverse the segments in the planet like a graph (storing
> traversed segments in a bit vector -- which is just 1M for the current
> planet) and save the paths you generate thereby. This takes around 8min
> and 1M of heap (for the bit vector).
>
> There's just one caveat: You need to mmap a 1.8G file, which is likely to
> get much bigger in the future. I might be able to save some space by using
> 32-bit coordinates and 32-bit offsets, but this would only delay the point
> when the 4G barrier on 32-bit machines is reached.
Sounds need. I got curious. Can you post/send the source to this so I can have
a look at it?
--
Jörg (Germany, Munich)
http://www.ostertag.name/
TeamSpeak2: ts2.ostertag.name, user: tweety, Channel: "GPS Drive"
irc://irc.oftc.net/#osm
Tel.: +49 89 420950304
More information about the talk
mailing list