@Override public void visit(Way w) { assert aNode != null; if (w.hasKey(tag)) { double dist = OsmUtils.getMinimumDistanceToWay(aNode.getCoor(), w); if (dist < minDist && dist < maxDist) { minDist = dist; currentValue = w.get(tag); srcNode = w; } } }
/** * Tests if this way is a oneway. * * @return {@code 1} if the way is a oneway, {@code -1} if the way is a reversed oneway, {@code 0} * otherwise. * @since 5199 */ public int isOneway() { String oneway = get("oneway"); if (oneway != null) { if ("-1".equals(oneway)) { return -1; } else { Boolean isOneway = OsmUtils.getOsmBoolean(oneway); if (isOneway != null && isOneway) { return 1; } } } return 0; }