Add transport schedule to data model
This commit is contained in:
parent
9317bbaa02
commit
9f5f9ba8c6
3 changed files with 3578 additions and 97 deletions
|
@ -7,6 +7,7 @@ import java.io.IOException;
|
|||
import java.util.Arrays;
|
||||
|
||||
import net.osmand.binary.BinaryMapIndexReader.SearchRequest;
|
||||
import net.osmand.binary.OsmandOdb.TransportRouteSchedule;
|
||||
import net.osmand.data.TransportStop;
|
||||
import net.osmand.osm.edit.Node;
|
||||
import net.osmand.osm.edit.Way;
|
||||
|
@ -307,6 +308,12 @@ public class BinaryMapTransportReaderAdapter {
|
|||
// deprecated
|
||||
// case OsmandOdb.TransportRoute.REVERSESTOPS_FIELD_NUMBER:
|
||||
// break;
|
||||
case OsmandOdb.TransportRoute.SCHEDULETRIP_FIELD_NUMBER:
|
||||
sizeL = codedIS.readRawVarint32();
|
||||
pold = codedIS.pushLimit(sizeL);
|
||||
dataObject.setSchedule(TransportRouteSchedule.parseFrom(codedIS));
|
||||
codedIS.popLimit(pold);
|
||||
break;
|
||||
case OsmandOdb.TransportRoute.DIRECTSTOPS_FIELD_NUMBER:
|
||||
if(onlyDescription){
|
||||
end = true;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -10,6 +10,7 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.osmand.binary.OsmandOdb.TransportRouteSchedule;
|
||||
import net.osmand.osm.edit.Node;
|
||||
import net.osmand.osm.edit.Way;
|
||||
import net.osmand.util.MapUtils;
|
||||
|
@ -22,11 +23,17 @@ public class TransportRoute extends MapObject {
|
|||
private Integer dist = null;
|
||||
private String color;
|
||||
private List<Way> forwardWays;
|
||||
private TransportRouteSchedule schedule;
|
||||
public static final double SAME_STOP = 25;
|
||||
|
||||
public TransportRoute(){
|
||||
}
|
||||
|
||||
public TransportRouteSchedule getSchedule() {
|
||||
return schedule;
|
||||
}
|
||||
|
||||
|
||||
public List<TransportStop> getForwardStops() {
|
||||
return forwardStops;
|
||||
}
|
||||
|
@ -197,4 +204,8 @@ public class TransportRoute extends MapObject {
|
|||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
public void setSchedule(TransportRouteSchedule schedule) {
|
||||
this.schedule = schedule;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue