On 23/02/2010 09:59, Peter Körner wrote:
Kai Krueger schrieb:
I am trying to see how far I can get with generating some images on osm-render seems to require the pthyon cairo module
i fixed /home/project/o/s/m/osm/tools/render/osm-render to work without the cairo module but it complains about errors in the style xml, located in /home/project/o/s/m/osm/data/osm_mapnik/osm.xml.
mazder@willow:~$ /home/project/o/s/m/osm/tools/render/osm-render rendering bbox (-180, -85, 180, 85) in style /home/project/o/s/m/osm/data/osm_mapnik/osm.xml to file map which is of type png in size 800x600
/home/project/o/s/m/osm/data/osm_mapnik/inc/entities.xml.inc:9: parser warning : PEReference: %layers; not found %layers; ^ Traceback (most recent call last): File "/home/project/o/s/m/osm/tools/render/osm-render", line 128, in
<module> main() File "/home/project/o/s/m/osm/tools/render/osm-render", line 81, in main mapnik.load_map(m, style) UserWarning: XML document not well formed: Entity 'layer-admin' not defined in file '/home/project/o/s/m/osm/data/osm_mapnik/osm.xml' at line 6503 mazder@willow:~$
I don't have the time to fix this atm, maybe you can. If all goes well, it should produce a map.png in your working-dir, containing a world-overview. I think, the paths to the shoreline-files still has to be changed.
If you are using the current style sheet of OpenStreetMap, then they use xml includes to specify the location of the database, the font directory and the directory containing the world boundaries. In the osm svn (mapnik subdirectory), you will find the inc directory in addition to the osm.xml. This contains the includes. You will need to copy over all of the *.template.inc to *.inc and substitute those values with the appropriate ones for the environment. E.g. the database host being sql-mapnik.
I had a go at this over the weekend, to adopt the style file to the toolserver environment. So far without luck though, as mapnik kept on complaining that the style sheet is broken. The issues I saw there were that it wasn't parsing the style sheet correctly. Giving errors like CssParameter expects value of type float but found '1.0' or CssParameter expected to see a value of [ round, something, something else ] but found 'round'.
From what I have seen, float values require a white space before and after the value. Colour values of the form #999 must not have white space characters before or after. And I haven't found the magical whitespace combination yet to get the enumartions working at all.
This is very strange though, as I don't see any of this on my linux box and makes me wonder if the solaris mapnik / boost libraries are handling parsing differently in any way.
I'll have another look at it though later.
Kai
Peter
Maps-l mailing list Maps-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/maps-l