Search in sources :

Example 1 with State

use of com.graphhopper.matching.State in project graphhopper by graphhopper.

the class ExtendedJsonResponseTest method getGpxExtension.

private List<State> getGpxExtension() {
    List<State> list = new ArrayList<>();
    Snap snap1 = new Snap(-3.4445, -38.9990) {

        @Override
        public GHPoint3D getSnappedPoint() {
            return new GHPoint3D(-3.4446, -38.9996, 0);
        }
    };
    Snap snap2 = new Snap(-3.4445, -38.9990) {

        @Override
        public GHPoint3D getSnappedPoint() {
            return new GHPoint3D(-3.4449, -38.9999, 0);
        }
    };
    list.add(new State(new Observation(new GHPoint(-3.4446, -38.9996)), snap1));
    list.add(new State(new Observation(new GHPoint(-3.4448, -38.9999)), snap2));
    return list;
}
Also used : EdgeIteratorState(com.graphhopper.util.EdgeIteratorState) State(com.graphhopper.matching.State) VirtualEdgeIteratorState(com.graphhopper.routing.querygraph.VirtualEdgeIteratorState) GHPoint3D(com.graphhopper.util.shapes.GHPoint3D) ArrayList(java.util.ArrayList) Observation(com.graphhopper.matching.Observation) Snap(com.graphhopper.storage.index.Snap) GHPoint(com.graphhopper.util.shapes.GHPoint)

Aggregations

Observation (com.graphhopper.matching.Observation)1 State (com.graphhopper.matching.State)1 VirtualEdgeIteratorState (com.graphhopper.routing.querygraph.VirtualEdgeIteratorState)1 Snap (com.graphhopper.storage.index.Snap)1 EdgeIteratorState (com.graphhopper.util.EdgeIteratorState)1 GHPoint (com.graphhopper.util.shapes.GHPoint)1 GHPoint3D (com.graphhopper.util.shapes.GHPoint3D)1 ArrayList (java.util.ArrayList)1