Active Topics

 



Notices


Reply
Thread Tools
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#221
Just few words about the latest developments. I have been looking into improving the rendering of the maps. As a part for ensuring quality rendering, I am planning to add Mapnik backend for rendering.

The compilation of Mapnik for SFOS and its packaging is done, at first approximation, for ARM. For i486, I have been held back with what seems to be a bug in SDK and have asked for advice on how to proceed in developers list. When rendering some tiles with a test application on phone, the performance was good as well as the memory consumption. But its early days and would depend on the stylesheet / database layout.

Lots of work is ahead. I have to incorporate Mapnik into the server, design stylesheet together with the database layout. The plan is to use OSM Bright as a starting point (imposm import) and SQLite/Spatialite for data storage. If anyone around is a Mapnik guru, help would be appreciated. At present, I could render Estonia, World map outlines with SQLite database and shapefiles describing the World.

In addition, I am considering to publish OSM Scout Server with Mapnik only via OpenRepos and avoid publishing it in Harbour. That would allow me to distribute following sane Linux model with separate packages for Mapnik and the server. Otherwise I would have to start configuring Mapnik to look for input plugins / fonts in some obscure OSM Scout Server directories. In Harbour, I can publish then the version with libosmscout only, for example. What do you think about such approach?
 

The Following 7 Users Say Thank You to rinigus For This Useful Post:
Feathers McGraw's Avatar
Posts: 654 | Thanked: 2,368 times | Joined on Jul 2014 @ UK
#222
Originally Posted by rinigus View Post
In addition, I am considering to publish OSM Scout Server with Mapnik only via OpenRepos and avoid publishing it in Harbour...What do you think about such approach?
Sounds sensible to me, the harbour restrictions can be a real pain sometimes. Seems like if they wanted tight control over what can be installed for each app to avoid dependency issues etc, then they should have used a container format... but that's OT.

Can you explain what you think the benefits to the end user of using Mapnik will be? I've had a quick look at the OSM wiki but it's still unclear to me - is it speed of rendering, or quality, or both?
 

The Following 3 Users Say Thank You to Feathers McGraw For This Useful Post:
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#223
Originally Posted by Feathers McGraw View Post
Can you explain what you think the benefits to the end user of using Mapnik will be? I've had a quick look at the OSM wiki but it's still unclear to me - is it speed of rendering, or quality, or both?
Quality of the rendering and, in particular, position of labels should be top notch. There has been lots of work done on rendering in this library with lots of attention to details. When compared to libosmscout, Mapnik had much more developer-hours poured into it with the focus on one aspect of the function - rendering.

The stylesheet I was thinking to start with is https://github.com/mapbox/osm-bright . Maybe there are better styles out there that should be considered as a starting point. If so, let me know (ASAP).

When I manage to get stylesheet fully ported (there are several steps involved), it would be possible to engage end-users into design of the map styles using tools developed for Mapnik. Again, eco-system of Mapnik is much bigger allowing us to reap benefits from it.

As for speed of rendering, this is hard to judge right now. With a crippled style I was using it was very fast, but let's see it later.

There will probably be drawbacks too. In particular, right now, the data files (SQLite database) for feeding Mapnik is 2-3 times larger than libosmscout import. But that datafile includes all traffic lights and probably some other not so important information. For now, it was important to see that its actually possible. Let's see how well would it work out.
 

The Following 5 Users Say Thank You to rinigus For This Useful Post:
otsaloma's Avatar
Posts: 141 | Thanked: 1,530 times | Joined on May 2011 @ Finland
#224
Sounds interesting! Two questions come to mind: What stylesheet language do you plan on using and are there graphical editors available for it? Does Mapnik and your stylesheet format make it easy to do different ppi tiles?
 

The Following 4 Users Say Thank You to otsaloma For This Useful Post:
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#225
Originally Posted by otsaloma View Post
Sounds interesting! Two questions come to mind: What stylesheet language do you plan on using and are there graphical editors available for it?
Its in CartoCSS which would be converted into XML that Mapnik uses to define maps and styles. Since we have multiple maps (different regions/countries) on the device, I am planning to define styles using normal mapnik approach (Carto -> XML) and then populate it by the server with the maps installed on device. That should allow to render all installed maps at once without the need to select one.

I am planning to take OSM Bright (it seems to be a rather popular style and the base for several others) and adapt it to SQLite import. I am not planning to edit style as such, there are probably better artists out there

As for GUI, there are probably at least 2, https://tilemill-project.github.io/tilemill/ is one of them.

Originally Posted by otsaloma View Post
Does Mapnik and your stylesheet format make it easy to do different ppi tiles?
Yes, there seem to be no problem with high PPI. As far as I can see, user would be able to define scaling factor that (s)he likes and its gonna be rendered on-fly with the same stylesheet but correspondingly wider/larger elements (lines, fonts, ...). So, it all fits the bill, as far as I can see.
 

The Following 4 Users Say Thank You to rinigus For This Useful Post:
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#226
I have just published a minor update by releasing 0.8.1.

