[OSM-talk] Static osmarender tile generation

Mikel Maron mikel_maron at yahoo.com
Mon Oct 16 10:52:19 BST 2006


Nick,

This is very useful. I've been working on the same process semi-manually over the past week,
for use in an external application. The results will be launched at the Mashup event on Friday.
So there are some bits and pieces of code from this could be useful addtions.

The very large images were also a problem. Haven't implemented it yet, but the solution I think
is to use VIPS (http://www.vips.ecs.soton.ac.uk/index.php?title=VIPS) which provides random
access into image files, so the whole huge image won't be loaded into RAM.

Mikel

----- Original Message ----
From: Nick Burch <openstreetmap at gagravarr.org>
To: talk at openstreetmap.org
Sent: Sunday, October 15, 2006 12:55:29 PM
Subject: [OSM-talk] Static osmarender tile generation

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

_______________________________________________
talk mailing list
talk at openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk







More information about the talk mailing list