First vector tiles rendering

I am going to have a happy weekend, at last the first vector tiles started to appear in Marble!!

I finished the parser for Osmosnimki.ru tile a few days ago and with it,independent .js files loaded from the computer where parsed and rendered. But the hard part was now to create all the code for managing vector tiles.

Json Parsing 1Json Parsing 2For DGML format, a new tag <vectortile> has been created for vector tilling.

Marble’s code had only TextureTile class for handling downloads, images, tile zoom levels and rendering. The best solution was to create a new abstract class called Tile than handles common tile manipulation and then make TextureTile (containing just the image) and a new VectorTile (containing a GeoDataDocument with all the vectordata) inherit from it. Some similar processes have been done in some other parts of the code.

Now when Marble reads the tag <vectortile>, it creates a VectorTile that downloads files just the same way as it used to do with images but now it will call all the available data parsers to extract vector data from the downloaded file. In the future if calling all the parser turns out to be excessive, maybe we could choose which parser to call by reading the format attribute in the DGML map and comparing it with the available parsers.
When each VectorTile downloads its file, it parses it and creates a GeoDataDocument which is sent to the TreeModel in order to be rendered.

Sounds quite simple but I must admit that there have been some big problems to make this possible.

This is a first view of the how vector tiles start to be downloaded and rendered when we travel through the globe:

Vector tilling demo 1

As you can see the server only has some tiles so not all of them are downloaded. There still lots of things to fix but at least for this week I’m very happy with the work done :)

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos necesarios están marcados *

*

Puedes usar las siguientes etiquetas y atributos HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>