-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mapnik parsing error for a xml generated by carto #132
Comments
What version of Mapnik do you have? |
biliuta@ubuntu:~/Downloads/mapnik-3.x$ mapnik-config -v I compiled the latest source code from master branch so I should have the version that uses maximum-scale-denominator. The parsing is done by the mapnik library in C++ as far as I can understand. Is this correct or it's done in python ? |
Yes, it is done by Mapnik in C++. You can try to reduce the XML to minimum which still fails and paste it here. |
The mapnik.xml file has over 35.000 lines but above I've pasted a piece of it that I think fails. |
I don't know what's wrong. This piece works for me. |
Hmmm ... In fact I don't think there is a xml formatting problem. I looked up the error message in the code and it points to |
Here you can download the xml file: |
After a short break I got back to mapnik. I checked my install environment and it seemed that I installed the python-mapnik from pip repo and not from source so it wasn't using the mapnik library that I compiled from source. Now I've also compiled python-mapnik from source and using gdb I can see that at run time python loads libmapnik.so.3.1.0 library which has the same md5sum as the one built by me. This got rid of the error message with which I opened this issue. I guess this issue can be closed but I still have some problems rendering a first map and I would appreciate if you guys can point me in the right direction. The rendered map is always blank. I compiled my library for debug and used this python script:
if I remove those lines:
I get this error:
Can you please tell me why bbox is initialized with an INVALID parameter? If I don't remove those 2 lines all seems to run correctly but the image is still blank. I've attached the debug output with the 2 lines included in the code. |
I have generated a xml style sheet using
carto/project.mml > mapnik.xml
Whe I run a python script in order to render a pbf file I get an error while it parses the mapnik.xml file:
`#!/usr/bin/env python
import mapnik
from mapnik import *
mapnik.logger.set_severity(mapnik.severity_type.Debug)
mapfile = 'mapnik.xml'
map_output = 'mymap33.png'
m = Map(2048, 2048)
load_map(m, mapfile)
bbox=(Box2d( 26.08901,44.420234,26.125488,44.435067))
#m.zoom_to_box(bbox)
render_to_file(m, map_output)`
The error is this:
`Mapnik LOG> 2017-01-20 08:07:18: Unable to process some data while parsing 'mapnik.xml':
`
The text was updated successfully, but these errors were encountered: