1 This work is licensed under a Creative Commons Attribution-ShareAlike 2.0 Generic License.
2 http://creativecommons.org/licenses/by-sa/2.0/
3 see also the COPYING file.
5 The plan is to create files for each of the Municipalites of Kosovo and after that for each major city.
6 http://en.wikipedia.org/wiki/Municipalities_of_Kosovo
8 my last attempt with that simple perl script was not that good
9 http://gitorious.org/osmgit/osmgit-test/trees/logistics-plus-update4
10 http://osmopenlayers.blogspot.com/2010/06/first-running-of-osm-gittorrent.html
12 also using tiles for splitting is not optimal
13 people want a structure that is usable, and logical, human
14 better to put the work into a human directory strucure
15 so you break the map up into small chunks that can be loaded in josm
16 each one is just a document, and you edit them with josm
17 and that is it, no database, no stress. rendering via mapnik or something when they are checked in via git hooks
18 the webpages with browsing information can also be generated statically upon checkin
19 at least for kosovo it is so small, i mean you dont need much
21 For now I am using this source :
22 wget http://downloads.cloudmade.com/europe/southern_europe/kosovo/kosovo.osm.bz2
23 wget http://downloads.cloudmade.com/europe/southern_europe/kosovo/kosovo.poly
25 The first job is to create polygons for all the areas of interest to do a better and intelligent splitting, the OSM data alreay is pretty good and can be used for this.
27 to get the scripts for polygons :
28 svn co http://svn.openstreetmap.org/applications/utils/osm-extract/polygons
31 * http://wiki.openstreetmap.org/wiki/Osmosis/Polygon_Filter_File_Format#Converting_To.2FFrom_OSM_Format and here http://wiki.openstreetmap.org/wiki/User:Davetoo/GIS/DataExchange/Polygons
32 * http://wiki.openstreetmap.org/wiki/Polygon
33 * http://trac.openstreetmap.org/browser/applications/utils/osm-extract/polygons/README
35 Here are the instructions on what to do :
37 First I build the osmsis from source :
38 see also http://wiki.openstreetmap.org/wiki/Osmosis/Installation
40 svn co http://svn.openstreetmap.org/applications/utils/osmosis/trunk/ osmosis
42 sudo apt-get install ant
43 sudo apt-get install openjdk-6-jdk
46 then you unpack the zip file and use it
48 unzip osmosis/./package/distrib/zips/osmosis-SNAPSHOT-r25892.zip
49 cd osmosis-SNAPSHOT-r25892/
51 To get the data extract of all kosovo :
54 Here are some more things to read :
55 http://wiki.openstreetmap.org/wiki/Osmosis#Extracting_bounding_boxes
57 To extract admin level 4, the municipalities :
58 "bash ./osmosis --read-xml ../../../KosovoCCOpenStreetMap/gitrepo/kosovo.osm --tf accept-ways admin_level=4 --used-node --wx admin4.osm"
60 bash ./osmosis --read-xml ../../../KosovoCCOpenStreetMap/gitrepo/kosovo.osm --tf accept-ways admin_level=2 --used-node --wx admin2.osm
63 Now the most important thing is this,
64 the Klina_admin.osm was produced like this,
65 From the level 4 admin layers, I copied Klina out, then pasted it into a new osm file in josm. Then from there, I removed all attributed, merged the ways, removed the relation and made it all go into one direction. this creates a simple polygon.
67 perl osm2poly.pl Klina_admin.osm > Klina_admin.poly
69 To create the klines file :
70 bash ./osmosis --read-xml file=kosovo.osm --bounding-polygon file="Klina_admin.poly" --write-xml file="Klina.osm"
72 An example first commit of Klina is here :
73 http://repo.or.cz/w/KosovoCCOpenStreetMap.git/commit/8d2fc0d4d3190215edeabf0ba6ee033adfdf34d1
76 If you want to help, please produce some new polygons, you can register a user here http://repo.or.cz/reguser.cgi and help in the project directly, or put your clone anywhere on the internet with git.