Class IntersectionDetails

java.lang.Object
com.graphhopper.util.details.AbstractPathDetailsBuilder
com.graphhopper.util.details.IntersectionDetails
All Implemented Interfaces:
PathDetailsBuilder

public class IntersectionDetails extends AbstractPathDetailsBuilder
Calculate the intersections for a route. Every change of the edge id is considered an intersection.

The format is inspired by the format that is consumed by Maplibre Navigation SDK.

Explanation of the format: - entries contain an array of the edges at that intersection. They are sorted by bearing, starting from 0 (which is 0° north) to 359. Every edge that we can turn onto is marked with “true” in the array. - bearings contain an array of the edges at that intersection. They are sorted by bearing, starting from 0 (which is 0° north) to 359. The array contains the bearings of each edge at that intersection. - in marks the index in the “bearings” edge we are coming from. - out the index we are going to.

Author:
Robin Boldt