0

Mapbox Vector Tiles appear to lack accurate intersection nodes.

Is this a bug?

i.e. should the tile's geojson include a shared node between two intersecting streets?

Details: Using MVT's from http://a.tiles.mapbox.com/v4/mapbox.mapbox-streets-v8 and converting them to json via MB's https://github.com/mapbox/vt2geojson, the street data lacks many intersections that are correctly included in the original OSM Overpass data.

By this I mean that there should be a node at the intersection that is shared by both street's LineString's.

Is this a bug, either in the spec or in the MB implementations?

1 Answer 1

1

Mapbox Vector Tiles appear to lack accurate intersection nodes. Is this a bug? I.e. should the tile's geojson include a shared node between two intersecting streets?

This is likely not a bug, but a consequence of the fact that OpenStreetMap does not have a strict node-edge topology for road networks, with each segment of road starting and ending at each connecting junction node as you desire to have.

E.g. if a 2 km long road in a city has 10 connecting streets, but no properties of the main road change (e.g. speed limit), then there is nothing in OSM that prevents you from drawing a single 2 km long line to represent the main road, only adding in junction nodes to connect the side streets.

Since processing of data to create vector tiles is likely on a record-by-record basis as most toolchains for OSM rely on relational databases like PostGIS, that 2 km long road will also become a single feature in the vector tile (or cut up in multiple pieces for multiple tiles).

And as vector tiles are mainly for display purposes, and require extensive generalization to make them work at scale, it is very likely that the connecting junction node gets dropped during generalization, meaning two intersecting roads may no longer have the junction node in their geometries.

Honestly, vector tiles should not be used for analysis. Use the original data instead, or data imported into a PostGIS database with tools like osm2pgsql.

I have never used it, but you may need to have a look at PostGIS Topologies as well: https://postgis.net/docs/Topology.html

1
  • Thanks! I considered this, and to test it, I created an OSM Overpass geojson "tile" of the same lon/lat bounding box, the same data Mapbox uses. This did have the intersections correctly managed with shared nodes. My concern with the OSM data is that it does not have a Z detail feature (as in the z/x/y tile coords) that I can find, thus I get more data than appropriate for the Z currently being viewed.
    – backspaces
    Apr 22, 2019 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.