November 19th, 2024

OpenStreetMap's New Vector Tiles

OpenStreetMap has shifted to vector tiles in MVT format, improving customization and image quality. The article offers guidance on visualizing these tiles with QGIS and Python, highlighting data analysis near the Burj Khalifa.

Read original articleLink Icon
ConfusionExcitementFrustration
OpenStreetMap's New Vector Tiles

OpenStreetMap (OSM) has transitioned from hosting raster tiles to offering vector tiles in Mapbox Vector Tiles (MVT) format, enhancing user experience by allowing customization of styles and rendering rules. This change enables sharper imagery and the ability to switch label languages. The new vector tiles are expected to lead to the development of refined styles by the OSM community. The article details the technical setup for visualizing OSM's vector tiles using tools like QGIS and Leafmap, along with Python for data manipulation. It provides step-by-step instructions for installing necessary software, setting up a Python virtual environment, and rendering vector tiles. The author also discusses the analysis of data extracted from the vector tiles, including points of interest (POIs) in the vicinity of the Burj Khalifa in Dubai. The analysis reveals various amenities and cuisines available in the area, showcasing the richness of the data that can be accessed through the new vector tiles. Overall, this update marks a significant advancement in how OSM data can be utilized for mapping and analysis.

- OpenStreetMap has introduced vector tiles in MVT format, allowing for customizable map styles.

- The transition from raster to vector tiles enhances image sharpness and label language flexibility.

- The article provides a detailed guide on visualizing and analyzing OSM's vector tiles using QGIS and Python.

- Data analysis reveals diverse points of interest, including various restaurants and amenities near the Burj Khalifa.

- The OSM community is expected to develop refined styles for the new vector tiles over time.

AI: What people are saying
The comments reflect a mix of excitement and concern regarding the transition to vector tiles in OpenStreetMap.
  • Users express frustration over the lack of detail in vector tiles compared to traditional raster tiles.
  • There are discussions about the rendering issues, particularly with Arabic fonts and label alignment.
  • Some users appreciate the potential for customization and improved performance on low-end devices.
  • Questions arise about the operational costs and efficiency of hosting vector tiles.
  • Several users are curious about the practical applications and tools available for working with vector tiles.
Link Icon 28 comments
By @puddingvlaai - 14 days
I'm a bit conflicted with vector tiles. I haven't found a good combination of style and tile generator (schema) that provides the same level of detail as the original raster tiles provide.

The article has screenshots that very much demonstrate this difference. The first screenshot has, for example, a lot of POIs (statues, shops, theaters, viewpoints), highways that are different when they are bridges, different colors for grass vs parks, different line widths for different highways, sports fields, building and neighbourhood names, arrows denoting one-way streets, building parts, stairs, trees, and a lot more.

The second screenshot has none of that, aside from a single trolly station and a single street name (which is also rendered incorrectly).

I've tried a lot of vector styles (all openmaptiles styles, the base protomaps styles, all mapbox styles) and generators (protomaps, openmaptiles, mapbox). None of them come close to the amount of detail as the raster OSM tiles while still being as readable.

I've never found anyone as bothered with this as I am. Vector styles are cool as they zoom and pan very smoothly, and their style is fairly easily editable. But, for any map where you actually want to see map data instead of using it as a base map for your own data, vector maps fall short.

Maybe it is just because of computational limits. I can imagine that displaying the same amount of detail as the OSM raster tiles would require too many resources: both on the client side and for tile generation.

It would be nice if OpenStreetMap would try to mimic their raster style closer, instead of providing just another low contrast, low detail base map. I hope this release of open vector tiles will facilitate more detailed vector maps!

By @maliker - 14 days
It's been fascinating to watch the open source community build out vector map tile capabilities. I was doing some web GIS work back in roughly 2018, and Google/Apple's streaming vector maps performed like magic and something we would have loved to use if we could afford it. Shortly thereafter the core tech was available in open source, and then there were even free hosted solutions. Now our leaflet maps have great vector layers for free. Thanks open source!
By @kibwen - 14 days
Does this reduce the operating costs of hosting OSM-based maps, since presumably they require less CPU spent on rendering and vectors consume less storage/bandwidth?
By @zawaideh - 14 days
The other issue is that the arabic font is not rendering correctly in the vector version. It's rendering left to right (instead of right to left) with characters broken up instead of linked.
By @boramalper - 14 days
Also see: OpenFreeMap — free OpenStreetMap vector tile hosting

https://openfreemap.org/

By @Someone - 14 days
> Imagery should appear much sharper and switching the language of the labels should become possible.

I expect that to work sub-optimally. Label dimensions are far from guaranteed to stay the same if you change language, and label dimensions interact with map layout, even influencing what to show.

If your labels grow larger, they may end up covering too much of the map or even overlapping. If they grow smaller, users may wonder why a city that was omitted before because of space constraints doesn’t show in the empty space created.

By @Tepix - 14 days
This is a very welcome new development! I look forward to even better looking maps.

