CM and Geofabrik both publish planet extracts by country / region. They are great if you want to answer questions like "How many fueling stations are mapped in ... ?". And they are great if you live on an island.<br>
<br>But if you want to travel from Brussels in Belgium to Rotterdam in the Netherlands, you want a single extract that covers both, yet is small enough to fit on your GPS. And if your software has access to many of these overlapping extracts, they should preferably be rectangular so that it's easy to programmatically to choose the best one.<br>
<br>So here is my process. All the data is at <a href="http://nroets.openhost.dk/bbox">http://nroets.openhost.dk/bbox</a><br>1. Use the Mercator projection and divide the planet into 1024x1024 squares. That means each square spans 0.35 degrees in the East West direction and a similar amount North-South.<br>
2. Count the number of OSM nodes in each square (density.csv).<br>3. Use an OO spreadsheet to choose the rectangles (density4.ods). OO will makes it quite easy: As you drag to highlight a rectangle, it will display the sum (of nodes) in the status bar. This way you can see how much data will be in the rectangle. I stayed below 14,000,000 which works out at .osm.gz of less than 300MB and gosmore files of less than 400MB. It also works well if you compose expressions like MAX(SUM(A1:K12);SUM(D9:M21)), because you can hit F2 to see how the rectangles overlap and even change them. I ended up with 58 rectangles, which will increase as the planet gets larger.<br>
4. Copy and paste all these expressions to a text file and feed them to my density.c program. <br>5. It generates a script that calls osmosis twice (density.sh). First for Africa, Europe, Asia and Australasia, then for the Americas. This way you can run it with only 4GB RAM. Edit it as desired.<br>
6. It also generates an html image map for choosing a rectangle. <a href="http://nroets.openhost.dk/bbox/density.html">http://nroets.openhost.dk/bbox/density.html</a> The rectangles in the default images are smaller than the actual, larger rectangles which are shown after hovering the mouse over them. Clicking on them will download the gosmore files, but you can edit the html as desired.<br>
<br>Regards,<br>Nic<br><br>