OpenStreetMap 로고 OpenStreetMap

Update to the C++ Processing, template plugins

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

I have made an update to the sax processing of the OSM.
Now you have a nice way to plug in your own processing ,at high speed without any funny overhead!

The OSM processor is a template function that

has four template parameters :

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

Each of those parameters are passed to a similar template SAX callback processor
http://bazaar.launchpad.net/~jamesmikedupont/%2Bjunk/EPANatReg/annotate/head%3A/SAX2OsmHandlers.hpp

It creates a world object, and each type of processor, passing the world to them by reference so they can access it. Then it parses the xml and calls the user defined templates on call back.
each one gets the chance to handle the StartElement callback from sax and do what they want. You dont have to do anything and that makes it fast.

So, now you can just define your own plugins as you like. If you want to have two plugins, you can define a new class that combines two of them. It should be very simple to make incremental and standalone processors for OSM data that are very fast.

Now that this framework is started, I invite you all to help out.

Mike

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

토론

2009년 12월 26일 09:26!i!님의 의견

Sounds good, would be cool if you put a note in the wiki :-)

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