[OSM-talk] Another point in support of ways as ordered lists
Wollschaf
mith at uni.de
Wed Sep 20 17:08:03 BST 2006
I have started to write a program in c that might later do those things,
and implemented a rudimentary osm parser (optimized on speed, not fault
tolerance; tailored for osm data). Parsing all nodes and counting
how many are in a given area (no storing), and reading the rest of the
file but not doing anything with it (yet) takes around five minutes (a64 @
1000Mhz, reading file over nfs);
Reading, parsing and counting the nodes is around 10MB/s at
that processor speed. Storing should not take much longer with carefully
placed mallocs for huge chunks of memory.
$ time ./osm2raw planet-060827.osm
11841307 nodes
real 5m17.114s
user 2m24.540s
sys 0m26.690
Cropped and edited (curves, levels...) result:
http://wiki.openstreetmap.org/index.php/Image:Osm-coverage-europe.png
The code is a mess (first big c program apart from hello world things),
and I don't know if any nodes are skipped. It's far from being able to be
released. And I'm too busy learning for exams at the moment to work on it.
Perhaps perl and its XML parser are just to slow for such a task. And I'm
no use programming perl (I tried, once), sorry.
Wollschaf
More information about the talk
mailing list