Marble/VectorTilingProposal: Difference between revisions

From KDE TechBase
Line 30: Line 30:


As you can see the file just contains the clipped polygon data. It does not contain the whole polygon data e.g. for the whole Eurasian-African coastline for this zoom level since that would add lots of data and would defeat the idea of the tiles (imagine having to download the whole Eurasian coastline at zoom level 16 just to display a small part of Portugal ....).
As you can see the file just contains the clipped polygon data. It does not contain the whole polygon data e.g. for the whole Eurasian-African coastline for this zoom level since that would add lots of data and would defeat the idea of the tiles (imagine having to download the whole Eurasian coastline at zoom level 16 just to display a small part of Portugal ....).
Now what would happen if the user started Marble and would zoom so that tile level 2 gets activated? It would download tile by tile. What we'd like to avoid at all cost is that tiles appear and are surrounded just by a plain white area like this:
[[File:hooknode_c.png | 200px]]

Revision as of 14:58, 28 May 2012

Vector Tiles for Marble

Here are a few requirements that need to be met for technical, common-sense or organizational reasons. Of course they don't have to be met immediately but should at least serve as a goal.

Server Requirements

  • For reasons of performance tile data files should be available statically (so it shouldn't be necessary to have a script create the tiles on demand).
  • It should be easy to set up any server based solution on the KDE server.
  • Tile update needs to be possibly regularly (e.g. once a week).
  • The tiling access scheme should be similar to the current bitmap tiles: i.e. the access urls should be similar to e.g. a.tile.openstreetmap.org/3/4/2.png

Tiling Requirements

  • It needs to be possible to render single tiles alone.
  • It should be possible to show tiles from different tile levels at once.
  • It needs to be possible to identify features across tiles and across tile levels. E.g. it should be possible to identify several sections of the same river belonging together or resembling the same river. This could be done through an id that serves as a unique identifier for the same geometrical feature across tiles. This is also necessary to display the "same" feature only once in the model (despite having versions for multiple zoom levels in memory)
  • It should be possible to fill or select a certain polygon (e.g. a country) inspite of the fact that it might be distributed across different tiles that possibly belong to different tile levels.
  • The data that is stored inside a tile should stay relatively small (in the kB range).
  • The tiles rendered should adhere to cartographic standards.

Discussion of a possible Vector Tiling approach

The idea is to create tiles similar to the standard OpenStreetMap vector tiles. So the data inside the tile needs to get prefiltered: The polygons provided for display need to be carefully chosen (depending on importance) and need to be simplified in advance (Node reduction). So a simplified level 0 tile could look like this:

This would be the lowest zoom level possible. Now further tiles could get created for higher zoom level using the Quadtile scheme. This is a level 2 tile that shows parts of Europe (the actual one would probably already display country boundaries, but we leave that out in this discussion for purposes of simplicity and illustration):

As you can see the file just contains the clipped polygon data. It does not contain the whole polygon data e.g. for the whole Eurasian-African coastline for this zoom level since that would add lots of data and would defeat the idea of the tiles (imagine having to download the whole Eurasian coastline at zoom level 16 just to display a small part of Portugal ....).

Now what would happen if the user started Marble and would zoom so that tile level 2 gets activated? It would download tile by tile. What we'd like to avoid at all cost is that tiles appear and are surrounded just by a plain white area like this: