add messagedata for beeline
This commit is contained in:
parent
0e74fd5240
commit
b0eb0840d9
1 changed files with 17 additions and 2 deletions
|
@ -121,11 +121,26 @@ abstract class OsmPath implements OsmLinkHolder {
|
|||
|
||||
protected abstract void resetState();
|
||||
|
||||
static int seg = 1;
|
||||
|
||||
protected void addAddionalPenalty(OsmTrack refTrack, boolean detailMode, OsmPath origin, OsmLink link, RoutingContext rc) {
|
||||
byte[] description = link.descriptionBitmap;
|
||||
if (description == null) {
|
||||
return; // could be a beeline path
|
||||
if (description == null) { // could be a beeline path
|
||||
message = new MessageData();
|
||||
if (message != null) {
|
||||
message.turnangle = 0;
|
||||
message.time = (float) 1;
|
||||
message.energy = (float) 0;
|
||||
message.priorityclassifier = 0;
|
||||
message.classifiermask = 0;
|
||||
message.lon = targetNode.getILon();
|
||||
message.lat = targetNode.getILat();
|
||||
message.ele = Short.MIN_VALUE;
|
||||
message.linkdist = sourceNode.calcDistance(targetNode);
|
||||
message.wayKeyValues = "direct_segment=" + seg;
|
||||
}
|
||||
seg++;
|
||||
return;
|
||||
}
|
||||
|
||||
boolean recordTransferNodes = detailMode || rc.countTraffic;
|
||||
|
|
Loading…
Reference in a new issue