这是indexloc提供的服务,不要输入任何密码
Skip to content

Simplification Removes Road Intersections From OSM Tiles #759

@backspaces

Description

@backspaces

MapBox Support and I have been working on this issue:

Mapbox Vector Tiles appear to lack accurate intersection nodes. Is this a bug?

Basically, the default line simplification removes intersections from OSM data. Here street intersections are any nodes with 3 or more lines using the node.

Support suggest I try turning off simplification. Indeed this resulted in correct intersection data but much larger vector tiles. Here are before/after examples of tile 14/3370/6451 extracted from OSM data using the bounding box of 10/210/403 and run through tippecanoe with default setting, and then with no simplification:

tippecanoe -z14 -f -e tiles10 santafe10.json
tippecanoe -z14 -f --no-line-simplification -e tiles10ns santafe10.json

The datasets for the MBStudio were created using the two resulting 14/3370/6451 tiles and using MB's vt2geojson

vt2geojson tiles10//14/3370/6451.pbf > santafe14vt.json

The red circles show the intersection nodes being simplified out of the tile, while the rectangles show the increase in node count.

Snap 05 10 19-16 53 27

This issue is either a documentation request on how to use tippecanoe as-is to achieve the desired result, or a feature request for control over simplification to insure certain nodes are not simplified away.

If the former, I'd guess the documentation would suggest insuring intersections be the first or last nodes in a LineString. This may be a solution if the simplification algorithm works on individual LineStrings, and simplification does not join LineStrings during simplification.

If the latter, I'd guess it would require somehow specifying the nodes to be preserved, either algorithmically (node-line count, say), or by a list of node coordinates to be preserved. Or if simplification does join LineStrings, an option for not doing so unless the string is invisible at the given Z.

Whew! Hard to explain all this. I hope I've been clear. Please let me know if I can provide more info or clarify the issue. I realize there is a tension between "draw" and "data" tile usage, street intersections being unusual in that, even tho the street tiles "draw" well, the underlying "data" isn't useful for computing traffic flow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions