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
  3. ssh -X root@$
  4. aptitude update
  5. aptitude install subversion libqt4-webkit libqt4-dev g++ xorg xvfb
  6. svn co
    cd cutycapt/CutyCapt
  7. cd $HOME; echo '.gmnoprint { display: none ; }' > bigmap.css
  8. xvfb-run --server-args="-screen 0, 1024x768x24" cutycapt/CutyCapt/CutyCapt --url="" --out="bigmap-16384.png" --max-wait=0 --user-styles=bigmap.css
  9. logout
  10. scp root@$ .

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