I read a lot about planet files, osmosis and stuff. What i try do do is create a small mysql database which contains some basic georeference data of locations. Something like this:
loc_id | loc_name | lat | long | level | level1 | level2 | level3 | level4 | level5
---------------------------------------------------------------------------------------
123 | germany | 1.1234 | 1.1234| 2 | 1 | 0 | 0 | 0 | 0
5881 | berlin | 1.1234 | 1.1234| 3 | 1 | 123 | 5881 | 0 | 0
123123 | kreuzberg| 1.1234 | 1.1234| 4 | 1 | 5881 | 5881 | 123123 | 0
I guess you get the idea. You can ignore the demo coordinates. What i need is a start on how to get this simple structure out of a osm file. I guess its not that easy. Especialy when trying to create that level data. I read that you can use osmosis pipes to arrange that, but i just need a start in the right direction.