Friday, December 12, 2008

OpenStreetMap rendering in Silverlight part IX

From talking to people at the last London OSM meet it appears that large ways are not a good idea for performance reasons (the OSM database and editors). For example the River Thames is split into a number of ways, rather than being one big one.

Since I can cope with large ways, and there are performance gains and presentation gains from combining them I did a test applying two techniques.

The first was to "promote" low level tile feature that are deemed interesting at the time of OSM import. So for example I promoted all coastlines from level 12 to level 4, and major rivers from 12 to 9. The promotion level was gut feel.

I then applied the road junction method to coastline features. Then I applied this to the whole of the UK:

This reduced the draw data from 9k to 4k, with a smoother coastline. I applied the road junction method on the fly, however this would make more sense at the point of import for coastlines. This is because when drawing the map I want to know about the individuals roads, whilst for the coastline, rivers etc the split was artificial in the first place.

In the picture there are some lines outside the country which are mostly ferry routes, and the line of detail down the south-east of England is a tile border (there is also one horizontally in Scotland buts it's not so obvious). At this level of zoom the code needs to filter out such small features.

No comments: