Decoding Vector Tile pbf to geoJson

Muhammad Abdul Moeed 61 Reputation points
  1. is there a way to decode vector tiles coming through the following api in pbf format into geojson?

  1. also, after a pbf is decoded into geojson does it contain road data such as coordinates of specific road or any kind of other coordinate information?
  2. is the vector tile data coming through the api is similar to what i can get for example by using the function getRenderedShapes() on my azure maps through map.layers.getRenderedShapes()?
Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
560 questions
0 comments No comments
{count} votes

Accepted answer
  1. rbrundritt 13,531 Reputation points Microsoft Employee

    Yes, it's possible to decode the vector tiles and convert the data to GeoJSON. I've done this a few times in the past in C#. One way to do this in .NET is as follows:

    Key information you will need to parse the tiles is the source layers within the tiles. You can find these in the TomTom docs (the data provider for Azure Maps) here:

    If using a different programming language, there are many great tools for vector tiles listed here:

    Road data coordinates are in the tiles, however, note that when zoomed out, some road geometries may be multi-linestrings that represent several roads of the same type but the name isn't in the tile at that zoom level. If you want the name for each road segment, you will likely need to retrieve tiles from a closer zoom level (~16).

    The vector tile data is very similar to what you get from getRenderedShapes. Main difference is that there would be no style properties coming from the data in the tiles.

    0 comments No comments

0 additional answers

Sort by: Most helpful