User:Frederik Ramm/Creating Very Large Marble Images

From OpenStreetMap Wiki
Jump to navigation Jump to search

The following HOW-TOs have now been copied onto the KDE Marble page

Ok, so I liked these Marble globe images with OpenStreetMap data.

BUT: they are only screen-resolution (not good for printing) and they are based on Mapnik tiles, meaning that you don't see much detail unless you zoom in so far that you lose the globe effect.

Aim: 5000x5000 pixel marble picture with Osmarender tiles, like this (only larger):

Example Marble Image with Tiles@Home Tiles.png

How to do it (this is very likely to only work under Linux, there may be different procedures to achieve the same under Mac/Win):

Step 1: Make Marble use Osmarender tiles

  • Become root
  • Edit /usr/share/kde4/apps/marble/data/maps/earth/openstreetmap/openstreetmap.dgml
  • Change <downloadUrl protocol="http" host="a.tile.openstreetmap.org" path="/" /> to
    <downloadUrl protocol="http" host="a.tah.openstreetmap.org" path="/Tiles/tile/" />,
    and delete the other two downloadUrl lines.

(My gut feeling is that this should also be possible by putting something in your .marble directory but I haven't found that yet.)

Step 2: Simulate a giant desktop

(most of these commands need to be executed in their own window or backgrounded with &)

  • with Ubuntu you will need the packages:
    Xvfb x11xvnc xvnc4viewer imagemagick netpbm
  • mkdir /tmp/marblefb
  • Xvfb -ac :1 -fbdir /tmp/marblefb -screen 0 4096x4096x24
    or whatever resolution you want
  • x11vnc -scale .5 -display :1
    the scale factor will make it easier to work with your big desktop - less scrollbars. You can even go so far as to use .1 or so because you only need the mouse to move the globe around.
  • vncviewer localhost :0
    this should open an empty window - yes :0 is correct here even though the rest has :1
  • DISPLAY=:1 marble -geometry 4096x4096+0+0
    or whatever resolution you used for Xvfb
  • now play with Marble until you like the picture
  • xwdtopnm < /tmp/marblefb/Xvfb_screen0 | pnmtopng > /tmp/marble.png
  • now you can terminate the lot and use /tmp/marble.png