View Single Post
Posts: 87 | Thanked: 535 times | Joined on Oct 2010 @ Karlsruhe, Germany
#121
Installing a whole lot of offline routing maps is something I'd like Marble to handle fine. When calculating routes, it determines the right country by checking the bounding boxes of all countries and then queries the monav backend. There are some heuristics (checking large countries first, trying the last used country before all others) to speed it up, though even iterating through all countries should be fast.

I think the culprit for increased memory usage is a change in the bounding boxes that happened in the last map update. I switched from cloudmade to geofabrik as the map data source. The latter provide detailed bounding box polygons which are unfortunately quite large for some countries. The largest one, Indonesia, for example has a size of 7 MB (!). In the current implementation these bounding boxes are loaded into memory. If you happen to have all ~300 maps installed, this sums up to around 75 MB which is a problem on the N900.

Fortunately there's a workaround I can implement: Detect 'large' bounding boxes at load time and replace them with a simple rectangular bounding box. This will decrease memory usage significantly, but implies that I need to change the backend query as well: Since the rectangular bounding box is a very rough approximation of the original shape, there will be some false positives when route requests lie inside the rectangular bbox, but not in the polygon. In that case other countries have to be evaluated as well. A better fix will be to replace the bounding boxes with a simplified polygon approximation. This should be doable with a variant of the Douglas Peucker algorithm that does not allow polygon shrinking.

To cut a long story short: I'll implement a workaround for the final 1.2 version. A later map update with simplified polygons will fix the underlying issue.

Note that in contrast to offline routing, installing a huge amount of offline search databases (which are included in the offline maps now) does lead to a slowdown of offline search queries. That's because there's currently no way to avoid searching a country database based on the search query.

Re England, Scotland: The great britain map does cover them and there are indeed files missing in the offline maps for england and scotland. You're also right that turkey and russia are split by continents, leading to a similar problem like the georgia name clash. I'll work on an update of the maps on the server in the next days to fix it. Other than those maps not working installing them shouldn't affect Marble negatively, however.

@niqbal: What kind of problems did you experience? Was offline routing not working for a certain area?

@Fellfrosch: Great to hear We don't have special Marble donations, but since KDE provides servers and covers our expenses (e.g. developer sprints) it makes sense to donate to KDE. Currently we're looking to get the T-shirts we'll provide as prizes for the Voice of Marble contest sponsored.
__________________
Marble - Find your way and explore the world with your N900 or N9 | Your voice counts!
 

The Following 2 Users Say Thank You to earthwings For This Useful Post: