This is a follow-up to another question on this site, where someone asked about getting (specific) POIs from the OSM data. The suggested ideal method is to get a recent copy of the Planet file and use osmosis to extract the data you're interested in. I do heartily agree that this is the preferred way to go, especially since XAPI availability has been intermittent and performance has been slow to the point that it's no longer usable - although the new Java implementation may alleviate this situation. One of the unique qualities of OpenStreetMap is its continuous updating by all those thousands of contributors around the globe. Ideally you would want to reflect that in your POI extract. My question is: What is the workflow for keeping an up-to-date OSM-based POI database that performs well? To make this a little more concrete, here's what I currently do:
This works, but the database grows because the --rri task replicates all changes and not just the POIs I'm interested in. So derived questions are:
asked 25 Mar '11, 10:20 mvexel |
There is currently no ready-made solution for what you want to do. If you are a programmer then the easiest way to accomplish what you want is to write a small parser for OSM/OSMChange files yourself (you will be able to re-use the code for both) and follow this logic:
The logic to apply when processing updates is:
You could of course also amend Osmosis to do what you want. This procedure has a disadvantage in that it is hard to cope with POIs that are modeled as ways in OSM (because you might theoretically receive an OsmChange file that says "way #1234 now has these tags" and you go "wow, I need that in my database", but you don't know about that way's geometry because you ignored it on import since it didn't have the right tags...) One way to avoid programming, but at the cost of more processing overhead, is this:
This wastes resources by always doing a full import, but the import will always be "clean" and only contain the things you really want. Plus, it has the capacity to work with way-POIs as well. When using a local .osm.pbf file as your master database like in this example, it is advisable to use the answered 25 Mar '11, 12:27 Frederik Ramm ♦ I wrote a tutorial based on my own experiences and the second method you described.
(27 Mar '11, 20:28)
mvexel
mvexel: Do you import the geometry of the ways? Just using
(30 Mar '11, 15:33)
emj
many thanks for this answer..
(20 May '14, 22:53)
say_hello_to...
|
dear mvexel - very good outline of your needs. let us know if you have any success. please share with us all your insights and all your further needs.