Main job was done by translators who updated the strings, thank you. The update was published to get i486 fix submitted to Harbour as well. There is no new functionality added nor anything else refined.

I hope nothing got broken with i486 now.
 

The Following 3 Users Say Thank You to rinigus For This Useful Post:
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#227
Release: 0.9.0

I am happy to release 0.9.0 that brings Mapnik as an alternative rendering backend. This is probably the biggest release so far in terms of size - with the bundled libraries we are reaching 15MB for RPM package. And that's without mentioning huge map files (more on that a bit later). The release is not perfect, but I can probably tinker on it for months if I want to get it out very polished. So, I decided to release a bit early.

Mapnik brings an excellent rendering of maps including world coastlines and rendering of all available maps on device. But all this comes at cost - large maps and possibly slower rendering. So, its up to you to decide which backend to use. I have a preference to use Mapnik

With the introduction of new backend, there is a problem with the map updates. However, since I am not planning to add too many backends, I think its better to work around it on your (as a user) side than to start investing time into programming fixing the issue. So, a general remark: When a new backend is added, such as with the release of 0.9.0, please ensure that you have subscription information updated. For that, in Map Manager, click on "Check for updates", decline updates, and unsubscribe/subscribe each territory that you have subscribed. After that, proceed with the downloads. This is not needed if you don't want to use the added backend(s).

Finally, regarding this release, there are some issues with the maps distribution server. Right now, I switched to old CDN model. As soon as data.modrana.org is back online, I will stop distribution via CDN (or when the credit runs out, whatever comes first). So, before downloads, just click on "Check for updates". This should reroute you to the current distribution server. Sorry for inconvenience. If anyone has an access to the server that can be used for maps distribution and wants to contribute, please let me know, we could always use them as a backup, for example.

I will look into how to reduce Mapnik datasets. There is an idea on switching to different geometry BLOB format, but it requires some testing. I will not be able to probably get as low as libosmscout does, but would give a shot on reducing it. Right now, serving Germany/France as a single database is not that simple on mobile with Mapnik, but I haven't tried.

In addition to the reduction of the map database size, there is some work to be done on styling it as well. I have adopted a style used as a basis for many others and modified it to suit SQLite database. Style is available at https://github.com/rinigus/osm-bright-sqlite . It does require further review on which features should be visible at which zoom level. Try to use it and give the feedback on when should we should house numbers, POIs, and such. Some braver users could try to re-style it, make a style for night driving, ...

Enjoy using it!
Attached Images
 
 

The Following 9 Users Say Thank You to rinigus For This Useful Post:
Posts: 127 | Thanked: 313 times | Joined on Sep 2016 @ Yekaterinbourg, Russia
#228
712+(241+223) MB downloaded in 25 minutes.
 

The Following 4 Users Say Thank You to XOleg For This Useful Post:
otsaloma's Avatar
Posts: 141 | Thanked: 1,530 times | Joined on May 2011 @ Finland
#229
Tested the Mapnik rendering on the tablet, it seemed to work fine. Rendering speed was reasonably good. The map style though is as they state a bit of a "starting point".
 

The Following 4 Users Say Thank You to otsaloma For This Useful Post:
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#230
Originally Posted by otsaloma View Post
Tested the Mapnik rendering on the tablet, it seemed to work fine. Rendering speed was reasonably good. The map style though is as they state a bit of a "starting point".
I am planning to mainly work on the performance and shrinking the databases. Some changes may require special patches for mapnik, but I'll submit them upstream. For example, I think I found the way to reduce maps significantly, about to the half of their current form. To my surprise it did not effect the performance (initial testing on onyx), so we should probably switch to that. However, that means I would need to keep two versions for the style - one for mobile with all patches applied and the second for PC and style design.

For best performance, I tune the database layout to match the style. This means that if we want to make major changes in loading sequence, we would be better off to tune the database too. Which is not a major issue, as long as we remember it. In particular, you would want SQL SELECT statements in https://github.com/rinigus/osm-brigh...spatialite.mml to match SQL database as arranged at https://github.com/rinigus/osm-brigh...reorganize.sql .

I have not looked into GUIs on style editing. Someone who wants to adjust styles, should probably look into https://github.com/kosmtik/kosmtik or https://tilemill-project.github.io/tilemill/ . TileMill seems to come in a package that installs mapnik as well. So, its not good for me (I have to use a custom one), but could be great for a designer. I don't know if they come with SQLite plugin enabled though. kosmtik I tried, but it didn't seem to work on my Linux PC immediately, probably some tinkering is required.

Anyway, to contribute to style development: we could collect the ideas either here or in issues of the style project; try to setup GUI and see if it works. I'll be happy to help if you run into problems with the setup of GUI, as much as I understand how it works.

If there is someone interested in working on a style, let us know and see how we can help.
 

The Following 4 Users Say Thank You to rinigus For This Useful Post:
Reply

Tags
geocoder, linux, offline maps, router, sailfish os, tiles


 
Forum Jump


All times are GMT. The time now is 23:33.