protected double getSpeed(ReaderWay way) { String highwayValue = way.getTag("highway"); if (!Helper.isEmpty(highwayValue) && way.hasTag("motorroad", "yes") && highwayValue != "motorway" && highwayValue != "motorway_link") { highwayValue = "motorroad"; } Integer speed = defaultSpeedMap.get(highwayValue); if (speed == null) throw new IllegalStateException(toString() + ", no speed found for: " + highwayValue + ", tags: " + way); if (highwayValue.equals("track")) { String tt = way.getTag("tracktype"); if (!Helper.isEmpty(tt)) { Integer tInt = trackTypeSpeedMap.get(tt); if (tInt != null) speed = tInt; } } return speed; }
@Override public String toString(){ return h.id(super.toString()); } };
protected double getSpeed( OSMWay way ) { String highwayValue = way.getTag("highway"); Integer speed = defaultSpeedMap.get(highwayValue); if (speed == null) throw new IllegalStateException(toString() + ", no speed found for: " + highwayValue + ", tags: " + way); if (highwayValue.equals("track")) { String tt = way.getTag("tracktype"); if (!Helper.isEmpty(tt)) { Integer tInt = trackTypeSpeedMap.get(tt); if (tInt != null) speed = tInt; } } return speed; }
protected double getSpeed(ReaderWay way) { String highwayValue = way.getTag("highway"); if (!Helper.isEmpty(highwayValue) && way.hasTag("motorroad", "yes") && highwayValue != "motorway" && highwayValue != "motorway_link") { highwayValue = "motorroad"; } Integer speed = defaultSpeedMap.get(highwayValue); if (speed == null) throw new IllegalStateException(toString() + ", no speed found for: " + highwayValue + ", tags: " + way); if (highwayValue.equals("track")) { String tt = way.getTag("tracktype"); if (!Helper.isEmpty(tt)) { Integer tInt = trackTypeSpeedMap.get(tt); if (tInt != null) speed = tInt; } } return speed; }
protected double getSpeed(ReaderWay way) { String highwayValue = way.getTag("highway"); if (!Helper.isEmpty(highwayValue) && way.hasTag("motorroad", "yes") && highwayValue != "motorway" && highwayValue != "motorway_link") { highwayValue = "motorroad"; } Integer speed = defaultSpeedMap.get(highwayValue); if (speed == null) throw new IllegalStateException(toString() + ", no speed found for: " + highwayValue + ", tags: " + way); if (highwayValue.equals("track")) { String tt = way.getTag("tracktype"); if (!Helper.isEmpty(tt)) { Integer tInt = trackTypeSpeedMap.get(tt); if (tInt != null) speed = tInt; } } return speed; }