OpenStreetMap vector rendering with tiling support for Marble

Ander Pijoan

Short description: Improve Marble's OpenStreetMap data support by making it able to read from raw .osm data and render it in vectors. The main problems that will have to be faced are developing a new tilling scheme for managing large data amount queries, extract relevant information depending on the zoom level and match the actual Marble's zoom leves with OpenStreetMap's stepped zoom.

Additional info: http://blogs.kde.org/node/4555

Name:
Ander Pijoan Lamas
 

Email Address:

 

Location (City, Country and/or Time Zone): 
Sopelana, Vizcaya, Spain. Timezone GMT+2.

 

Proposal Title:
OpenStreetMap vector rendering with tiling support for Marble

 

Motivation for Proposal / Goal:
More and more enterprises and users are joining and improving the OpenStreetMap (OSM) community. OpenStreetMap is a collaborative project to build a free editable map of the world. There is an increasing amount of new projects using the osm data and also improving it in order to build the worlds atlas.
 
This picture shows Marble displaying osm image tiles:
OpenStreetMap tiles in Marble

Marble is an Open Source geographical tool for displaying and interacting with atlas data and different thematic maps. It currently supports .osm files but they have to be loaded manually and the zoom levels do not fix well. There is still a lot of work to be done to improve the .osm renderer and the focus is now set on the question whether to render the vector data or just to display the tile map and all the problems that would need to be faced [1].

 

A new tilling scheme is needed to manage .osm data:

Tilling scheme

 

This project will enable interacting with real vector data, making more precise calculations and 3d layers and rendering based on .osm building tags.

 

Furthermore, a new concept based editor for OpenStreetMap is being developed (instead of the current data based editor) for new purposes such as educational tools. Some of this applications are going to focus on teaching kids at school which would be the most secure and fastest way from their homes to school or to improve OpenStreetMaps data by creating games for kids to place shops or points of interesets. All this user interaction will take OpenStreetMap and Marble’s user experience to a whole new level.

 

This picture shows some of the possible mapping interests:

Mapping Interests

 

Building extruding example by using building's height and levels tags:

OpenStreetMap 3d rendering 2

 

I believe this is a great opportunity to learn more about GIS data, especially rendering, which is the part I have less worked on. I have a wide experience in developing GIS applications and, therefore, the .osm format has no mysteries for me as well as all the operations and important details that will be needed to take in account for carrying out this proposal.

 

[1] https://bugs.kde.org/show_bug.cgi?id=199259 

 

Implementation Details:

The main aim is to make Marble able to download osm raw data by itself and render it in vectors [2].

There are two main problems: first, how to manage queries to OpenStreetMap servers when large areas have to be downloaed, which features would be the most representative (e.g. world boundaries) or if Marble should already have a small cache with the most important data for worldwide zoom levels. A new tilling scheme will be developed for this purpose.

We can use a tool like osmosis [3] in order to download or extract just the bounding box from our cache and then depending on the zoom level we can parse the .osm code and display selective data. For clean vector rendering GeoPainter would be used.

 

Extracting data from a bounding box:

Extracting Bounding Box

 

Second, OpenStreetMap has a stepped zoom level which will be need to think of a way to match to Marble’s zooming.

In this way, the reference job list would be this:

  • Develop a tiling scheme that maps lon/lat/zoom tuples to filenames and vice versa. This scheme will act as a cache to save locally the loaded OpenStreetMap data.

  • Use a tool like osmosis to create tiles for a sample region (say, the city you live in).

  • Extend Marble's .dgml format to be able to specify .osm files as input (and the new tiling scheme).

  • Improve the current vector rendering to handle different zoom levels better. It is needed to ask for different types and amounts of data depending on the zoom level.

  • Add more OSM elements for vector rendering in Marble and improve existing ones (e.g. street names)

 

[2] http://www.youtube.com/watch?v=QnZDkxj2SUU

[3] http://wiki.openstreetmap.org/wiki/Osmosis#Extracting_bounding_boxes

 

Tentative Timeline (in weekly intervals until 2 weeks after the end of GSoC):

May 28th - June 10th (2 weeks): Initial contact with the source code. While this first contact with the Marble code some junior jobs will be made:

