I was, for many weeks, successfully rendering OpenStreetMap using generate_tiles.py following the instructions on the wiki. Then today I upgraded everything to latest and greatest, including the data. Now when I try to run generate_tiles.py I get the error below. I am seeing this error both on both Fedora 9 64bit and Mac OS X 10.5.
[a715139@devweb2 mapnik]$ ./generate_tiles.py
render_tiles( (-180.0, -90.0, 180.0, 90.0) /home/a715139/mapnik/osm.xml /var/local/osm/ 0 5 World )
Traceback (most recent call last):
File “./generate_tiles.py”, line 195, in
render_tiles(bbox, mapfile, tile_dir, 0, 5, “World”)
File “./generate_tiles.py”, line 126, in render_tiles
renderer = RenderThread(tile_dir, mapfile, queue, printLock, maxZoom)
File “./generate_tiles.py”, line 59, in init
mapnik.load_map(self.m, mapfile, True)
RuntimeError: Failed to parse filter expression:“name” in TextSymbolizer in style ‘stations’
The offending XML looks like this:
<Rule> <MaxScaleDenominator>50000</MaxScaleDenominator> <MinScaleDenominator>25000</MinScaleDenominator> <Filter>[railway]='halt' or [railway]='tram_stop' or [aerialway]='station'</Filter> <TextSymbolizer name="name" face_name="DejaVu Sans Book" size="8" fill="#66f" dy="-8" halo_radius="1" wrap_width="0"/> </Rule>
I know very little about how mapnik works, so I did some research, but I still don’t understand the error message. It appears to be complaining that the string “name” is unparsable, but as far as I can tell it is legal mapnik code.
I compiled mapnik from the latest svn sources and also have the latest OSM mapnik stuff from svn.
Any help would be appreciated.