use of net.osmand.plus.helpers.AvoidSpecificRoads.AvoidRoadInfo in project Osmand by osmandapp.
the class ImpassableRoadsStorage method getImpassableRoadsInfo.
public List<AvoidRoadInfo> getImpassableRoadsInfo() {
List<LatLon> points = getPoints();
List<Long> roadIds = getRoadIds(points.size());
List<Double> directions = getDirections(points.size());
List<String> appModeKeys = getAppModeKeys(points.size());
List<String> descriptions = getPointDescriptions(points.size());
List<AvoidRoadInfo> avoidRoadsInfo = new ArrayList<>();
for (int i = 0; i < points.size(); i++) {
LatLon latLon = points.get(i);
PointDescription description = PointDescription.deserializeFromString(descriptions.get(i), null);
AvoidRoadInfo avoidRoadInfo = new AvoidRoadInfo();
avoidRoadInfo.id = roadIds.get(i);
avoidRoadInfo.latitude = latLon.getLatitude();
avoidRoadInfo.longitude = latLon.getLongitude();
avoidRoadInfo.direction = directions.get(i);
avoidRoadInfo.name = description.getName();
avoidRoadInfo.appModeKey = appModeKeys.get(i);
avoidRoadsInfo.add(avoidRoadInfo);
}
return avoidRoadsInfo;
}
Aggregations