BigMaps with CutyCapt and Xvfb

Finally found a way to generate an image file from a reasonably large online map, using CutyCapt.

I haven't been able to get zoom level 7 (32768 x 32768) to work yet, as 32767px is the limit of QImage.

EC2 notes (or run it locally, if you have enough RAM):

  1. Launch an "Extra large" Ubuntu AMI (ami-0e5db967, x86_64) (alestic intrepid base) (alestic-64/ubuntu-8.10-intrepid-base-64-20081222.manifest.xml)
  2. Start X11.app
  3. ssh -X root@$INSTANCE.amazonaws.com
  4. aptitude update
  5. aptitude install subversion libqt4-webkit libqt4-dev g++ xorg xvfb
  6. svn co https://cutycapt.svn.sourceforge.net/svnroot/cutycapt
    cd cutycapt/CutyCapt
    qmake
    make
  7. cd $HOME; echo '.gmnoprint { display: none ; }' > bigmap.css
  8. xvfb-run --server-args="-screen 0, 1024x768x24" cutycapt/CutyCapt/CutyCapt --url="http://alf.hubmed.org/biggmap.php?type=G_PHYSICAL_MAP&zoom=6" --out="bigmap-16384.png" --max-wait=0 --user-styles=bigmap.css
  9. logout
  10. scp root@$INSTANCE.amazonaws.com:bigmap-16384.png .

Result: a 168MB PNG (or 12MB JPG) file.

Comments

I've not tried your technique yet, so I'm not 100% if this is what you're looking for, but I've previously used Modest Maps' ws-compose server to generate large PNG maps from lots of tiles:

http://modestmaps.com/examples-python-ws/

Works really well for Virtual Earth's aerial maps:

http://flickr.com/photos/scraplab/2980428851/

All fields are optional, email address will not be shown; no HTML, URLs are automatically hyperlinked.