[OSM-talk] Static osmarender tile generation

Nick Burch openstreetmap at gagravarr.org
Sun Oct 15 12:55:29 BST 2006


Hi All

I've written a basic script to pass a .osm file through osmarender at a 
number of scales, output these svgs at increasing dpis, and then split the 
resultant pngs up into handy tiles. Oh, and there's also a simple html 
page to let you zoom in, pan around etc.

If you'd like to see it in action, then try:
   http://gagravarr.org/misc/static-maps/RoseHill-20061014/
        (rendering of just a small area)
   http://gagravarr.org/misc/static-maps/oxford-20061015/
        (all of Oxford, scale 5 is broken due to an ImageMagick bug)

The code for this is in svn (/utils/static-osmarender/). Basically, you 
give the program an initial DPI (for the largest zoom), a list of 
osmarender scales (can all be the same, but it'll do one zoom in for each 
scale listed), and a .osm file. It does the rest.

There's more information in the readme in svn, but I'd say the main issues 
I need help on are:
* Finding something other than ImageMagick to crop and split pngs with (it
    breaks badly on really big files - see Oxford at scale 5)
* The map browsing interface is pretty basic, and could use being made
    fancier


If you want to run this yourself, to generate nice osmarender map tiles of 
your area, you'll just need inkscape, xalan2 or xsltproc, and imagemagick.

Nick




More information about the talk mailing list