Archive for July, 2008

Published by breki on 23 Jul 2008

Kosmos WorldFlier – New Screenshots

I uploaded some new screenshots of WorldFlier to flickr.com, this time of Mount Etna. The work on WorldFlier is progressing, but there are still a lot of things to fix – relief still doesn’t exactly match the contours (well it is a prototype after all).

 

The screenshots show WorldFlier and Kosmos GUI – what you set in Kosmos GUI to be visible will be displayed in the 3D. So first I generated a elevation coloring map and then I used Landsat’s satellite images.

No OpenStreetMap data this time – there were some changes in OSMXAPI that prevented me from downloading the latest data.

Published by breki on 23 Jul 2008

Kosmos Featured On Golem.de

Kosmos is today featured on the German IT-news portal golem.de. The article presents the Kosmos application and also features screenshots and a video I recorded few days ago of the upcoming WorldFlier 3D rendering addition to the Kosmos.

This is the second article about Kosmos on golem.de. The first one was published in January.

Published by breki on 18 Jul 2008

OpenStreetMap 3D – Short Video

I uploaded a short video of the OSM 3D rendering in action:

Now I go to bed :)

Published by breki on 18 Jul 2008

Kosmos 2.1

New version of Kosmos is here. Since I’ve neglected the rendering engine during the implementation of 2.0 release, I decided to do most of the work for this release on improving the rendering.

You can download the 2.1 version from the standard place: http://downloads.igorbrejc.net/osm/kosmos/

UPDATE (July 19th): I discovered a small bug in the new release – generated contours were not shown on the map. This has been fixed now, please download a new package.

So what has been improved?

Relations

Kosmos can now render relations. I’ve added a sample rule in general purpose rules Wiki page for rendering cycle routes:

Rule Name Targets Selector Template Options Comment
RouteCycle relation type=route route=bicycle Polyline (MinZoom=7, Color=#50FF0718, Width=7:1;17:18, Curved=true)

will produce a pinkish half-transparent cycle route:

image

Note that rules ignore roles of members in a relation – currently I don’t see how the roles could be incorporated into the rendering rules.

Text Rendering

There is a new TextMode called WayCenter which draws the text (roughly) in the center of a way:

image

There are also two new parameters which enable rendering of outlined text: OutlineColor and OutlineWidth, example (sorry for the odd formatting):

PlaceTown node place=town Text (MinZoom=10, MaxZoom=15, Color=black, TagToUse=name, FontName=Trebuchet MS, FontStyle=bold, FontSize=10:10;17:25, OutlineColor=white, OutlineWidth=20%)

will produce something like this:

image

Kosmos now knows how to wrap labels:

image

The wrapping is done using the “Text label wrap factor” preferences setting. It is a ratio of (roughly) maximum line length compared to the line height. Normal values are somewhere from 4 to 10, I guess.

Map Scale Indicator

… is now shown on the map:

image

You can turn it off. You can also switch from metric to U.S. Customary units in Preferences dialog (“Use metric units“).

Rendering Engine Speed-Up

I’ve refactored quite a large piece of rendering engine code to increase the rendering speed and lower the memory consumption. Basically, in previous versions each rendered map element had all its settings (color name, width, …) stored by itself. Now the settings shared by multiple elements are stored in one place (a “style”). This also allows caching of GDI+ objects for each style without the need to recreate them for each map element.

There are also a number of bugfixes in this release (basically every bug that was reported has been fixed).

Source Code

I’ve also published the sources here: http://downloads.igorbrejc.net/osm/kosmos/source/ . I’ll prepare a special Wiki page with some information about the source code and what one can and what one cannot expect from it. So please be patient before starting to send me hate notes about not being able to compile the source code ;)

Published by breki on 17 Jul 2008

OpenStreetMap In 3D

Well Google Earth it is not ;) .

A long time ago I mentioned I’ve been dreaming about drawing OpenStreetMap maps in 3D. Well for past few days I’ve been playing around with DirectX. Basically I took Mini 3D Terrain Viewer tool kindly provided by Patrick Murris and did some cannibalising of the code to make it draw a SRTM3 generated relief with an Kosmos-exported map of my home town Maribor (OSM map).

Here are some screenshots of the results so far (you can download somewhat larger versions of images from here).

Image1 Image2 Image3 Image4 Image5

The images are reduced from 1680×1000 resolution due to bandwidth constraints. The Kosmos-exported map which was used as a texture has a resolution of around 8000×8000 pixels (elevation contours are a part of that image and not rendered as 3D objects themselves). The whole thing was rendered on a GeForce 7600 GS.