I'm just a bit puzzled by the "my workstation" section :-). There doesn't seem to be any relation to the rest of the article, not even high system requirements to do the things discussed after that.

By @ajsnigrutin - 14 days
> Imagery should appear much sharper and switching the language of the labels should become possible.

So, every eg. city-shape-vector (well.. polygon) will cary the metadata/text of the name of that city in every defined language?

By @tetris11 - 14 days
(Low effort comment) I wonder if this means OSMAnd and OrganicMaps will now finally team up to deliver the ultimate FOSS Map app
By @eMPee584 - 14 days
https://marble.kde.org/ has had their own implementation of a streaming vectorOSM layer for nine years and I was eagerly waiting for something akin to materialize in other OSM map applications for quite a while.. Downloading hundreds of megs of map data in big whole-country chunks always was a space issue in android OSM apps. Very glad a standard is finally being established and looking forward to it getting picked up and polished.. Great work! : )
By @andrepd - 14 days
What was that interlude about the computer's specs lol, I thought it was going somewhere but it didn't.
By @spacetracks - 13 days
I'm interested in applying transforms to vector tile coordinates at render time. What libraries do you recommend for that? I have zero experience with map rendering but I understand coordinate transformation well. I'd like to render a log azimuthal earth. I know I'll need to pull tiles at different scales and stitch them together, just not sure which library to use to make that easy.
By @orthoxerox - 14 days
One thing I appreciate about the default raster-based maps is how snappy they are. Zooming in and out on OSM is much faster than on Google/Apple/Yandex/Bing maps. Of course, vector-based maps mean I can finally use OSM for countries that use Ethiopic/Arabic/Hebrew/Georgian/Armenian/Hanzi/Indic writing systems.
By @timwis - 14 days
Does anyone know if vector tiles could carry adequate data to facilitate reverse geocoding (address lookup)? E.g. the polygon of a building containing its street address in its metadata. I’m surprised I haven’t seen that before, as reverse geocoding services can get expensive, though I wonder if it’s because I’ve misunderstood how vector tiles actually work.
By @emursebrian - 14 days
This will be great for custom maps.

I am on QGIS 3.30 and many of the street labels at 1:31860 scale show up in red and are not aligned correctly.

By @Foofoobar12345 - 14 days
Exciting update! How does the new vector tile system handle performance on low-end devices with large datasets?
By @jkrubin - 14 days
I saw some morecantile/mercantile in the article, so I will plug a side project of mine “utiles” for anyone needing tile util(e)s: https://github.com/jessekrubin/utiles

Was fun to write and I learned loads!

By @gregoriol - 14 days
Is there a tool to capture vector tiles to raster files? Some tools like Apple's MapKit don't support vector tiles yet, and it could be interesting to use one single map base and be able to just generate the raster, instead of having a specific raster server
By @ggm - 14 days
If this means I can get fatter/thicker/larger text labels on my maps, I'm all for it. As it stands, it feels like tiles have precomputed text embedded, which is never at a size I can handle.

Old eyes are inflexible.

By @wind12 - 13 days
`open('7006.mvt.json', 'w').write(...)` (from section `Analysis-Ready Data`) should either be

import pathlib

pathlib.Path('7006.mvt.json').write_text(...)

or the historical alternative

with open(...) as f:

    f.write(...)
By @eMPee584 - 14 days
Sidenote: the most infuriating thing about google maps widgets has been the removal of the scale by default. All them transportation apps with their embedded map views have been of annoyingly limited use for multimodal navigation.. without a scale it just leaves me guessing whether a distance can be considered walkable .. Then I was flabbergasted when leaflet copied this crucial design decision.. yet my efforts to convince the leaflet team to reconsider reverting the default (because defaults are rarely changed downstream) utterly failed: https://github.com/Leaflet/Leaflet/issues/8902 .. awefully reminds me of the design trend for thin scrollbars and tiny touch targets being enforced in GUIs all over, mostly without an easy option even to configure it.. WONTFIX in KDE f.e. https://bugs.kde.org/show_bug.cgi?id=416003 come on.. Hopefully with AI, we'll soon enter an era of liquid software where everything can be dynamically changed at will. Oh the future, behold xD
By @redmajor12 - 13 days
Does anyone know how to download the OSM placemarks (museum, fort, bus stop, etc) for use in another GIS program like AlpineQuest or even the desktop?
By @HumblyTossed - 14 days
How soon before mobile apps can start using these?
By @Eduard - 14 days
is there already a live version of this? Because for me, there doesn't seem to be an option for activating vector tiles on https://www.openstreetmap.org/
By @DemocracyFTW2 - 14 days
One clear advantage of the new SVG format is, apparently, that Arabic script is now, finally!, rendered the way it was always intended—left-to-right with unconnected letters /s
By @shpx - 14 days
I can't believe they still haven't added a 2x pixel density version of the default map style. It's $CURRENTYEAR and we all have high pixel density phones. No one uses 1080p displays anymore. The default blurry version makes any page using OSM feel amateur.