libosmscout status update Juni 2012


libosmscout status update Juni 2012

After a while a new status update. As usual even while being silent for a while, the project is still healthy and alive and in fact there were a number of interesting changes – not only by me but by the rest of the community.

Changes since the last update

Read the rest of this entry »

libosmscout status update october 2011


Here is a list of recent changes to libosmscout: Read the rest of this entry »

libosmscout status update


As usual a status update about the recent improvements of libosmscout.

  • I reworked the way index. Now way index again uses a tiled index instead of the quadtree index as implemented for areas. However now tile size depends on the individual type of the way – thus improving index scan performance.
  • You can now add a minimum magnification for areas in the style sheet. This allows you to force the drawing engine to start drawing areas of a certain type starting from a certain magnification even if the area would be big enough to be visible on a smaller magnification. The style sheet now uses this for buildings to avoid map overloading (by moving display of building to a bigger zoom level than before).
  • Added an IGNORE option for the type definition. This allows you to define types but ignore them in turn during import. This reduces the risk that automatic type detection mechanism guess wrong.
  • I did a number of type definition and style sheet file improvements.

Over all this should improve the visual quality, in this case especially for low magnifications, and drawing speed. This also should avoid gaps in motorways as rendered before. See the screenshots (which also features the improved plate labeling algorithmus recently implemented).

New screenshot showing the result of recent changes

New screenshot showing the result of recent changes

New screenshot showing the result of recent changes (zoomed in)

New screenshot showing the result of recent changes (zoomed in)

Analysis shows that currently the number of vector points dominates drawing speed and memory consumption. In further steps I will try to reduce the number of points passed to the drawing engine.

Next steps are:

  • A demo showing how to efficiently draw tiles.
  • Rename the “area index” into “area area index”.
  • Add an optimization flag to the type definition. Ways with this flag will be scanned and rebuild into longer ways with fewer points (optimized up to the certain magnification). Map drawing (if requested) will then prefer such data. This should further reduce drawing speed for low magnification tiles.

Improved numeric index, libagg backend, configuration syntax


Working down by own roadmap these are the most important recent changes:

Reworked configuration files

I did switch from XML based configuration files for preprocessing (*.ost) and style definition (*.oss) to DSL style configuration files (using Coco/R for scanner parser generation). As part of this change I got rid of manually defining Ids to auto generated ids, making configuration simpler.

Improved numeric index

The numeric index now generates index pages of a given block size (4096 by default). This should improve OS low-level file block caching/handling. As a result preprocessing got a bit faster. There are still some code optimizations left, that might increase performance even further.

libagg backend improvements

While the libagg backend is not finished (missing support for external images, some smaller missing features that should be rather easy to add), I added path dash and font support so that resulting maps are now usable. Image quality between cairo, Qt and agg backends is only visibly different in font handling (libagg being better IMHO). I did not yet do any in deep performance comparison, but it looks like performance between cairo and libagg backend is comparable, with libagg possibly being faster in some cases. Main benefit of libagg is the possibility to draw into offscreen buffers without any OS support. Here are screenshots of the same map drawn with cairo and libagg.

cairo backend example

cairo backend example

libagg backend example

libagg backend example

libosmscout status update


Just a small message to make sure nobody things project is dead, while it is still alive.

What happened between this and the last blog entry:

  • Improved demo applications. Now the Illumination and Qt demos have the same feature set.
  • Improved speed of import (germany in around 40 minutes).
  • Support for *.pbf files (which improved execution time of the preprocessing step by factor 12!).
  • General improvements of the code base (more documentation and comments, improved interfaces).
  • Dramatically reduce amount of memory required (now around 20 MB or less for map of germany).
  • Finished Qt backend (visually equal to cairo backend).
  • Improved interface for map drawing backends, now even more code is implemented in the abstract base class. This should make implementing new backend even simpler).
  • Improved standard style.
  • Initial version (no dashes, no labels, no icons) of libagg backend (very fast software vector renderer).

It should now be possible to integrate libosmscout into your applications without much problems.

Next goals: Read the rest of this entry »

libosmscout now supports Qt


Libosmscout now supports Qt. Now you can use MapPainterQt instead MapPainterCairo to draw maps into a QPainter.

I also added OSMScout, a simple Qt application that mimics parts of TravelJinni (the libillumination/cairo counterpart). It not yet has all the features TravelJinni has, but already shows how map integration should be done in Qt.

Below is a screenshot of OSMScout

Screenshot of the OSMScout application

Screenshot of the OSMScout application

…and the same area as display by TravelJinni:

Screenshot of the TravelJinni application

Screenshot of the TravelJinni application

While visually both maps look very similar (small differences in text rendering) the are performance differences. While Qt claims to be fast, cairo in fact is faster for simple image surfaces (under X11). Judging from Google investigation using a OpenGl painter should burst Qt performance – but this has yet to be tested (and new version of cairo support OpenGl, too).

libosmscout and TravelJinni now working under Windows, too


Just a short notice that with the recent Illumination and libosmscout changes, TravelJinni is now working under Windows, too Read the rest of this entry »

Follow

Get every new post delivered to your Inbox.