OpenTopoMap icon indicating copy to clipboard operation
OpenTopoMap copied to clipboard

Mapnik error parsing style xml file

Open hamzadastagir opened this issue 6 years ago • 3 comments

Dear der stefan Have installed opentopomap on linux system

i am getting following issues when running the tile server

`renderd[9011]: Using web mercator projection settings Mapnik LOG> 2019-01-10 18:23:55: Unable to process some data while parsing '/home/iplotter/src/Topo/mapnik/opentopomap.xml':

  • text '&fontset-settings; &landuse-lowzoom; &landuse; &landuse-over-hillshade; &water-casing-lowzoom; &water-fill-lowzoom; &waterway-lines-lowzoom; &waterway-lines; &waterway-polygons-casing; &waterway-polygons-fill; &water-areas; &landuse-over-water; &road-areas; &water-weir; &waterway-arrows; &tunnels-casing; &tunnels-fill; &tunnels-middle; &cliffs; &buildings; &areas; &contours; &borders-lowzoom; &borders; &barriers; &railways-lowzoom; &railways-embankment; &railways; &airports-casing; &airports-fill; &airports-poly; &roads-casing-lowzoom; &roads-fill-lowzoom; &roads-casing; &roads-fill; &trams; &railway-points; &symbols-road; &housenumbers-poly; &housenumbers-point; &ferry-routes; &railway-bridges-casing; &railway-bridges; &road-names-text; &bridges-casing; &bridges-fill; &bridges-middle; &aerialways; &powerlines; &powertowers; &text-cities-lowzoom; &text-cities; &text-towns; &text-villages; &symbols-sport; &symbols-stations; &text-natural-areas-lowzoom; &text-natural-areas-highzoom; &text-water-lowzoom; &text-glacier-lowzoom; &text-natural-poly; &symbols-peaks; &text-peaks; &symbols-saddle; &symbols-1; &symbols-2; &symbols-poly; &symbols-point; &symbols-viewpoint; &text-roads-ref; &text-waterways; &test;' at line 0
  • text '&basemap-relief;' at line 0
  • text '&hillshade;' at line 0
  • text '&basemap-sea;' at line 0
  • node 'CssParameter' at line 0
  • node 'CssParameter' at line 0
  • node 'CssParameter' at line 0
  • node 'CssParameter' at line 0
  • node 'CssParameter' at line 0
  • node 'CssParameter' at line 0
  • node 'CssParameter' at line 0
  • node 'CssParameter' at line 0
  • node 'CssParameter' at line 0
  • node 'CssParameter' at line 0
  • node 'CssParameter' at line 0
  • node 'CssParameter' at line 0
  • attribute 'halo_radius' with value '1' at line 0
  • attribute 'name' with value 'height' at line 0
  • attribute 'halo_radius' with value '1' at line 0
  • attribute 'name' with value 'height' at line 0
  • attribute 'halo_radius' with value '1' at line 0
  • attribute 'name' with value 'height' at line 0 `

i can see the tile server on the web page but it is empty. I think there is some issue regarding the import of entities into the opentopomap.xml and mapnik reading it. Looks like the mapnik is not reading or parsing all of the &datasource (styles) from otm-styles folder.

And to people who are concerned about contours like in a pervious post. You can also use ASTER CIGAR DEM for contours as shown in the script on openstreetmap wiki. Just have to replace the contours xml in opentopomap.xml

hamzadastagir avatar Jan 10 '19 13:01 hamzadastagir

As you suspected the cause for this problem is that the standard XML parser used in mapnik doesn't support XML entities. That was different in previous mapnik versions 2.x. You have to change the XML parser to libxml2 during build.

See for example: https://github.com/mapnik/mapnik/wiki/ManagingLargeXmlFiles https://github.com/mapnik/mapnik/issues/3191

I encountered this problem some time ago, but not recently when following the current Opentopomap HOWTO. Perhaps you can cross-check your set-up steps.

hottrails avatar Jan 10 '19 16:01 hottrails

can you guide on how to do this change i installed mapnik from the package and can't seem to include anything in the opentopomap.xml file from other folders

hamzadastagir avatar Jan 12 '19 10:01 hamzadastagir

Yes, there was an issue with the XML parser. The standard one does not handle entities. But according to my notes in the readme file, I installed mapnik from the standard Ubuntu repository. Hmmm... :question:

der-stefan avatar Apr 07 '19 20:04 der-stefan