From 2d6d6076eea9c7ae2ff161bd3bef155d33dc16ce Mon Sep 17 00:00:00 2001 From: sonora Date: Sat, 28 Oct 2017 16:22:18 +0200 Subject: [PATCH] Experimental: Distance analysis for STOP with no recognized directional tagging --- OsmAnd-java/src/net/osmand/binary/RouteDataObject.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OsmAnd-java/src/net/osmand/binary/RouteDataObject.java b/OsmAnd-java/src/net/osmand/binary/RouteDataObject.java index 29bd800fcc..e6ca913ab8 100644 --- a/OsmAnd-java/src/net/osmand/binary/RouteDataObject.java +++ b/OsmAnd-java/src/net/osmand/binary/RouteDataObject.java @@ -703,7 +703,11 @@ public class RouteDataObject { // return 1; //} } - // Open: Could add some analysis if a STOP without directional tagging is shortly _behind_ an intersection + // Experimental: Distance analysis for STOP with no recognized directional tagging + if (((direction == true) && (distance(0, intId) < distance(intId, getPointsLength() - 1))) + || ((direction == false) && (distance(0, intId) > distance(intId, getPointsLength() - 1)))) { + return -1; + } return 0; //no directional info detected }