Published by breki on 10 Feb 2008 at 08:40 pm
Kosmos 1.10
After two weeks of hard work, I am pleased to announce that a new version of Kosmos is here. Go to Kosmos Home for the download link.
New Features:
- Wiki rendering rules table can now be split into several separate tables. This makes editing the rules more easy, since the rendering page can be organized into several sections and those sections edited separately.
- I added a “subrules” feature for rendering rules: you can now specify a parent rule (say, highway=primary) and child rules (bridge=yes and *). Each child rule can have its own templates, so this enables rendering of bridges separately from other parts of the highway.
- Added support for {{tag|key}} rendering rule selector. This selector will select all OSM elements which are tagged with the specified key, regardless of its value.
- Added support for loading of bz2 and gzip OSM files.
- Icon template now has HAlign and VAlign parameters. This helps when rendering features such as towers as you can now position the tower base right at the OSM node’s location.
- Text template now has a tag fallback feature: you can specify more than one tag in the TagToUse parameter and Kosmos will use the first tag that exists for an OSM element. Example: TagToUse=nat_name;name will cause national names to be rendered for OSM features. If a national name does not exist, a common default name will be used.
- Text template now supports drawing a rectangle around the text.
- Print area can now be set. See below for more.
- Added menu options in Kosmos.Gui for setting the print area to the current map view or to the whole map.
Bugfixes:
- Kosmos now doesn’t fail when duplicate OSM elements are loaded. You can now load two or more adjacent OSM areas which share certain OSM elements.
- Ways with missing nodes are now ignored by Kosmos. In previous versions Kosmos would fail if a way with missing nodes is loaded.
- Fixed the backslash issue when generating tile file paths – this did not work on Linux.
- Rasters are no longer lost when ‘Show unused…” options are toggled.
- Page counts in the printing dialog are now refreshed when page settings change.
- Printing page settings are now remembered when the print dialog is closed.
- Added a workaround code for the MS bug (http://support.microsoft.com/?id=814355).
- All GDI+ objects are now disposed of correctly. There was a resource leak in the previous version when creating new GDI+ pens.
- Added handling and reporting of fatal errors in Kosmos.Gui.
- Fixed a problem with loading obsolete user settings for Kosmos.
Setting the print area
You can now set your own area of the map you want to print. Just select the View|Show Print Area option and click on the blue rectangle to select it. You can reposition the rectangle by moving its corners. Its a little bit clumsy at the moment and also the selection indicators tend to disappear when you click somewhere outside the map. I haven’t yet found a good way of showing and hiding those indicators without redrawing the map. I will try to improve this for the next versions of Kosmos.
Kosmos source code
From this version on Kosmos releases will come together with the source code (Kosmos is now licensed under the BSD license), so I guess this makes it an open source project
. The code documentation is quite patchy, I’ll try to improve this as the development progresses. Note that 3rd party libraries and tools are not included in the source ZIP – there is just too many stuff to include and also I doubt it would be possible due to license limitations of some of these tools.
What comes next?
I have to admit I’ve been neglecting Kosmos tile server, so now I will try to add some new features for it (including shaded relief in tiles, for example). Also, I’ll start working on a solution for the coastline rendering, so that the sea is filled blue in all situations, not just around islands. There is also some talk of making Kosmos run on Mono, we’ll see how that goes. Anyway, expect some new stuff in the following weeks



Skywave on 10 Feb 2008 at 23:33 #
Very nice ! Love the tag fallback function. One question in your blog post you mention the bridge=* but in the RenderingRules it is bridge=yes and when i change that i get an error?
breki on 11 Feb 2008 at 8:42 #
I wasn’t very precise
. The best thing to do is to go to http://wiki.openstreetmap.org/index.php/KosmosStandardRules#Highways and see rules for primary highway, I added child rules for it to draw bridges. I also added description of this feature: http://wiki.openstreetmap.org/index.php/Kosmos_Rendering_Help#Child_Rules .