[OSM-talk] OSMDoc is awesome!

Peter Körner osm-lists at mazdermind.de
Wed Sep 1 21:32:44 BST 2010



Am 01.09.2010 15:15, schrieb Lars Francke:
>> OSMDoc is great - it's a shame it's a year out of date.  I needed a more
>> modern breakdown of tag statistics so I decided to write a report myself -
>> very quick and dirty (no where near as cool as OSMDoc), but functional to
>> get a breakdown of tag usage.  I figured someone else might like to read it
>> too:
>
> Well thank you very much. I'm painfully aware of the missing updates
> and I'm working on it on and off but I don't have the time to put a
> lot of effort into it most of the time. I still hope for fresh data
> this month.
>
> The database schema is pretty easy though so if anyone has data laying
> around this is what I would need

I've put together a script that creates this schema [1]. I used php & 
expat for the xml parsing and pl/pgsql for the counting/update/insert part.

I ran it on the heavy loaded german dev-server, gauss, and it runs not 
too fast -- but it runs.

it took 6m50.329s for the germany/bremen extract [2] which is about 4MB 
of bz2 compressed xml (imported 65046 nodes, 125824 ways).

I tested the time consumption in different parts of the process:
bzip2- (decompress to /dev/null): 0m2.506s
bzip2+php (use an empty pl/pgsql function): 0m18.190s
bzip2+php+tags (only the tags part of the pl/pgsql function): 3m50.697s
so it seems that, as expected, the pgsql function takes the most time, 
and the time consumption is balanced between the tag and the key counting.

It may be worth running it on a lesser used server and see how long it 
takes for a greater extract.

Peter

[1] <http://svn.toolserver.org/svnroot/mazder/experimental_osmdoc_import/>

[2] <http://download.geofabrik.de/osm/europe/germany/>



More information about the talk mailing list