Monday, August 23, 2010

GPS information widgets

I've been busy with splitting out and rewriting the GPS information widgets from Mapper. I've also removed all the gdk rendering code and using cairo only.
Below is a screenshot from testing app:

Friday, August 06, 2010

Creating a large map from OpenStreetMap map tiles

We where planning at work to print large maps of the BSR on plywood and create a puzzle out of it, I think it was 1x1 meter. I made the following simple bash script to download and stitch the tiles using ImageMagick:


download_tile() {
 if [ -r $FILE ]; then 
  echo .
  curl --output tile_${x}_${y}.png ${URL}/${Z}/${1}/${2}.png

for ((x=66;x<77;x++)) do
  for ((y=26;y<43;y++)) do
   download_tile $x $y
   sleep 0.1
  montage -geometry 256x256 -tile 1x17 tile_${x}* map_${x}.png
  sleep 1

Unfortunately printing and large sticker or directly on plywood was out of the budget so in the end it wasn't needed. The fallback was handpainting, not as accurate, but looks pretty good still.
Anyway, I post this tiny script in here in case someone else might need something like it as I didn't find anything suitable when I was searching for a quick and simple solution. The best would of course had been to create a custom map using mapnik and all that, but it would have take too much time (and I don't have any hardware to play with at work, only my laptop with a tiny disk)