View Single Post
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#961
Originally Posted by Joseph9560 View Post
I can see that Rana (on which modrana is based) actually uses vector data rather than tile data, any specific reason for modrana to use tile data while starting the port?
When I forked Rana in early 2010 (it was about 2 years dead at that point) map rendering was quite broken. It would just show a single place on the map and won't pan, it would zoom but in a weird way. The map was also fairly basic, just (main) roads on a dark-blue background.

So I disabled it, fixed tile loading and started to work on all other broken & missing features (POI, online routing, turn-by-turn navigation, batch tile download, map overlay & rotation, tracklog support etc).

The source code of the renderer (pyrender) is actually still inside modRana BTW. I took a quick look at the code after about two years - and it actually doesn't look that bad. If I understand it correctly it takes an *.osm file (it can even download the OSM data for given tiles), loads it to memory using an XML parser and then renders a set of predefined tags as points or (poly)lines. There seems to be even some support for textual labels. It uses Cairo or PIL (Python Imaging Library) as the drawing backend.

Looks like that it might be a quite good base for a simple map renderer + there is a lot of room for various optimizations (pre-filtering OSM files, marshaling/caching parsed XML data, QPainter backend,...). Any interested developers ?

When I'm at it, I'll also take a closer look at the Kothic realtime python map renderer.
__________________
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)

Last edited by MartinK; 2012-03-15 at 13:30.
 

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