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
- Speed increase and reduced memory usage: As usual we did a number of efforts to improve performance while using less memory. Major improvement was the implementation of the low zoom optimizations, dramatically reducing the amount of data required for drawing ways in low zoom. Also in general ways with the same attributes are merged if possible. Also a optional renumbering and resorting step was introduced, better organizing the data in the database files, thus reducing IO during data loading. Future optimization will do the same for areas. But we also optimized the style sheet, indexes and rendering code to load and render data faster.
- Support for multipolygon relations: We now handle multipolygon relations, supporting most standard variants. The code is currently refactored again to correctly handle some more complex cases better.
- Modularisation: We have splitted the code into a number of libraries,so there is now a core library, a library for importing of data, a library for the basic rendering engine and one for each backend.
- Improved style sheet: The style sheet syntax has been changed. The new syntax allows better and more compact definitions while on the same time, preparing support for more features. One feature is, that now values are given in mm, allowing better support on different devices (desktop,mobile) without the requirement to modify the style sheet. We also slightly improved the label placing code and the rendering of bridges and tunnels. Also the rendering of the Qt backend was improved in some situations.
- Improved routing speed and quality: The routing speed was increased by around factor 5-6, while the routing quality has been improved (roundabouts, more flexible profiles, support for max speed, better support for turn restrictions). Much work has been put in the resulting route description, now being of comparable quality to other solutions. The route description generator is now also extensible, allowing you to further enhance the quality without changing the core engine.
- Improved import: Some changes were done to improve import speed and better handle buggy data in the import files.
- Better support for non-Linux platforms, especially Windows (mingw but also VisualStudio) and MacOS/IOS, but also Android. We now have project files for VisualStudio 2008 as part of the repository and some JNI mapping code for using libosmscout under Android.
- There is now also better support for 64bit system and for database files >2GB.
- Bug fixing: A tons of bugs were fixed in all code areas.
Some current screenshots
The first screenshot shows the routing output in an IOS application (this is not the libosmscout renderer, though the cairo renderer has successfully been ported to IOS, too. Rendering speed was around 0.1-0.5 seconds, depending of the scene to render). The community member used the router during his holiday on Costa Rica and was happy to use it – and came successfully back to tell 🙂 The next two screenshots are by another community member. He uses a custom 3D renderer on top of libosmscout to draw OSM data in 3D. He thus gains all the data structures, import features, the fast database, concentrating on the 3D aspect. Additional OSM tags for 3D description of building were injected into the database, to get evaluated in the renderer. The project can be found here: https://github.com/canurabus/libosmscout-render.
This is a “no guarantee” list of changes planed for the near future:
- Work on drawing seas and coastlines. There is already some code, I started a while ago. Now is the time to get back to it to add the last obvious “must have” feature in the renderer.
- Some work on the new style sheet language. The alternateColor for ways will be dropped. Instead a style sheet condition will be added to explicitly differentiate between drawing a simple way and a more complex variant.
- Some more work on the router to make it faster. Currently a path in the graph starts and ends at a junction. However the way merging feature allows to have longer paths and thus skip junctions if they are not the target. This should reduce the number of visited nodes.
- Some work on the style sheet to improve look. Move away from the 1:1 copy of the mapnik style.
- Add some more features to the renderer like drawing arrows for oneway streets.
- Add a tool to do some validation on a style sheet, like hints about types that have no style…
- Promote some demos to first class tools by moving them n the repository.