Osmarender/orp

From OpenStreetMap

Jump to: navigation, search

or/p is short for Osmarender in Perl. or/p is a comlete re-implemenation of Osmarender in Perl. This means you still need the original Osmarender rules files, and you will still get SVG output, but this works without XSLT - no osmarender.xsl and no xmlstarlet etc. required.

or/p is currently almost 100% compatible with Osmarender; there's a slight difference in finding area centrepoints and rendering holes in polygons, and or/p does not support Osmarender's proximity filter which is used for lowzoom tiles. Everything else should be basically identical, with or/p running slightly faster and consuming less memory than the XSLT variant.

Get or/p from http://svn.openstreetmap.org/applications/rendering/orp/

and call it like this:

 perl orp.pl -r rulefile data.osm

for a rule file, use any valid Osmarender rule file (e.g. http://svn.openstreetmap.org/applications/rendering/osmarender6/osm-map-features-z17.xml).

Using with Tiles@home

To activate rendering with or/p in Tiles@home you have to insert this into your tilesAtHome.config.

Osmarender=orp

If you have checked out tiles@home, you don't have to checkout orp separately - it is already pulled into t@h svn tree. Note that at least currently you still must have xmlstarlet for some operations even if you are using or/p. If you see errors like

 The following command produced an error message:
 nice -n10 perl orp.pl -r /tmp/map-features-17661-z13.xml -o /tmp/output-12842-z13.svg-temp.svg
 Debug output follows:
 |
 | no element found at line 1, column 0, byte 0 at /usr/lib/perl5/site_perl/5.8.8/i486-linux/XML/Parser.pm line 187

install xmlstarlet.

Installation instructions

Use the following commands in your system console to install all required components:

Ubuntu:

sudo apt-get install libxml-perl libxml-xpath-perl libset-object-perl libxml-writer-perl

Windows:
Install with your ActivePerl Package Manager libxml-perl, XML-XPath, Set-Object and XML-Writer.

Personal tools
recent changes