Vector tiles for osm.org

Thanks, gents!

Guess it’s just a matter of waiting to see what actually appears …

:popcorn: (:grinning:)

1 Like

So, if the vector tiles would have the same level of detail as the raster tiles: what data bandwidth is then expected in comparison?

That’s highly dependent on the level of simplification, and the amount of data in the tile.

In general, vector tiles end up smaller (I’ve not done any comparisons myself but I’ve heard 30-50% the size of a raster tile over the same area mentioned). But it’s fully possible to create a vector tile that’s larger or even significantly larger (as has previously been exemplified here, if you include all data at a low zoom level).

Additionally, vector tiles allow for things such as overzoom, which makes it possible to completely eliminating having to download some zoom levels.

2 Likes

This depends on user behavior, the number of zoom levels available and the number of objects.

Example:

  • Raster level 14: 42 kB (https://tile.openstreetmap.org/14/7907/5310.png)
  • Vector level 14 (max. level): 264 kB (https://tileserver.openstreetmap.ie/data/ireland-vector/14/7907/5310.pbf)

If you stay (zoom and pan) within the area covered by this tile (level 14), more and more raster tiles have to be downloaded, but no vector tiles (all data is already in vector tile level 14).

Test under real-life conditions:

  1. Start in the middle of Ireland at zoom level 9.
  2. Zoom onto the Loopline Bridge (level 19).
  3. Continue along the river to the Heuston railway station.

Data transfer raster: ~13 MB
Data transfer vector: ~7 MB

8 Likes

The initial work will be the shortbread schema which has some existing styles and tile generators. If you want to get started, you can download those tiles from the Geofabrik download server for a region. In fact, I would generally recommend the Geofabrik tiles if you only need daily updates for a region. What I’m working on is all about minutely, and that makes the architecture more complicated.

It’s quite variable. Assuming the raster tiles are 256 device-independent pixels and 512 pixels in size, I generally find properly optimized vector tiles to be a bit smaller most of the time, but the worst-case vector tiles are always larger than raster tiles. Certain scenarios like panning around an area at high zoom are much smaller with vector tiles.

The big difference with tile size is for the style developer. With raster tiles you could ignore tile size and even if you screwed up, tile size would remain reasonable. With vector tiles if you aren’t paying attention to size it’s very easy to get a tile that’s way too large.

5 Likes

Would it make sense to combine vector and raster tiles in the same layer? The raster tiles would allow smoother, more detailed rendering, possibly with hill shading (which may be too resource-intensive for mobile clients), while the vector tiles provide sharply rendered localized labels.

It certainly is possible, and not uncommonly to do. For example you could have a basemap without labels in raster and then vector tiles over that for multi-lingual and rotatable labels.

That said, I think unless there is a very specific need it’s almost always better to go fully with (well optimized) vector tile.

1 Like