View Single Post
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#1940
Originally Posted by justmemory View Post
Hi MartinK!

I managed to get offline routing work (tried with foot, car, bicycle) - well almost. Address to address and handmade still does not work.

What I did:
- changed routing provider from Monav to Monav server ("Monav" stuck from earlier version of modrana I guess as it now allows only "Monav server" and "Google online"...)

- /core/bundle/signals_pb2.py - comment out line 6 (from __google.protobuf import descriptor_pb2) as it claimed that cannot import it.

- /core/monav_support.py - changed line 25: import simplejson as json (a "try" - "except" method would be better, it is just a simple solution) as it claimed that cannot import json.

- /core/routing_providers.py - changed line 60: result = self._monav_directions(waypoints, route_params) - as it claimed that it takes 3 argument but provided 2.

- /core/way.py - changed all node/Node.lat and node/Node.lon to node/Node.latitude and node/Node.longitude as it claimed that node/Node has no attribute lat.

- /core/instructions_generator.py - changed all node/Node.lat and node/Node.lon to node/Node.latitude node/Node.longitude as it claimed that node/Node has no attribute lat.

For address to address routing I get the following error: waypoints = [x.getLL() for x in waypoints] AttributeError: 'str' object has no attribute 'getLL'. This is valid as for waypoints it gets the real addresses I add in modrana so it cannot convert it to latitude and longitude points.

For handmade routing I get the following error: Modules/mod_route/mod_route.py, line 577, in _handle_routing_result_cb; if result.route and result.returnCode == constants.ROUTING_SUCCESS:; AttributeError: 'tuple' object has no attribute 'route'.

jm
Wow, thanks a lot! I've used your pointers and fixed the Monav Server based offline routing on the N900. I've also released an updated tarball, so you - and anyone else who wants to help with testingt - can check it works correctly now:
http://modrana.org/tarballs/modrana/...-0.54.6.tar.gz

As for the other issues:

Address routing - that's actually expected behavior, as Monav does only point to point routing (+ waypoints along the route, IIRC) based on geographic coordinate pairs. It does not support gecoding (turning addresses to coordinates), so it can't work for address-to-address routing when the device is offline. But of course a sensible error message should be shown in such a case, not a traceback.

Handmade routing (basically, "draw your own route" and let modRana follow it) - it indeed seems pretty broken, not just on the N900, but also when running the GTK GUI on desktop. And it looks like it has been this way for quite some time. Will have to look into it more later.
__________________
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 8 Users Say Thank You to MartinK For This Useful Post: