Talk:Osmarender/Convert osm data from OSM file to an SVG image

From OpenStreetMap Wiki
Jump to navigation Jump to search

"This XML file does not appear to have any style information associated with it. The document tree is shown below."

I've tried absolutly everything on this page, and I can't make anything work. This is the closest I have got to anything happening at all, wich is an error. I don't know what it means though. (firefox I have absolutly every file that is linked to on this page...Anyone know what I'm doing so wrong? Ben. 15:24, 22 September 2006 (BST)

It's hard to tell from just this error message. Here are some things to check.
You should have a directory containing:
  • data.osm
  • osmarender.xsl
  • osm-map-features.xml
Then in Firefox type into the address field: <yourDirectory>/osm-map-features.xml
It should then just work. 80n 16:18, 22 September 2006 (BST)
I have all of those files in 1 directory. If I type that in fire fox, I get nothing bar the OSM logo and the Some rights reserved image. how large shoudl the data.osm be? casue I have 2 of them, although i have tried renaming both. Ben. 16:26, 22 September 2006 (BST)
What is in your data.osm and where did it come from? You need to make your own data.osm by downloading some data from the server.
It is also possible that what you have rendered is there but is off-screen. If the top left corner of your map is blank then all you would see is the top left corner. There is no way of panning or zooming an SVG image in Firefox. Try selecting a smaller area that you are sure has data in the top left corner. 80n 20:51, 22 September 2006 (BST)
I had already tried a very small area, and a larger one that was data downloaded via JOSM. I saved it as a .OSM file. I tried it just as a random name, and then i tried renaming it to data.osm. No difference. I'm getting quite confused now, cause I've renamed so many things so many times, and tried everything I can think of. Ben. 21:38, 22 September 2006 (BST)
Well I've just done again what I've been doing all day, but this time it worked!?! I can't see anything different between this attempt and the last (I stuck all the other attempts in various folders that are all identical to one another). Got quite a few problems with the render, but Ive got a render none the less! yey!. Cheers for your time anyway 80n. Ben. 00:13, 23 September 2006 (BST)

Error message

I cannot seem to get passed the following error message after trying the instructions on the page but I do not know enough about it to know what it means to try anything I haven't done already. The message is:

Error during XSLT transformation: An unknown XPath extension function was called.

Please let me know if I'm doing anything obviously wrong. I am loading standard.xml in Firefox/ Thank you.

Ksbrowntalk 15:59, 28 February 2007 (UTC)

I'm getting the same error with Firefox in Windows XP. TomChance 09:49, 19 June 2007 (BST)

nxslt - standard.xml?

I have downloaded nxslt3 and all the osmarender xml´s and stuff. But there´s no hint how to specify the osm data. You only wrote "as specified in the standard.xml", but you did not tell us how this file must look like, where it needs to be placed, ... I only get one big error message. Nothing else ;) --Krza 17:56, 20 July 2008 (UTC)


I have problems converting the outputted SVG to a bitmap format. Both convert and rsvg seem to mess up. Inkscape works fine. Robneild 14:31, 24 July 2007 (BST)

Why is Osmarender so painful slow?

I have a simple question: is it really normal that with Osmarender the rendering of an only 1.1 MB big osm file (bbox=13.45,52.6,13.5,52.65) takes ~45 minutes? My computer has an Intel 2.6 Dual Core and 4 GB RAM, OS is Ubuntu Linux (64 Bit) and i am using xsltproc. I followed the Howto step by step and i have no idea why it takes so long. I already tried another map file of the same size - no difference. Drawing the map by hand would be faster. Or am i just too impatient? --Spuerhund 10:16, 12 September 2008 (UTC)

The main reason is probably area center algorithm used to place symbols in a nice place. It's just too complicated for xslt. There are two ways how to make rendering faster:
  • use or/p from tiles@home project. It's doing the almost the same thing as osmarender, it's just faster (and also more complicated to setup)
  • use area-center preprocessor, which is Java program to precalculate position for symbols. To make it work you will need Osmosis and area-center plug-in for osmosis. Then add area-center.jar to osmosis classpath (for example by modifying bin/osmosis or bin/osmosis.bat so that the last line containing list of jar files will contain path to area-center.jar as well). Then you can preprocess osm file with following command:
osmosis -p org.tah.areaCenter.AreaCenterPlugin --read-xml inputfile.osm --area-center --write-xml outputfile.osm --Jttt 11:08, 12 September 2008 (UTC)
The link to the area-center.jar is dead now. Instead, it can now be found at places like [1] --Brian Schimmel 22:26, 20 April 2010 (UTC)