maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [SFOS] [WIP] Merkator - Offline map application & engine (https://talk.maemo.org/showthread.php?t=94329)

Custodian 2014-12-18 12:21

[WIP] Merkator - Offline map application & engine
 
https://www.dropbox.com/s/bf0c2o6z3u...tor86.png?dl=1

Hi there!

As you may know, I announced Merkator project quite a while ago.

Lots of stuff have been done since that time, and some more to be done before widly-beta can be released. But project reached the point, where some details can be revealed.

Merkator is an offline map application. Offline means that you need internet connection only during download/update phase for your maps. And you dont need internet connection for browsing map data, search for POI/Address or finding a route.

Screenshots:
http://i63.fastpic.ru/thumb/2014/121...e4944dc48.jpeg http://i63.fastpic.ru/thumb/2014/121...9f1447cfb.jpeg http://i63.fastpic.ru/thumb/2014/121...9663e82d2.jpeg http://i63.fastpic.ru/thumb/2014/121...22a9bcd05.jpeg http://i63.fastpic.ru/thumb/2014/121...72109a0c2.jpeg http://i63.fastpic.ru/thumb/2014/121...de05c37ed.jpeg http://i63.fastpic.ru/thumb/2014/121...9decfa355.jpeg http://i63.fastpic.ru/thumb/2014/121...9b7619c9c.jpeg http://i63.fastpic.ru/thumb/2014/121...aba05cd4a.jpeg http://i63.fastpic.ru/thumb/2014/121...785f431b5.jpeg

What is done:
  • Downloading/parsing/importing map data from different sources (new sources could be added easily). Geofabrik, Mapzen, Metro, any small-sized custom region.
  • Partial MapCSS-styles support for coloring schemes and POI aggregation
  • Map rendering with selected styles/POI
  • POI/Address search
  • Qt/QML Plugins for Tiled Engine & Geo Coding.

What is planned:
  • Basic UI :D
  • Extended CartoCSS/MapCSS support
  • Local service for tile rendering on-demand for other applications which cannot use qt/qml plugins directly.
  • Route support
  • Qt/QML plugin for Routing.
  • Unexpected improvements

As you know, there are awesome map projects already exists for jolla(Poor maps, ModRana and others), so my goal was to focus on internal stuff, which can be reused.

All merkator internals are organized as libraries and qt/qml plugins(QGeoXXX stuff), which can be re-used. When region is downloaded and processed by Merkator, all data will be available for any application, so they also can be considered 'partially offline', atleast for tile data.

For example Merkator map interface is simple:
Code:

Map {
  plugin: Plugin {
    name: 'bmap';
    PluginParameter {
      name: 'mapslot'; value: 'world'
    }
  }
}

This will not be turn-by-turn navigation program, but it could supply data for such program with routing plugin.

I'm still considering license for the source code, but probably it will be released on GitHub.

Stay tuned for first releases!

IGG campaings are trending now, should I launch one to boost Merkator?

nodevel 2014-12-18 12:34

Re: [WIP] Merkator - Offline map application & engine
 
Wow, this looks very promising! So the first map application with vector map support for SailfishOS is in the works (not counting Modrana plans, which I would like to see materialized as well)?
At first, I thought it was Merkaartor - so no editing functionality planned? :)

Quote:

Originally Posted by Custodian (Post 1452673)
IGG campaings are trending now, should I launch one to boost Merkator?

I'd say go for it :)

EDIT: Yesterday Nemosyne (Mnemosyne port) appeared in the Store and today this - I can soon get rid of both Android apps I'm currently relying on.

Custodian 2014-12-18 12:41

Re: [WIP] Merkator - Offline map application & engine
 
Quote:

Originally Posted by nodevel (Post 1452675)
Wow, this looks amazing! So the first map application with vector map support for SailfishOS is in the works (not counting Modrana plans, which I would like to see materialized as well)?

Map image is builded of tiles(xyz), which are generated with cartocss rules, i.e. 'default-standart' osm map, or only roads, or only cafe & bank POI but no others, etc. Tiles are raster(png) and precached for faster usage. But could be vector, not sure if this is really needed here.
Quote:

Originally Posted by nodevel (Post 1452675)
no editing functionality planned? :)

Only browsing/searching functionality.

Watchmaker 2014-12-18 12:55

