OpenStreetMap 로고 OpenStreetMap

Simple TagReport in C++

h4ck3rm1k3님이 English로 2009년 12월 27일에 게시함.

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

이메일 아이콘 Bluesky 아이콘 Facebook 아이콘 LinkedIn 아이콘 마스토돈 아이콘 텔레그램 아이콘 X 아이콘

토론

댓글을 남기려면 로그인하세요