Are you sure you have a 'datasource-settings.xml.inc' file? I think that the OSM distribution just includes a template that needs to be customised?
Graham On 2 February 2011 18:47, Kai Behncke <[email protected]> wrote: > Dear Users, > > I have installed mapnik 0.7.1 successfully at Windows 7 (Python 2.6.6), > the XML-examples of http://trac.mapnik.org/wiki/XMLGettingStarted > work fine. > > Well, now I try to visualize my first own OSM-Map. > > I succesfully brought OSM-data to PostGIS by osm2pgsql, > Via SVN I checked out the code of: > http://svn.openstreetmap.org/applications/rendering/mapnik/ > > > I use then a little file "come_on.py" like: > > ************************* > > #!C:/Python26 python > > from mapnik import * > > mapfile = 'osm.xml' > map_output = 'mymap.png' > m = Map(1024, 1024) > load_map(m, mapfile) > bbox=(Envelope( -22013.864146132022, 6719120.534380134, > -17121.894335880875, 6724012.504190385)) > m.zoom_to_box(bbox) > render_to_file(m, map_output) > > ********************************** > > > Obviously, it opens osm.xml, what includes inc/entities.xml.inc > > <!DOCTYPE Map [ > <!ENTITY % entities SYSTEM "inc/entities.xml.inc"> > %entities; > ]> > > > ....in inc/entities.xml.inc some more lines are included, like: > > > <!ENTITY % settings SYSTEM "settings.xml.inc"> > %settings; > <!ENTITY datasource-settings SYSTEM "datasource-settings.xml.inc"> > <!ENTITY fontset-settings SYSTEM "fontset-settings.xml.inc"> > <!ENTITY srs900913 "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 > +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over"> > <!ENTITY srsmercator "+proj=merc +datum=WGS84 +over"> > <!ENTITY srs4326 "+init=epsg:4326"> > <!ENTITY % layers SYSTEM "layers.xml.inc"> > %layers; > > > .....well, the pathes should be correct, but if I start "come_on.py" I > always get: > > > C:\mapnik_0_7_1\beispiel>osm.py > inc/entities.xml.inc:9: parser warning : PEReference: %layers; not found > %layers; > ^ > Traceback (most recent call last): > File "C:\mapnik_0_7_1\beispiel\come_on.py", line 9, in <module> > load_map(m, mapfile) > RuntimeError: XML document not well formed: > Entity 'datasource-settings' not defined (encountered in file 'osm.xml' at > line > 6989) > > Has anybody an idea why these error-messages appear? > > Thank you very much, Kai > -- > NEU: FreePhone - kostenlos mobil telefonieren und surfen! > Jetzt informieren: http://www.gmx.net/de/go/freephone > _______________________________________________ > Mapnik-users mailing list > [email protected] > https://lists.berlios.de/mailman/listinfo/mapnik-users > -- Graham Jones Hartlepool, UK.
_______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

