19 comments

[ 2.4 ms ] story [ 52.6 ms ] thread
Nice. I already use Vector Tiles on my backend. But it is nice to have other sources like this.
In case you wonder how much time / resources it takes to generate vector tiles, I'm running benchmarks with Tilemaker here for https://cartes.app

https://github.com/systemed/tilemaker/issues/839

I am sorry but what is "300 Go RAM" 300 Go? I only know GB/GiB.
Background:

Mapping applications split up data into "tiles" so you can download only the data you are currently looking at. For example, you don't want to download the entire planet, just to look at your own neighborhood.

Historically, these tiles were literally images that the client application (i.e. web map) could "tile" side by side to cover the part of the map you were looking at. Now we refer to those images as "raster" tiles, to differentiate them with "vector" tiles.

Rather than a rendered image, Vector tiles contain the raw data that you could use to render such an image. Vector tiles allow a smaller file size and more flexibility. For example, with vector tiles you can crisply render at partial zoom levels, keeping lines sharp and avoid pixelating text. The client can also have customizable styles - hiding certain layers or accentuating others from the vector tiles.

Vector tiles are not new technology. For example, Google Maps started using them over a decade ago. So why has it taken so long for OpenStreetMap.org? One reason is no doubt a lack of engineering capacity. There were also concerns about older and less powerful clients hardware not being up to the task, but that concern has lessened over time.

OpenStreetMap also has some unique requirements. It is a community edited database, and users want to see their edits soon (immediately really). It's not feasible to dynamically generate every tile request from the latest data, so caching is essential. Still, to minimize the amount of time tiles will be stale, a lot of work went into being able to quickly regenerate stale tiles before the new vector tiles were rolled out.

Tiles aren't just about data selection, they're also about caching. By turning a continuous domain (any part of the world at any scale) into a series of discrete requests (a grid of tiles at several fixed scales), maps become a series of cacheable requests.
Many important details are not visible anymore:

  - gates on private pathways 
  - shop names
Oh but that default style for Shortbread is so ugly! No contrast, missing details and lots of information lost.

Hopefully it's vector tiles and information are there (I checked in Maputik) so it's possible to create my own style (which I will definitely try).

The lack of boundaries below national level is off-putting. Both the style and the tile spec itself seem to need a lot of refinement... highways look like a patchwork at low zoom. I had also thought shortbread excluded a lot of POI types, but maybe I need to review again.

But that's not to diminish the accomplishment overall here for the OSM page itself– this is an awesome step forward!

does a vector tile use more or less memory than a raster tile ? I mean, on average, in OSM.
What happened to maps trying to make the names of most or all streets visible? It looks like the vector layer on the web viewer is sort of trying to show some street names, but it seems extremely buggy right now — names appear and then disappear again when making small zoom adjustments.

Not that Apple Maps or Google Maps are much better in this regard.

While vector tiles are often marketed as faster loading ones, and it is true in OSM case, I would like to see apples to apples comparison: vector tiles with same level of detail as original OSM raster tiles. Maybe someone already has such vector style built?
To everyone with complaints about the new "Shortbread" styling, I agree that it's not perfect but that's kinda missing the point. The real story is that vector tiles have the styling applied client-side so anyone can tweak the look with a little javascript.

The prior raster tiles have the style baked in; if you want a new look, you need to generate a new image. So each map publisher ends up running their own data and server infrastructure just to tweak the style.

The vector tile approach means a single (cacheable) asset can be used in many different maps. Huge win. If you don't like the style, you can make your own without having to literally download the planet.