This is just a crude prototype of 3D rendering which I want to introduce into Kosmos in the future. My wish is to draw OSM elements directly in 3D and not as part of a texture, but since I’m not an expert on DirectX, this could take a while (any helpful suggestions from 3D experts will be appreciated). But even in this crude state I think it looks quite nice, don’t you think?

Published by breki on 11 Jul 2008

Kosmos – What Comes Next

It has been a few days since Kosmos 2.0 version has been released. Other than initial reports with problems running Kosmos on non-English version of Windows, I haven’t received any other bug reports – is it because it works so perfectly or that there are just too much bugs to report? Just kidding :)

Anyway, now that I have finished most of the work on the GUI redesign, I can concentrate on improving the rendering engine, which I mostly neglected during the past months. A few days ago I implemented support for rendering relations (yes, you can now render cycle ways similarly to the CycleMap). I also added the ability to render outlined text – this has been lying on my todo list for a long time.

While implementing these features I accidentally had a “bright” idea on how to reduce the memory footprint of rendering objects in Kosmos and also (hopefully) increase the speed of rendering.  Right now I’m about half-done, I’ll probably need a few days more to finish it. So Kosmos 2.1 is coming soon…

Published by breki on 08 Jul 2008

Kosmos 2.0 – "Illegal Hotkey" Fix

Yesterday I had a few reports that Kosmos GUI breaks down right at the start, reporting “System.ArgumentException: Illegal hotkey ‘Ctrl+N’.” error. I could not reproduce this problem, but I think it occurs only on non-English Windows, probably because the Microsoft code I used to parse hotkeys expects different forms of hotkeys for different languages. I tried to change the UI culture for the application and test if the error occurs then, but to no avail.

I decided to fix this by implementing my own parsing logic for hotkeys. Again, I could not test if this now works for non-English Windows. So please download the latest package (2.0.508.0) and let me know if this problem is solved.

Published by breki on 07 Jul 2008

Kosmos 2.0 Is Here At Last

After almost 5 months of development, I can now announce that I’ve just released a new version of Kosmos. I’ve talked about it several times, although my blog posts have been reduced to practically zero – I’ve been so busy with Kosmos that I just didn’t find the time to write.

NOTE: before proceeding I should warn you that I consider this release to be in beta stage. I spent the last month killing bugs in Kosmos, but since a lot of new functionality was added there are bound to be quite a few bugs still lurking around. If/when you encounter them, please report them on the Kosmos OSM Wiki talk page.

Download

You can download the latest version from here. I’ll be also publishing the source code in the next few days.

So what’s new?

Tabbed Document Interface

First of all, the GUI interface has been completely rewritten. Kosmos GUI now uses an tabbed document interface (TDI):

image

As you can see from the screenshot, the user interface is somewhat reminiscent of Visual Studio. You have a Project Explorer through which you can edit the project file. There is the Properties window which displays properties of the currently selected project or data file. There is also the Activity Logger window which shows the activity Kosmos is performing.

Of course, there is the Map window with the familiar Kosmos-rendered OSM map. You can also look for new maps using the Web Map window which is able to display most common Web maps (OSM, Google, Yahoo, Microsoft).

Downloading OSM Data

Kosmos can now download the OSM map data from the OSMXAPI server. So in theory you can now generate a map without any additional tools. Be warned though: OSMXAPI can be quite slow sometimes, especially if you choose to download large map areas.

GPX Support

Kosmos now has the ability to download GPS data from a GPS unit and display it on the map. You just need to have gpsbabel software downloaded and saved somewhere on the disk.

Relief Contours

I integrated the Srtm2Osm tool into Kosmos GUI so that users can generate relief contours for any map area:

image

Imagery From Landsat And openaerialmap.org

Another nice feature in Kosmos 2.0 is the ability to download free satellite imagery from Landsat and openaerialmap.org sites:

image

Tile Server

The tile server (launched from the Kosmos Console) is now able to render all of the data specified in the project file. This means that you can now render tiles which contain shaded reliefs, satellite imagery, GPX tracks, elevation contours.

Other Stuff

There are lot of other improvements which I will describe on the Kosmos OSM Wiki pages in the next days.

What’s Missing

This is not the end of Kosmos development, far from it. I still have quite a few ideas I want to introduce into Kosmos. I realize that a lot of things are still missing – I have a “to do” list that is growing day by day. Hopefully future releases will have even more cool features. So be patient… And do send me some feedback, critiques and ideas :)