- Add comments so that the next person will be able to understand the source code much easier.

- Review the API.

- Let the "Open." file dialog remember the previously used director.

- Implement fast adding of measurement points by ctrl+click as proposed in bug 32098 [4].

June 11th - June 17th (1 week):

- Develop the tiling scheme that maps lon/lat/zoom tuples to filenames and vice versa.

 

June 18th - July 22nd (5 weeks):

- Use a tool like osmosis to create tiles.

- Extend Marble's .dgml format to be able to specify .osm files as input.

- Improve the current vector rendering to handle different zoom levels, add more elements and enhance existing ones.

July 23rd - August 5th (2 weeks):

- Bug fixing and facing unexpected issues.

 

[4] https://bugs.kde.org/show_bug.cgi?id=232098

 

 

Do you have other obligations from late May to early August (school, work, vacation, etc.)? Please note 
that we expect the Summer of Code to be a full-time, 40-hr a week occupation. It is important to be clear 
and upfront about other commitments that you may have during that time.

I will have the last exams of my degree on late May and then I will have the diploma thesis public defense on June 3rd. Although my studies finish on June, my intention is to keep on working with DeustoTech's Energy Lab which would mean starting on September and having all summer to  be able to work on the project full-time.

 

 

About Me (let us know who you are!):
I am a 24 year old computer science engineering student at the University of Deusto in Bilbao (Spain). I am completing my diploma thesis with the Energy Lab of DeustoTech, the Technological Institute of the University of Deusto. More accurately, I have developed a tool to extract all the useful data from the Spanish Cadastre database to OpenStreetMap in order to be used in several research projects. It is called Cat2Osm [5].

This picture shows an example for Cat2Osm's result:
Cat2Osm
 

The cadastre is a government registry, that has recently released all its data, in which all the urban and rural areas and constructions must be detailed, such as buildings, linear elements, urban elements, parcels and land use... The possibilities all this information gives are enormous, combining many different knowledge areas. This is the reason why we rapidly started working on a way to translate all to a more manageable, developed and with a big community format like OpenStreetMap.

 

Working on this project I have learned a lot about all the issues you have to face when working with Geographical Information Systems data like switching between projections and datum, common formats for geospatial data representation, ESRI Shapefile, WKT, working with PostGis databases and many tools that are available to solve different types of problems, ogr2ogr, GeoTools, OpenLayers, Osmosis, mapnik...

 

Test for rendering Cat2Osm result for Ciudad Real (Spain)in Openlayers.

http://130.206.138.173/OpenLayers/

By clicking on the right top corner (+) button you can switch between Cat2Osm's result layer and the current OpenStreetMap data layer to see the difference.

 

Cat2Osm has made possible to improve enormously Spain's data quality in OpenStreetMap by automatizing data creation and leaving the last decision on what to import for the local community or enterprises using .osm data for their own databases. Cat2Osm has been developed working back to back with the Spanish OpenStreetMap community, keeping in touch continuously through the Spanish emailing list [6], with a wiki page where the best fitting translations where discussed [7] and always having very clear which was the information that really suited OpenStreetMap. Furthermore, our researches and results have been shown in two workshops here in Spain related to GIS technologies [8][9].


OpenStreetMap's Spanish community has checked every result and propossed the neccesary changes:

Cat2Osm community changes

 

I love the idea of supporting open GIS data and all the new possibilities it can provide, prepare Marble for the upcoming OpenStreetMap changes and to contributing to GIS tools which are becoming more and more essential for new projects and investigation. Cat2Osm has been highly valued by the OSM data users (not only the community but also enterprises) and believe the same will happen with this new features that will be added to Marble.

 

[5] http://wiki.openstreetmap.org/wiki/Cat2Osm

[6]http://lists.openstreetmap.org/pipermail/talk-es/

[7] http://wiki.openstreetmap.org/wiki/Traduccion_metadatos_catastro_a_map_features

[8] http://wiki.openstreetmap.org/wiki/Jornadas_OpenStreetMap_Deusto_2011

[9] http://www.sigte.udg.edu/jornadassiglibre2012/programa/jornadas