Re: [WIP] Merkator - Offline map application & engine
 
I'm not really sure about this, but aren't vector maps lighter (less space-consuming) than raster ones? Also, I always thought vector maps look better... just my 2 cents ;)

Anyway, I'm really happy you are on this, Basil. I didn't know about this project of yours until know, but I kinda knew you were onto something big, openrepos could not be your only active project :p

Custodian 2014-12-18 13:19

Re: [WIP] Merkator - Offline map application & engine
 
Quote:

Originally Posted by Watchmaker (Post 1452679)
I'm not really sure about this, but aren't vector maps lighter (less space-consuming) than raster ones? Also, I always thought vector maps look better... just my 2 cents ;)

This is not only about space (as you can fit 32gb sdcard in your phone to preserve more cached data) but also about battery life.
My short test at earlier project stage shown huge impact when maps are generated in realtime with vector area or even vector vs raster tiles. Also, maps are highly detalized (as almost all data from osm xml is used), and requires POI icons, so svg tile was bigger than png with custom palete.
I'll test things again show some numbers.

Watchmaker 2014-12-18 13:29

Re: [WIP] Merkator - Offline map application & engine
 
Quote:

Originally Posted by Custodian (Post 1452683)
This is not only about space (as you can fit 32gb sdcard in your phone to preserve more cached data) but also about battery life.

If we have the option to save maps on an sd card, then I'm fine with both options... I recently had to rebalance my btrfs internal memory and I'm trying to pay more attention on how I use it.

I didn't think about battery consumption, by the way.

nodevel 2014-12-18 13:36

Re: [WIP] Merkator - Offline map application & engine
 
Quote:

Originally Posted by Custodian (Post 1452677)
But could be vector, not sure if this is really needed here.

No, I think this is fine, as long as one can set the maximum cache size (or directory as mentioned above).

Custodian 2014-12-18 20:05

Re: [WIP] Merkator - Offline map application & engine
 
Quote:

Originally Posted by otsaloma (Post 1452787)
Assuming this means a server running on localhost that looks and acts much like any online tile server

Exactly.

Quote:

Originally Posted by otsaloma (Post 1452787)
Can you tell us what tools you're using to render the tiles?

Custom C++ engine, standard qt classes QLinePath/QBrush etc.

javispedro 2014-12-18 22:12

Re: [WIP] Merkator - Offline map application & engine
 
Quote:

Originally Posted by Custodian (Post 1452683)
My short test at earlier project stage shown huge impact when maps are generated in realtime with vector area or even vector vs raster tiles. Also, maps are highly detalized (as almost all data from osm xml is used), and requires POI icons, so svg tile was bigger than png with custom palete.
I'll test things again show some numbers.

Why aren't you rendering "just in time"? Are the off-the-shelf OSM renderers too slow? Or did I just parse this wrong?

Custodian 2014-12-18 22:27

Re: [WIP] Merkator - Offline map application & engine
 
Quote:

Originally Posted by otsaloma (Post 1452816)
Custom -- so you're not using Mapnik or similar existing tools? How do you handle things like label placement?

No, whole thing is written in c++. Labels, routes (roads) signs and others are placed on same coords (specified by osm data), and cropped on tile borders. All elements (backgrounds, areas, paths, pois, signs are drawn in a bit wider area, than actual tile, and then cropped to tile size), so no problems (or very little onces) occures on tiles borders.

Quote:

Originally Posted by otsaloma (Post 1452816)
Do you convert those downloaded data dumps into some other format to keep on disk? A database? Vector tiles?

Data dumps (xml or pbf) are converted into internal format.

Quote:

Originally Posted by javispedro (Post 1452818)
Why aren't you rendering "just in time"?

Tiles are rendered on request(just-in-time), there are no pre-rendering during import process. If cached tile exists (created earlier with same meta-request) it is used.
If we talk in ms: render new tile from raw data >> load/render svg tile > load/render png tile.

Quote:

Originally Posted by javispedro (Post 1452818)
Are the off-the-shelf OSM renderers too slow? Or did I just parse this wrong?

I dont know why none of map apps written in python uses Mapnik(or other tools) for offline processing/generation for instance. It is working well on jolla, since this is python + postgresql.
To my mind - they are slow.


All times are GMT. The time now is 01:08.

vBulletin® Version 3.8.8