I have followed all the steps mentioned in https://wiki.openstreetmap.org/wiki/Mapnik/Installation_on_Fedora_18 install a tile server on my Fedora 28 workstation. Although the tutorial is a bit old, almost all steps are applicable and I have gone through them with ease. However, in the last step, when I am going to test Mapnik to see if it works (by running generate_tiles.py), I get the following error:

[postgres@localhost mapnik]$ ./z0_generate_tiles.py /usr/lib64/python2.7/site-packages/mapnik2/init.py:27: DeprecationWarning: mapnik2 module has been deprecated, please use 'import mapnik' warnings.warn(msg, DeprecationWarning) render_tiles( (-180.0, -90.0, 180.0, 90.0) /var/lib/pgsql/mapnik/osm.xml /var/lib/pgsql/mapnik/tiles/ 0 0 World ) Traceback (most recent call last): File "./z0_generate_tiles.py", line 215, in render_tiles(bbox, mapfile, tile_dir, 0, 0, "World") File "./z0_generate_tiles.py", line 136, in render_tiles renderer = RenderThread(tile_dir, mapfile, queue, printLock, maxZoom) File "./z0_generate_tiles.py", line 64, in init mapnik.load_map(self.m, mapfile, True) RuntimeError: XML document not well formed: Entity 'prefix' not defined at line 4064 of '/var/lib/pgsql/mapnik/osm.xml'

asked 28 May '18, 11:59

powergame's gravatar image

powergame
11112
accept rate: 0%

What version of Mapnik are you running and what osm.xml are you using?

If a recent osm.xml from OSM Carto, it probably won't work with old versions of Mapnik. How did you obtain or create it?

(28 May '18, 12:35) SomeoneElse ♦

@SomeoneElse running mapnik-config --version gives me 2.3.0-pre. Regarding osm.xml, I guess I am using the one I checked out from http://svn.openstreetmap.org/applications/rendering/mapnik. By the way, I don't understand why the guide mentioned in the question installs mapnik from Fedora repos but checks out its svn repo and works with it. Do you think I need to remove installed mapnik packages and build it from source?

(28 May '18, 13:25) powergame
2

To be honest, if you actually want to get something working I wouldn't start from Fedora. Everything's nicely packaged up for Ubuntu; either of the two latest LTS releases will work just fine. See https://switch2osm.org/manually-building-a-tile-server-18-04-lts/ .

As for the XML file you're using, that apparently dates from "26 October 2013". I'd be surprised if that's what you really want.

(28 May '18, 14:04) SomeoneElse ♦

@SomeoneElse the problem is that we have a Centos server for our website and we want to use the same server as map tile server for our app users. After some failures with CentOS, I felt maybe I could use another OS of the family i.e. Fedora, because it's rather easy to move our site to Fedora (tested).

(28 May '18, 18:42) powergame

@SomeoneElse what is osm.xml used for anyways? I checked out the latest version I guess, but you said it is for around 2013, why?

(28 May '18, 18:44) powergame

osm.xml is the file that tells mapnik how to render things.

The one in subversion from 2013 is just an old file. Everything is in git now. Usually osm.xml is generated from a mote manageable series of source files. See the switch2osm guides and the "osm carto" project in github.

(28 May '18, 20:01) SomeoneElse ♦
showing 5 of 6 show 1 more comments
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×312
×3
×2

question asked: 28 May '18, 11:59

question was seen: 472 times

last updated: 28 May '18, 20:01

powered by OSQA