[OSM-dev] [OSM] Informations about osmarender for Google SoC

Frederik Ramm frederik at remote.org
Sun Mar 23 12:34:52 GMT 2008


> It's not very clear to me what "osmarender frontend" should be directed to:

I think this is not clear to many, but the core problem is that to
render a map with Osmarender, you need a set of rules, and today the
only way to edit this rule set is to fire up your editor and modify
the XML file. What we'd like to have is something that makes it easier
for people to make the desired changes to the rule file - ideally with
some kind of WYSIWYG feedback.

> 3) If it should be integrated in JOSM could/should/would we use Batik 
> for SVG preview in JASM itself? I've read that there could be some 
> problem with it 
> (http://wiki.openstreetmap.org/index.php/Osmarender/Howto#Batik)... but 
> a real-time preview in the frontend could be really cool :)

There are two steps to "classic" Osmarender - first make the SVG from
the OSM file, then make a PNG (or screen view) from the SVG. The first
step is traditionally accomplished with an XSLT style sheet but I have
just re-implemented this in Perl so you can get away without XSLT. The
second step is traditionally accomplished with Inkscape or Batik. 

It was surprisingly easy to convert Osmarender from XSLT to a
procedural language (Perl in my case but Java or C would have worked
just as well). I could imagine that for a simple raw preview
functionality, one could take the procedural variant of Osmarender and
replace the SVG generator bit by writing directly to a Cairo or GD
canvas (or generationg Java2D graphics instructions). This would
perhaps not give you the 100% true result, but should definitely be
good enough to fine-tune a rule file. If you chose that way, you could
achieve near-realtime turnaround times, ideal for a WYSIWYG editor.


Frederik Ramm  ##  eMail frederik at remote.org  ##  N49°00'09" E008°23'33"

More information about the dev mailing list