View Single Post
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#1792
Originally Posted by marmistrz View Post
Any recent progress on mapnik?
I finally got to trying the Python Mapnik example, and it seems to be working! This is the resulting image from the example, rendered on my N900:


I have encountered a couple of issues I had to fix before I was able to make the image:

Mapnik requiring Property setter on Python 2.5

The Python 2.5 @property decorator does not have the setter yet. This can be faked around by overriding the Python 2.5 property with a newer one before importing the mapnik module:

Code:
wget https://raw.githubusercontent.com/M4rtinK/modrana/master/core/backports/__init__.py
mv __init__.py fake.py
python
>>>import fake
>>>import mapnik
Mapnik looking for libraries in the wrong path

Next I was getting errors when trying to create the shape data source. From StackOverflow I've found this is caused by incorrectly configured Mapnik lib path. In my case it was expecting /lib/mapnik but the files were in /usr/lib/mapnik and I've fixed this by creating a symlink:

Code:
# cd /lib
# ln -s /usr/lib/mapnik/ mapnik
After I did these two tweak I have been able to complete the example and render the world map image.

Also even though both can be worked around, it should be possible to fix both at packaging level to make workarounds unnecessary.

Offline map rendering in modRana WHEN ?

Even though this is certainly a step in the right direction for offline map rendering in modRana, it will still take some time. The example I've tried is very basic and there might still be some breakage in other more advanced parts of Mapnik I have not tried out yet.

And even more importantly I'll have to investigate what data source to use for usable offline map rendering. The example data source (a single shape file) and style are really simple, but for on the fly rendering on a high zoom level much more data and a much more complicated style will be needed. The data for offline map rendering also needs to be simple to obtain for modRana users. So quite a lot of interesting "challenges" all around.

In short, this is moving in the right direction but will need some time.

PS.: Thanks a lot to marmistrz yet again for the Mapnik port!
__________________
modRana: a flexible GPS navigation system
Mieru: a flexible manga and comic book reader
Universal Components - a solution for native looking yet component set independent QML appliactions (QtQuick Controls 2 & Silica supported as backends)
 

The Following 12 Users Say Thank You to MartinK For This Useful Post: