Osmarender/orp
or/p is short for Osmarender in Perl. or/p is a complete re-implementation 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 https://svn.openstreetmap.org/applications/rendering/osmarender/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. https://svn.openstreetmap.org/applications/rendering/osmarender/stylesheets/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:
Arch Linux:
yaourt -S orp-svn
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.
When install orp by manuell download you had to create following directories - important is the directory orp:
+- [root-directory of start orp] + --- [stylesheets] | +---- [symbols] | | .... different svg-files | + .... different xml-files +... different pm-files + --- [orp] <<<<<<---- this is very important !! + orp.pl
--Jan Tappenbeck 20:50, 3 March 2009 (UTC)
Problems
Mac OS X
I'm on Mac OS X and I've downloaded all dependencies of osmarender through cpan. I can run orp.pl, but everything in the created file is black. Everything works fine if I run the "normal" osmarender with xsltproc. orp creates all ways fine, but everything is black. I can see the black ways if I edit the .svg.
Has anyone the same problem or knows how to fix it?
- Most likely you made a mistake while changing styles in the rules file. Typos or wrong syntax in the SVG style description may lead to bleeding lines and blackend areas. Your SVG viewer will not give an error message but just try its best. The effects are different between or/p and xsltproc, on the viewer's side Firefox is more forgiving than Inkscape. User:navimont 3/3/2011