Logotipo do OpenStreetMap OpenStreetMap

Simple TagReport in C++

Publicado por h4ck3rm1k3 em 27 dezembro 2009 em English.

I have checked in a simple tag report to process the tags for JohnSmith
the idea is to extract the data about the highways for signs. Well this routine is pretty generic, and demonstrates how you can build simple reports in C++ with my new toolkit.

I created a TagWorld object to collect the tag data, there I could each tag and the values of certain tags, The tags to collect are stored in a third map.

So, the TagProcessor is used for the ways, rels and nodes, the same type in the callbacks. The results are incremented in the world object and reported in the end document callback.

It all works very nice,and i hope that more people will use this toolkit.

For example, I processed the entire new_jersey dump file,
it takes : 2m45.288s

wordcount takse:1m33.406s to process 18million rows
18,612,601 78918048 1249629139 new_jersey.osm

So this program is only 2x slower.. that is pretty good.

test it yourself :
1. bzr branch lp:~jamesmikedupont/+junk/EPANatReg
2. make
3. ./TagReport test.osm

mike

http://bazaar.launchpad.net/~jamesmikedupont/%2Bjunk/EPANatReg/annotate/head%3A/TagReport.cpp

Ícone de e-mail Ícone do Bluesky Ícone do Facebook Ícone do LinkedIn Ícone do Mastodon Ícone do Telegram Ícone do X

Discussão

Entrar para deixar um comentário