Merge pull request #510 from afischerdev/lib-update-six

Update Lib Part Six - Change Export
This commit is contained in:
afischerdev 2023-03-09 11:05:13 +01:00 committed by GitHub
commit 0cf83456f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 1648 additions and 1123 deletions

View file

@ -21,9 +21,13 @@ import java.io.InputStreamReader;
import java.io.StringWriter; import java.io.StringWriter;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.text.NumberFormat; import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Map;
import java.util.TimeZone;
import btools.mapaccess.MatchedWaypoint; import btools.mapaccess.MatchedWaypoint;
import btools.mapaccess.OsmPos; import btools.mapaccess.OsmPos;
@ -45,6 +49,9 @@ public final class OsmTrack {
public boolean showspeed; public boolean showspeed;
public boolean showSpeedProfile; public boolean showSpeedProfile;
public boolean showTime;
public Map<String, String> params;
public List<OsmNodeNamed> pois = new ArrayList<OsmNodeNamed>(); public List<OsmNodeNamed> pois = new ArrayList<OsmNodeNamed>();
@ -414,12 +421,14 @@ public final class OsmTrack {
int turnInstructionMode = voiceHints != null ? voiceHints.turnInstructionMode : 0; int turnInstructionMode = voiceHints != null ? voiceHints.turnInstructionMode : 0;
sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
for (int i = messageList.size() - 1; i >= 0; i--) { if (turnInstructionMode != 9) {
String message = messageList.get(i); for (int i = messageList.size() - 1; i >= 0; i--) {
if (i < messageList.size() - 1) String message = messageList.get(i);
message = "(alt-index " + i + ": " + message + " )"; if (i < messageList.size() - 1)
if (message != null) message = "(alt-index " + i + ": " + message + " )";
sb.append("<!-- ").append(message).append(" -->\n"); if (message != null)
sb.append("<!-- ").append(message).append(" -->\n");
}
} }
if (turnInstructionMode == 4) // comment style if (turnInstructionMode == 4) // comment style
@ -436,8 +445,10 @@ public final class OsmTrack {
sb.append("<gpx \n"); sb.append("<gpx \n");
sb.append(" xmlns=\"http://www.topografix.com/GPX/1/1\" \n"); sb.append(" xmlns=\"http://www.topografix.com/GPX/1/1\" \n");
sb.append(" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n"); sb.append(" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n");
if (turnInstructionMode == 2) // locus style if (turnInstructionMode == 9) { // BRouter style
{ sb.append(" xmlns:brouter=\"Not yet documented\" \n");
}
if (turnInstructionMode == 7) { // old locus style
sb.append(" xmlns:locus=\"http://www.locusmap.eu\" \n"); sb.append(" xmlns:locus=\"http://www.locusmap.eu\" \n");
} }
sb.append(" xsi:schemaLocation=\"http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd\" \n"); sb.append(" xsi:schemaLocation=\"http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd\" \n");
@ -447,32 +458,61 @@ public final class OsmTrack {
} else { } else {
sb.append(" creator=\"BRouter-" + version + "\" version=\"1.1\">\n"); sb.append(" creator=\"BRouter-" + version + "\" version=\"1.1\">\n");
} }
if (turnInstructionMode == 9) {
if (turnInstructionMode == 3) // osmand style sb.append(" <metadata>\n");
sb.append(" <name>").append(name).append("</name>\n");
sb.append(" <extensions>\n");
sb.append(" <brouter:info>").append(messageList.get(0)).append("</brouter:info>\n");
if (params != null && params.size() > 0) {
sb.append(" <brouter:params><![CDATA[");
int i = 0;
for (Map.Entry<String, String> e : params.entrySet()) {
if (i++ != 0) sb.append("&");
sb.append(e.getKey()).append("=").append(e.getValue());
}
sb.append("]]></brouter:params>\n");
}
sb.append(" </extensions>\n");
sb.append(" </metadata>\n");
}
if (turnInstructionMode == 3 || turnInstructionMode == 8) // osmand style, cruiser
{ {
float lastRteTime = 0; float lastRteTime = 0;
sb.append(" <rte>\n"); sb.append(" <rte>\n");
sb.append(" <rtept lat=\"").append(formatILat(nodes.get(0).getILat())).append("\" lon=\"")
.append(formatILon(nodes.get(0).getILon())).append("\">\n")
.append(" <desc>start</desc>\n <extensions>\n");
float rteTime = getVoiceHintTime(0); float rteTime = getVoiceHintTime(0);
StringBuffer first = new StringBuffer();
if (rteTime != lastRteTime) // add timing only if available // define start point
{ {
double t = rteTime - lastRteTime; first.append(" <rtept lat=\"").append(formatILat(nodes.get(0).getILat())).append("\" lon=\"")
sb.append(" <time>").append("" + (int) (t + 0.5)).append("</time>\n"); .append(formatILon(nodes.get(0).getILon())).append("\">\n")
lastRteTime = rteTime; .append(" <desc>start</desc>\n <extensions>\n");
if (rteTime != lastRteTime) // add timing only if available
{
double t = rteTime - lastRteTime;
first.append(" <time>").append("" + (int) (t + 0.5)).append("</time>\n");
lastRteTime = rteTime;
}
first.append(" <offset>0</offset>\n </extensions>\n </rtept>\n");
}
if (turnInstructionMode == 8) {
if (matchedWaypoints.get(0).direct && voiceHints.list.get(0).indexInTrack == 0) {
// has a voice hint do nothing, voice hint will do
} else {
sb.append(first.toString());
}
} else {
sb.append(first.toString());
} }
sb.append(" <offset>0</offset>\n </extensions>\n </rtept>\n");
for (int i = 0; i < voiceHints.list.size(); i++) { for (int i = 0; i < voiceHints.list.size(); i++) {
VoiceHint hint = voiceHints.list.get(i); VoiceHint hint = voiceHints.list.get(i);
sb.append(" <rtept lat=\"").append(formatILat(hint.ilat)).append("\" lon=\"") sb.append(" <rtept lat=\"").append(formatILat(hint.ilat)).append("\" lon=\"")
.append(formatILon(hint.ilon)).append("\">\n") .append(formatILon(hint.ilon)).append("\">\n")
.append(" <desc>").append(hint.getMessageString()).append("</desc>\n <extensions>\n"); .append(" <desc>")
.append(turnInstructionMode == 3 ? hint.getMessageString() : hint.getCruiserMessageString())
.append("</desc>\n <extensions>\n");
rteTime = getVoiceHintTime(i + 1); rteTime = getVoiceHintTime(i + 1);
@ -482,7 +522,9 @@ public final class OsmTrack {
sb.append(" <time>").append("" + (int) (t + 0.5)).append("</time>\n"); sb.append(" <time>").append("" + (int) (t + 0.5)).append("</time>\n");
lastRteTime = rteTime; lastRteTime = rteTime;
} }
sb.append(" <turn>").append(hint.getCommandString()).append("</turn>\n <turn-angle>").append("" + (int) hint.angle) sb.append(" <turn>")
.append(turnInstructionMode == 3 ? hint.getCommandString() : hint.getCruiserCommandString())
.append("</turn>\n <turn-angle>").append("" + (int) hint.angle)
.append("</turn-angle>\n <offset>").append("" + hint.indexInTrack).append("</offset>\n </extensions>\n </rtept>\n"); .append("</turn-angle>\n <offset>").append("" + hint.indexInTrack).append("</offset>\n </extensions>\n </rtept>\n");
} }
sb.append(" <rtept lat=\"").append(formatILat(nodes.get(nodes.size() - 1).getILat())).append("\" lon=\"") sb.append(" <rtept lat=\"").append(formatILat(nodes.get(nodes.size() - 1).getILat())).append("\" lon=\"")
@ -494,7 +536,7 @@ public final class OsmTrack {
sb.append("</rte>\n"); sb.append("</rte>\n");
} }
if (turnInstructionMode == 2) // locus style if (turnInstructionMode == 7) // old locus style
{ {
float lastRteTime = getVoiceHintTime(0); float lastRteTime = getVoiceHintTime(0);
@ -537,12 +579,12 @@ public final class OsmTrack {
.append(formatILon(hint.ilon)).append("\">") .append(formatILon(hint.ilon)).append("\">")
.append(hint.selev == Short.MIN_VALUE ? "" : "<ele>" + (hint.selev / 4.) + "</ele>") .append(hint.selev == Short.MIN_VALUE ? "" : "<ele>" + (hint.selev / 4.) + "</ele>")
.append("<extensions>\n" + .append("<extensions>\n" +
"<om:oruxmapsextensions xmlns:om=\"http://www.oruxmaps.com/oruxmapsextensions/1/0\">\n" + " <om:oruxmapsextensions xmlns:om=\"http://www.oruxmaps.com/oruxmapsextensions/1/0\">\n" +
"<om:ext type=\"ICON\" subtype=\"0\">").append("" + hint.getOruxAction()) " <om:ext type=\"ICON\" subtype=\"0\">").append("" + hint.getOruxAction())
.append("</om:ext>\n" + .append("</om:ext>\n" +
"</om:oruxmapsextensions>\n" + " </om:oruxmapsextensions>\n" +
"</extensions>\n" + " </extensions>\n" +
"</wpt>"); " </wpt>\n");
} }
} }
@ -571,34 +613,216 @@ public final class OsmTrack {
} }
} }
sb.append(" <trk>\n"); sb.append(" <trk>\n");
sb.append(" <name>").append(name).append("</name>\n"); if (turnInstructionMode == 9) { // brouter style
if (turnInstructionMode == 1) // trkpt/sym style sb.append(" <src>").append(name).append("</src>\n");
{
sb.append(" <type>").append(voiceHints.getTransportMode()).append("</type>\n"); sb.append(" <type>").append(voiceHints.getTransportMode()).append("</type>\n");
} else {
sb.append(" <name>").append(name).append("</name>\n");
} }
if (turnInstructionMode == 2) { if (turnInstructionMode == 7) {
sb.append(" <extensions>\n"); sb.append(" <extensions>\n");
sb.append(" <locus:rteComputeType>").append("" + voiceHints.getLocusRouteType()).append("</locus:rteComputeType>\n"); sb.append(" <locus:rteComputeType>").append("" + voiceHints.getLocusRouteType()).append("</locus:rteComputeType>\n");
sb.append(" <locus:rteSimpleRoundabouts>1</locus:rteSimpleRoundabouts>\n"); sb.append(" <locus:rteSimpleRoundabouts>1</locus:rteSimpleRoundabouts>\n");
sb.append(" </extensions>\n"); sb.append(" </extensions>\n");
} }
// all points
sb.append(" <trkseg>\n"); sb.append(" <trkseg>\n");
String lastway = "";
boolean bNextDirect = false;
OsmPathElement nn = null;
String aSpeed;
for (int idx = 0; idx < nodes.size(); idx++) { for (int idx = 0; idx < nodes.size(); idx++) {
OsmPathElement n = nodes.get(idx); OsmPathElement n = nodes.get(idx);
String sele = n.getSElev() == Short.MIN_VALUE ? "" : "<ele>" + n.getElev() + "</ele>"; String sele = n.getSElev() == Short.MIN_VALUE ? "" : "<ele>" + n.getElev() + "</ele>";
if (turnInstructionMode == 1) // trkpt/sym style VoiceHint hint = getVoiceHint(idx);
{ MatchedWaypoint mwpt = getMatchedWaypoint(idx);
for (VoiceHint hint : voiceHints.list) {
if (hint.indexInTrack == idx) { if (showTime) {
sele += "<sym>" + hint.getCommandString() + "</sym>"; sele += "<time>" + getFormattedTime3(n.getTime()) + "</time>";
}
boolean bNeedHeader = false;
if (turnInstructionMode == 9) { // trkpt/sym style
if (hint != null) {
if (mwpt != null &&
!mwpt.name.startsWith("via") && !mwpt.name.startsWith("from") && !mwpt.name.startsWith("end")) {
sele += "<name>" + mwpt.name + "</name>";
}
sele += "<desc>" + hint.getCruiserMessageString() + "</desc>";
sele += "<sym>" + hint.getCommandString(hint.cmd) + "</sym>";
if (mwpt != null) {
sele += "<type>Via</type>";
}
sele += "<extensions>";
if (showspeed) {
double speed = 0;
if (nn != null) {
int dist = n.calcDistance(nn);
float dt = n.getTime() - nn.getTime();
if (dt != 0.f) {
speed = ((3.6f * dist) / dt + 0.5);
}
}
sele += "<brouter:speed>" + (((int) (speed * 10)) / 10.f) + "</brouter:speed>";
}
sele += "<brouter:voicehint>" + hint.getCommandString() + ";" + (int) (hint.distanceToNext) + "," + hint.formatGeometry() + "</brouter:voicehint>";
if (n.message != null && n.message.wayKeyValues != null && !n.message.wayKeyValues.equals(lastway)) {
sele += "<brouter:way>" + n.message.wayKeyValues + "</brouter:way>";
lastway = n.message.wayKeyValues;
}
if (n.message != null && n.message.nodeKeyValues != null) {
sele += "<brouter:node>" + n.message.nodeKeyValues + "</brouter:node>";
}
sele += "</extensions>";
}
if (idx == 0 && hint == null) {
if (mwpt != null && mwpt.direct) {
sele += "<desc>beeline</desc>";
} else {
sele += "<desc>start</desc>";
}
sele += "<type>Via</type>";
} else if (idx == nodes.size() - 1 && hint == null) {
sele += "<desc>end</desc>";
sele += "<type>Via</type>";
} else {
if (mwpt != null && hint == null) {
if (mwpt.direct) {
// bNextDirect = true;
sele += "<desc>beeline</desc>";
} else {
sele += "<desc>" + mwpt.name + "</desc>";
}
sele += "<type>Via</type>";
bNextDirect = false;
}
}
if (hint == null) {
bNeedHeader = (showspeed || (n.message != null && n.message.wayKeyValues != null && !n.message.wayKeyValues.equals(lastway))) ||
(n.message != null && n.message.nodeKeyValues != null);
if (bNeedHeader) {
sele += "<extensions>";
if (showspeed) {
double speed = 0;
if (nn != null) {
int dist = n.calcDistance(nn);
float dt = n.getTime() - nn.getTime();
if (dt != 0.f) {
speed = ((3.6f * dist) / dt + 0.5);
}
}
sele += "<brouter:speed>" + (((int) (speed * 10)) / 10.f) + "</brouter:speed>";
}
if (n.message != null && n.message.wayKeyValues != null && !n.message.wayKeyValues.equals(lastway)) {
sele += "<brouter:way>" + n.message.wayKeyValues + "</brouter:way>";
lastway = n.message.wayKeyValues;
}
if (n.message != null && n.message.nodeKeyValues != null) {
sele += "<brouter:node>" + n.message.nodeKeyValues + "</brouter:node>";
}
sele += "</extensions>";
}
}
}
if (turnInstructionMode == 2) { // locus style new
if (hint != null) {
if (mwpt != null) {
if (mwpt.direct && bNextDirect) {
sele += "<src>" + hint.getLocusSymbolString() + "</src><sym>pass_place</sym><type>Shaping</type>";
// bNextDirect = false;
} else if (mwpt.direct) {
sele += "<sym>pass_place</sym><type>Shaping</type>";
bNextDirect = true;
} else if (bNextDirect) {
sele += "<src>beeline</src><sym>" + hint.getLocusSymbolString() + "</sym><type>Shaping</type>";
bNextDirect = false;
} else {
sele += "<sym>" + hint.getLocusSymbolString() + "</sym>";
}
} else {
sele += "<sym>" + hint.getLocusSymbolString() + "</sym>";
}
} else {
if (idx == 0 && hint == null) {
int pos = sele.indexOf("<sym");
if (pos != -1) {
sele = sele.substring(0, pos);
}
if (mwpt != null && !mwpt.name.startsWith("from"))
sele += "<name>" + mwpt.name + "</name>";
if (mwpt != null && mwpt.direct) {
bNextDirect = true;
}
sele += "<sym>pass_place</sym>";
sele += "<type>Via</type>";
} else if (idx == nodes.size() - 1 && hint == null) {
int pos = sele.indexOf("<sym");
if (pos != -1) {
sele = sele.substring(0, pos);
}
if (mwpt != null && mwpt.name != null && !mwpt.name.startsWith("to"))
sele += "<name>" + mwpt.name + "</name>";
if (bNextDirect) {
sele += "<src>beeline</src>";
}
sele += "<sym>pass_place</sym>";
sele += "<type>Via</type>";
} else {
if (mwpt != null) {
if (sele.contains("sym") &&
!sele.contains("name") &&
!mwpt.name.startsWith("via") &&
!mwpt.name.startsWith("from") &&
!mwpt.name.startsWith("to")) {
int pos = sele.indexOf("<sym");
if (pos != -1)
sele = sele.substring(0, pos) + "<name>" + mwpt.name + "</name>" + sele.substring(pos) + "<type>Via</type>";
} else if (sele.contains("sym") && mwpt.name.startsWith("via")) {
sele += "<type>Via</type>";
} else if (mwpt.direct && bNextDirect) {
sele += "<src>beeline</src><sym>pass_place</sym><type>Shaping</type>";
} else if (mwpt.direct) {
sele += "<sym>pass_place</sym><type>Shaping</type>";
bNextDirect = true;
} else if (mwpt.name.startsWith("via") ||
mwpt.name.startsWith("from") ||
mwpt.name.startsWith("to")) {
if (bNextDirect) {
sele += "<src>beeline</src><sym>pass_place</sym><type>Shaping</type>";
} else {
sele += "<sym>pass_place</sym><type>Shaping</type>";
}
bNextDirect = false;
} else {
sele += "<name>" + mwpt.name + "</name>";
sele += "<sym>pass_place</sym><type>Via</type>";
}
}
} }
} }
} }
sb.append(" <trkpt lon=\"").append(formatILon(n.getILon())).append("\" lat=\"") sb.append(" <trkpt lon=\"").append(formatILon(n.getILon())).append("\" lat=\"")
.append(formatILat(n.getILat())).append("\">").append(sele).append("</trkpt>\n"); .append(formatILat(n.getILat())).append("\">").append(sele).append("</trkpt>\n");
nn = n;
} }
sb.append(" </trkseg>\n"); sb.append(" </trkseg>\n");
@ -921,6 +1145,18 @@ public final class OsmTrack {
return time; return time;
} }
SimpleDateFormat TIMESTAMP_FORMAT;
public String getFormattedTime3(float time) {
if (TIMESTAMP_FORMAT == null) {
TIMESTAMP_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.US);
TIMESTAMP_FORMAT.setTimeZone(TimeZone.getTimeZone("UTC"));
}
// yyyy-mm-ddThh:mm:ss.SSSZ
Date d = new Date((long) (time * 1000f));
return TIMESTAMP_FORMAT.format(d);
}
public String getFormattedEnergy() { public String getFormattedEnergy() {
return format1(energy / 3600000.) + "kwh"; return format1(energy / 3600000.) + "kwh";
} }
@ -1060,6 +1296,17 @@ public final class OsmTrack {
input.indexInTrack = --nodeNr; input.indexInTrack = --nodeNr;
input.goodWay = node.message; input.goodWay = node.message;
input.oldWay = node.origin.message == null ? node.message : node.origin.message; input.oldWay = node.origin.message == null ? node.message : node.origin.message;
if (rc.turnInstructionMode == 8 ||
rc.turnInstructionMode == 4 ||
rc.turnInstructionMode == 2 ||
rc.turnInstructionMode == 9) {
MatchedWaypoint mwpt = getMatchedWaypoint(nodeNr);
if (mwpt != null && mwpt.direct) {
input.cmd = VoiceHint.BL;
input.angle = (float) (nodeNr == 0 ? node.origin.message.turnangle : node.message.turnangle);
input.distanceToNext = node.calcDistance(node.origin);
}
}
OsmPathElementHolder detours = detourMap.get(node.origin.getIdFromPos()); OsmPathElementHolder detours = detourMap.get(node.origin.getIdFromPos());
if (nodeNr >= 0 && detours != null) { if (nodeNr >= 0 && detours != null) {
OsmPathElementHolder h = detours; OsmPathElementHolder h = detours;
@ -1081,8 +1328,8 @@ public final class OsmTrack {
List<VoiceHint> results = vproc.process(inputs); List<VoiceHint> results = vproc.process(inputs);
double minDistance = getMinDistance(); double minDistance = getMinDistance();
List < VoiceHint > resultsLast = vproc.postProcess(results, rc.turnInstructionCatchingRange, minDistance); List<VoiceHint> resultsLast = vproc.postProcess(results, rc.turnInstructionCatchingRange, minDistance);
for (VoiceHint hint: resultsLast) { for (VoiceHint hint : resultsLast) {
voiceHints.list.add(hint); voiceHints.list.add(hint);
} }

View file

@ -171,6 +171,7 @@ public final class RoutingContext {
showspeed = 0.f != expctxGlobal.getVariableValue("showspeed", 0.f); showspeed = 0.f != expctxGlobal.getVariableValue("showspeed", 0.f);
showSpeedProfile = 0.f != expctxGlobal.getVariableValue("showSpeedProfile", 0.f); showSpeedProfile = 0.f != expctxGlobal.getVariableValue("showSpeedProfile", 0.f);
inverseRouting = 0.f != expctxGlobal.getVariableValue("inverseRouting", 0.f); inverseRouting = 0.f != expctxGlobal.getVariableValue("inverseRouting", 0.f);
showTime = 0.f != expctxGlobal.getVariableValue("showtime", 0.f);
int tiMode = (int) expctxGlobal.getVariableValue("turnInstructionMode", 0.f); int tiMode = (int) expctxGlobal.getVariableValue("turnInstructionMode", 0.f);
if (tiMode != 1) // automatic selection from coordinate source if (tiMode != 1) // automatic selection from coordinate source
@ -233,6 +234,7 @@ public final class RoutingContext {
public boolean showspeed; public boolean showspeed;
public boolean showSpeedProfile; public boolean showSpeedProfile;
public boolean inverseRouting; public boolean inverseRouting;
public boolean showTime;
public OsmPrePath firstPrePath; public OsmPrePath firstPrePath;

View file

@ -246,9 +246,10 @@ public class RoutingEngine extends Thread {
int startIdx = 0; int startIdx = 0;
int endIdx = -1; int endIdx = -1;
int dist = 0; int dist = 0;
for (int idx = 0; idx < track.nodes.size(); idx++) { int ourSize = track.nodes.size();
for (int idx = 0; idx < ourSize; idx++) {
OsmPathElement n = track.nodes.get(idx); OsmPathElement n = track.nodes.get(idx);
if (n.getSElev() == Short.MIN_VALUE && lastElev != Short.MIN_VALUE) { if (n.getSElev() == Short.MIN_VALUE && lastElev != Short.MIN_VALUE && idx < ourSize-1) {
// start one point before entry point to get better elevation results // start one point before entry point to get better elevation results
if (idx > 1) if (idx > 1)
startElev = track.nodes.get(idx - 2).getSElev(); startElev = track.nodes.get(idx - 2).getSElev();
@ -511,6 +512,9 @@ public class RoutingEngine extends Thread {
totaltrack.processVoiceHints(routingContext); totaltrack.processVoiceHints(routingContext);
totaltrack.prepareSpeedProfile(routingContext); totaltrack.prepareSpeedProfile(routingContext);
totaltrack.showTime = routingContext.showTime;
totaltrack.params = routingContext.keyValues;
if (routingContext.poipoints != null) if (routingContext.poipoints != null)
totaltrack.pois = routingContext.poipoints; totaltrack.pois = routingContext.poipoints;
totaltrack.matchedWaypoints = matchedWaypoints; totaltrack.matchedWaypoints = matchedWaypoints;

View file

@ -102,6 +102,10 @@ public class VoiceHint {
return "RNDB" + roundaboutExit; return "RNDB" + roundaboutExit;
case RNLB: case RNLB:
return "RNLB" + (-roundaboutExit); return "RNLB" + (-roundaboutExit);
case BL:
return "BL";
case OFFR:
return "OFFR";
default: default:
throw new IllegalArgumentException("unknown command: " + cmd); throw new IllegalArgumentException("unknown command: " + cmd);
} }
@ -140,6 +144,10 @@ public class VoiceHint {
return "RNDB" + roundaboutExit; return "RNDB" + roundaboutExit;
case RNLB: case RNLB:
return "RNLB" + (-roundaboutExit); return "RNLB" + (-roundaboutExit);
case BL:
return "BL";
case OFFR:
return "OFFR";
default: default:
return "unknown command: " + c; return "unknown command: " + c;
} }
@ -178,6 +186,10 @@ public class VoiceHint {
return "RNDB" + roundaboutExit; return "RNDB" + roundaboutExit;
case RNLB: case RNLB:
return "RNLB" + (-roundaboutExit); return "RNLB" + (-roundaboutExit);
case BL:
return "BL";
case OFFR:
return "OFFR";
default: default:
throw new IllegalArgumentException("unknown command: " + cmd); throw new IllegalArgumentException("unknown command: " + cmd);
} }
@ -372,6 +384,8 @@ public class VoiceHint {
return "RNLB" + (-roundaboutExit); return "RNLB" + (-roundaboutExit);
case BL: case BL:
return "BL"; return "BL";
case OFFR:
return "OFFR";
default: default:
throw new IllegalArgumentException("unknown command: " + cmd); throw new IllegalArgumentException("unknown command: " + cmd);
} }
@ -407,11 +421,13 @@ public class VoiceHint {
case TRU: case TRU:
return "u-turn right"; return "u-turn right";
case RNDB: case RNDB:
return "Take exit " + roundaboutExit; return "take exit " + roundaboutExit;
case RNLB: case RNLB:
return "Take exit " + (-roundaboutExit); return "take exit " + (-roundaboutExit);
case BL: case BL:
return "Beeline"; return "beeline";
case OFFR:
return "offroad";
default: default:
throw new IllegalArgumentException("unknown command: " + cmd); throw new IllegalArgumentException("unknown command: " + cmd);
} }

View file

@ -1,9 +1,12 @@
package btools.mapaccess; package btools.mapaccess;
import java.util.List; import java.util.List;
import java.util.Collections;
import java.util.Comparator;
import btools.codec.WaypointMatcher; import btools.codec.WaypointMatcher;
import btools.util.CheapRuler; import btools.util.CheapRuler;
import btools.util.CheapAngleMeter;
/** /**
* the WaypointMatcher is feeded by the decoder with geoemtries of ways that are * the WaypointMatcher is feeded by the decoder with geoemtries of ways that are
@ -13,6 +16,8 @@ import btools.util.CheapRuler;
* match for each waypoint * match for each waypoint
*/ */
public final class WaypointMatcherImpl implements WaypointMatcher { public final class WaypointMatcherImpl implements WaypointMatcher {
private static final int MAX_POINTS = 5;
private List<MatchedWaypoint> waypoints; private List<MatchedWaypoint> waypoints;
private OsmNodePairSet islandPairs; private OsmNodePairSet islandPairs;
@ -24,12 +29,37 @@ public final class WaypointMatcherImpl implements WaypointMatcher {
private int lonLast; private int lonLast;
private int latLast; private int latLast;
private Comparator<MatchedWaypoint> comparator;
public WaypointMatcherImpl(List<MatchedWaypoint> waypoints, double maxDistance, OsmNodePairSet islandPairs) { public WaypointMatcherImpl(List<MatchedWaypoint> waypoints, double maxDistance, OsmNodePairSet islandPairs) {
this.waypoints = waypoints; this.waypoints = waypoints;
this.islandPairs = islandPairs; this.islandPairs = islandPairs;
MatchedWaypoint last = null;
for (MatchedWaypoint mwp : waypoints) { for (MatchedWaypoint mwp : waypoints) {
mwp.radius = maxDistance; mwp.radius = maxDistance;
if (last != null && mwp.directionToNext == -1) {
last.directionToNext = CheapAngleMeter.getDirection(last.waypoint.ilon, last.waypoint.ilat, mwp.waypoint.ilon, mwp.waypoint.ilat);
}
last = mwp;
} }
// last point has no angle so we are looking back
int lastidx = waypoints.size() - 2;
if (lastidx < 0) {
last.directionToNext = -1;
} else {
last.directionToNext = CheapAngleMeter.getDirection(last.waypoint.ilon, last.waypoint.ilat, waypoints.get(lastidx).waypoint.ilon, waypoints.get(lastidx).waypoint.ilat);
}
// sort result list
comparator = new Comparator<MatchedWaypoint>() {
@Override
public int compare(MatchedWaypoint mw1, MatchedWaypoint mw2) {
int cmpDist = Double.compare(mw1.radius, mw2.radius);
if (cmpDist != 0) return cmpDist;
return Double.compare(mw1.directionDiff, mw2.directionDiff);
}
};
} }
private void checkSegment(int lon1, int lat1, int lon2, int lat2) { private void checkSegment(int lon1, int lat1, int lon2, int lat2) {
@ -46,8 +76,8 @@ public final class WaypointMatcherImpl implements WaypointMatcher {
if (d == 0.) if (d == 0.)
return; return;
int len = waypoints.size(); //for ( MatchedWaypoint mwp : waypoints )
for (int i = 0; i < len; i++) { for (int i = 0; i < waypoints.size(); i++) {
MatchedWaypoint mwp = waypoints.get(i); MatchedWaypoint mwp = waypoints.get(i);
if (mwp.direct && if (mwp.direct &&
@ -65,7 +95,6 @@ public final class WaypointMatcherImpl implements WaypointMatcher {
} }
OsmNode wp = mwp.waypoint; OsmNode wp = mwp.waypoint;
double x1 = (lon1 - wp.ilon) * dlon2m; double x1 = (lon1 - wp.ilon) * dlon2m;
double y1 = (lat1 - wp.ilat) * dlat2m; double y1 = (lat1 - wp.ilat) * dlat2m;
double x2 = (lon2 - wp.ilon) * dlon2m; double x2 = (lon2 - wp.ilon) * dlon2m;
@ -74,7 +103,7 @@ public final class WaypointMatcherImpl implements WaypointMatcher {
double r22 = x2 * x2 + y2 * y2; double r22 = x2 * x2 + y2 * y2;
double radius = Math.abs(r12 < r22 ? y1 * dx - x1 * dy : y2 * dx - x2 * dy) / d; double radius = Math.abs(r12 < r22 ? y1 * dx - x1 * dy : y2 * dx - x2 * dy) / d;
if (radius < mwp.radius) { if (radius <= mwp.radius) {
double s1 = x1 * dx + y1 * dy; double s1 = x1 * dx + y1 * dy;
double s2 = x2 * dx + y2 * dy; double s2 = x2 * dx + y2 * dy;
@ -141,11 +170,67 @@ public final class WaypointMatcherImpl implements WaypointMatcher {
if (anyUpdate) { if (anyUpdate) {
for (MatchedWaypoint mwp : waypoints) { for (MatchedWaypoint mwp : waypoints) {
if (mwp.hasUpdate) { if (mwp.hasUpdate) {
double angle = CheapAngleMeter.getDirection(lonStart, latStart, lonTarget, latTarget);
double diff = CheapAngleMeter.getDifferenceFromDirection(mwp.directionToNext, angle);
mwp.hasUpdate = false; mwp.hasUpdate = false;
mwp.node1 = new OsmNode(lonStart, latStart);
mwp.node2 = new OsmNode(lonTarget, latTarget); MatchedWaypoint mw = new MatchedWaypoint();
mw.waypoint = new OsmNode();
mw.waypoint.ilon = mwp.waypoint.ilon;
mw.waypoint.ilat = mwp.waypoint.ilat;
mw.crosspoint = new OsmNode();
mw.crosspoint.ilon = mwp.crosspoint.ilon;
mw.crosspoint.ilat = mwp.crosspoint.ilat;
mw.node1 = new OsmNode(lonStart, latStart);
mw.node2 = new OsmNode(lonTarget, latTarget);
mw.name = mwp.name + "_w_" + mwp.crosspoint.hashCode();
mw.radius = mwp.radius;
mw.directionDiff = diff;
mw.directionToNext = mwp.directionToNext;
updateWayList(mwp.wayNearest, mw);
// revers
angle = CheapAngleMeter.getDirection(lonTarget, latTarget, lonStart, latStart);
diff = CheapAngleMeter.getDifferenceFromDirection(mwp.directionToNext, angle);
mw = new MatchedWaypoint();
mw.waypoint = new OsmNode();
mw.waypoint.ilon = mwp.waypoint.ilon;
mw.waypoint.ilat = mwp.waypoint.ilat;
mw.crosspoint = new OsmNode();
mw.crosspoint.ilon = mwp.crosspoint.ilon;
mw.crosspoint.ilat = mwp.crosspoint.ilat;
mw.node1 = new OsmNode(lonTarget, latTarget);
mw.node2 = new OsmNode(lonStart, latStart);
mw.name = mwp.name + "_w2_" + mwp.crosspoint.hashCode();
mw.radius = mwp.radius;
mw.directionDiff = diff;
mw.directionToNext = mwp.directionToNext;
updateWayList(mwp.wayNearest, mw);
MatchedWaypoint way = mwp.wayNearest.get(0);
mwp.crosspoint.ilon = way.crosspoint.ilon;
mwp.crosspoint.ilat = way.crosspoint.ilat;
mwp.node1 = new OsmNode(way.node1.ilon, way.node1.ilat);
mwp.node2 = new OsmNode(way.node2.ilon, way.node2.ilat);
mwp.directionDiff = way.directionDiff;
mwp.radius = way.radius;
} }
} }
} }
} }
// check limit of list size (avoid long runs)
void updateWayList(List<MatchedWaypoint> ways, MatchedWaypoint mw) {
ways.add(mw);
// use only shortest distances by smallest direction difference
Collections.sort(ways, comparator);
if (ways.size() > MAX_POINTS) ways.remove(MAX_POINTS);
}
} }

View file

@ -26,12 +26,12 @@ interface IBRouterService {
// "nogos" = lon,lat,radius|... (optional, radius in meters) // "nogos" = lon,lat,radius|... (optional, radius in meters)
// "polylines" = lon,lat,lon,lat,...,weight|... (unlimited list of lon,lat and weight (optional), lists separated by |) // "polylines" = lon,lat,lon,lat,...,weight|... (unlimited list of lon,lat and weight (optional), lists separated by |)
// "polygons" = lon,lat,lon,lat,...,weight|... (unlimited list of lon,lat and weight (optional), lists separated by |) // "polygons" = lon,lat,lon,lat,...,weight|... (unlimited list of lon,lat and weight (optional), lists separated by |)
// "profile" = profile file name without .brf // "profile" = profile file name without .brf
// "alternativeidx" = [0|1|2|3] (optional, default 0) // "alternativeidx" = [0|1|2|3] (optional, default 0)
// "exportWaypoints" = 1 to export them (optional, default is no export) // "exportWaypoints" = 1 to export them (optional, default is no export)
// "pois" = lon,lat,name|... (optional) // "pois" = lon,lat,name|... (optional)
// "extraParams" = Bundle key=value list for a profile setup (like "profile:") // "extraParams" = Bundle key=value list for a profile setup (like "profile:")
// "timode" = turnInstructionMode [0=none, 1=auto-choose, 2=locus-style, 3=osmand-style, 4=comment-style, 5=gpsies-style, 6=orux-style, 7=locus-new-style, 8=cruiser-stylem, 9=brouter-intern] default 0 // "timode" = turnInstructionMode [0=none, 1=auto-choose, 2=locus-style, 3=osmand-style, 4=comment-style, 5=gpsies-style, 6=orux-style, 7=locus-old-style] default 0
// "heading" = angle (optional to give a route a start direction) // "heading" = angle (optional to give a route a start direction)
// "direction" = angle (optional, used like "heading" on a recalculation request by Locus as start direction) // "direction" = angle (optional, used like "heading" on a recalculation request by Locus as start direction)

View file

@ -46,4 +46,30 @@ public final class CheapAngleMeter {
} }
return offset + sinp * (57.4539 + s2 * (9.57565 + s2 * (4.30904 + s2 * 2.56491))); return offset + sinp * (57.4539 + s2 * (9.57565 + s2 * (4.30904 + s2 * 2.56491)));
} }
public static double getAngle(int lon1, int lat1, int lon2, int lat2) {
double res = 0;
double xdiff = lat2 - lat1;
double ydiff = lon2 - lon1;
res = Math.toDegrees(Math.atan2(ydiff, xdiff));
return res;
}
public static double getDirection(int lon1, int lat1, int lon2, int lat2) {
double res = getAngle(lon1, lat1, lon2, lat2);
return normalize(res);
}
public static double normalize(double a) {
return a >= 360 ? a - (360 * (int) (a / 360))
: a < 0 ? a - (360 * ((int) (a / 360) - 1)) : a;
}
public static double getDifferenceFromDirection(double b1, double b2) {
double r = (b2 - b1) % 360.0;
if (r < -180.0) r += 360.0;
if (r >= 180.0) r -= 360.0;
return Math.abs(r);
}
} }

View file

@ -109,4 +109,149 @@ public class CheapAngleMeterTest {
} }
} }
@Test
public void testGetAngle() {
CheapAngleMeter am = new CheapAngleMeter();
int lon1, lat1, lon2, lat2;
lon1 = toOsmLon(10.0);
lat1 = toOsmLat(50.0);
lon2 = toOsmLon(10.0);
lat2 = toOsmLat(60.0);
double angle = am.getAngle(lon1, lat1, lon2, lat2);
assertEquals("Angle = " + angle, 0.0, angle, 0.0);
lon2 = toOsmLon(10.0);
lat2 = toOsmLat(40.0);
angle = am.getAngle(lon1, lat1, lon2, lat2);
assertEquals("Angle = " + angle, 180.0, angle, 0.0);
lon2 = toOsmLon(0.0);
lat2 = toOsmLat(50.0);
angle = am.getAngle(lon1, lat1, lon2, lat2);
assertEquals("Angle = " + angle, -90.0, angle, 0.0);
lon2 = toOsmLon(20.0);
lat2 = toOsmLat(50.0);
angle = am.getAngle(lon1, lat1, lon2, lat2);
assertEquals("Angle = " + angle, 90.0, angle, 0.0);
lon2 = toOsmLon(20.0);
lat2 = toOsmLat(60.0);
angle = am.getAngle(lon1, lat1, lon2, lat2);
assertEquals("Angle = " + angle, 45.0, angle, 0.0);
lon2 = toOsmLon(0.0);
lat2 = toOsmLat(60.0);
angle = am.getAngle(lon1, lat1, lon2, lat2);
assertEquals("Angle = " + angle, -45.0, angle, 0.0);
lon1 = 1;
lat1 = 1;
lon2 = 2;
lat2 = 2;
angle = am.getAngle(lon1, lat1, lon2, lat2);
assertEquals("Angle = " + angle, 45.0, angle, 0.0);
}
@Test
public void testGetDirection() {
CheapAngleMeter am = new CheapAngleMeter();
int lon1, lat1, lon2, lat2;
lon1 = toOsmLon(10.0);
lat1 = toOsmLat(50.0);
lon2 = toOsmLon(10.0);
lat2 = toOsmLat(60.0);
double angle = am.getDirection(lon1, lat1, lon2, lat2);
assertEquals("Direction = " + angle, 0.0, angle, 0.0);
lon2 = toOsmLon(10.0);
lat2 = toOsmLat(40.0);
angle = am.getDirection(lon1, lat1, lon2, lat2);
assertEquals("Direction = " + angle, 180.0, angle, 0.0);
lon2 = toOsmLon(0.0);
lat2 = toOsmLat(50.0);
angle = am.getDirection(lon1, lat1, lon2, lat2);
assertEquals("Direction = " + angle, 270.0, angle, 0.0);
lon2 = toOsmLon(20.0);
lat2 = toOsmLat(50.0);
angle = am.getDirection(lon1, lat1, lon2, lat2);
assertEquals("Direction = " + angle, 90.0, angle, 0.0);
lon2 = toOsmLon(20.0);
lat2 = toOsmLat(60.0);
angle = am.getDirection(lon1, lat1, lon2, lat2);
assertEquals("Direction = " + angle, 45.0, angle, 0.0);
lon2 = toOsmLon(0.0);
lat2 = toOsmLat(60.0);
angle = am.getDirection(lon1, lat1, lon2, lat2);
assertEquals("Direction = " + angle, 315.0, angle, 0.0);
lon1 = 1;
lat1 = 1;
lon2 = 2;
lat2 = 2;
angle = am.getDirection(lon1, lat1, lon2, lat2);
assertEquals("Direction = " + angle, 45.0, angle, 0.0);
}
@Test
public void testNormalize() {
CheapAngleMeter am = new CheapAngleMeter();
double n = 1;
assertEquals("Direction normalize = " + n, 1, am.normalize(n), 0.0);
n = -1;
assertEquals("Direction normalize = " + n, 359, am.normalize(n), 0.0);
n = 361;
assertEquals("Direction normalize = " + n, 1, am.normalize(n), 0.0);
n = 0;
assertEquals("Direction normalize = " + n, 0, am.normalize(n), 0.0);
n = 360;
assertEquals("Direction normalize = " + n, 0, am.normalize(n), 0.0);
}
@Test
public void testCalcAngle6() {
CheapAngleMeter am = new CheapAngleMeter();
double a1 = 90;
double a2 = 180;
assertEquals("Direction diff " + a1 + " " + a2 + " = ", 90, am.getDifferenceFromDirection(a1, a2), 0.0);
a1 = 180;
a2 = 90;
assertEquals("Direction diff " + a1 + " " + a2 + " = ", 90, am.getDifferenceFromDirection(a1, a2), 0.0);
a1 = 5;
a2 = 355;
assertEquals("Direction diff " + a1 + " " + a2 + " = ", 10, am.getDifferenceFromDirection(a1, a2), 0.0);
a1 = 355;
a2 = 5;
assertEquals("Direction diff " + a1 + " " + a2 + " = ", 10, am.getDifferenceFromDirection(a1, a2), 0.0);
a1 = 90;
a2 = 270;
assertEquals("Direction diff " + a1 + " " + a2 + " = ", 180, am.getDifferenceFromDirection(a1, a2), 0.0);
a1 = 270;
a2 = 90;
assertEquals("Direction diff " + a1 + " " + a2 + " = ", 180, am.getDifferenceFromDirection(a1, a2), 0.0);
}
} }

View file

@ -97,7 +97,7 @@ Some variable names are pre-defined and accessed by the routing engine:
- 3 variables to influence the generation of turn-instructions - 3 variables to influence the generation of turn-instructions
- `turnInstructionMode` 0=none, 1=auto-choose, 2=locus-style, - `turnInstructionMode` 0=none, 1=auto-choose, 2=locus-style,
3=osmand-style 3=osmand-style, 4=comment-style, 5=gpsies-style, 6=orux-style, 7=locus-old-style
- `turnInstructionCatchingRange` default=40m - `turnInstructionCatchingRange` default=40m
- `turnInstructionRoundabouts` default=true generate explicit roundabout - `turnInstructionRoundabouts` default=true generate explicit roundabout
hints hints

View file

@ -27,7 +27,7 @@ assign f_recup = 400 # %f_recup% | Newton | number
assign p_standby = 250 # %p_standby% | Watt | number assign p_standby = 250 # %p_standby% | Watt | number
# Turn instructions settings # Turn instructions settings
assign turnInstructionMode = 1 # %turnInstructionMode% | Mode for the generated turn instructions | [0=none, 1=auto-choose, 2=locus-style, 3=osmand-style, 4=comment-style, 5=gpsies-style, 6=orux-style] assign turnInstructionMode = 1 # %turnInstructionMode% | Mode for the generated turn instructions | [0=none, 1=auto-choose, 2=locus-style, 3=osmand-style, 4=comment-style, 5=gpsies-style, 6=orux-style, 7=locus-old-style]
# Technical parameters # Technical parameters
assign pass1coefficient = 1.3 assign pass1coefficient = 1.3

View file

@ -1,8 +1,8 @@
# "fastbike-verylowtraffic.brf" -- Version 23.08.2021 # "fastbike-verylowtraffic.brf" -- Version 23.08.2021
# This profile, developed by Ess Bee, is based on the "fastbike-lowtraffic" profile # This profile, developed by Ess Bee, is based on the "fastbike-lowtraffic" profile
# it is intended for road cyclists who ride alone and / or in the middle of the week: thus trucks and high traffic are avoided # it is intended for road cyclists who ride alone and / or in the middle of the week: thus trucks and high traffic are avoided
# (cyclists in group at the weekend will rather use "fastbike.brf" or "fastbike-lowprofile.brf" as groups are better respected by cars and trucks) # (cyclists in group at the weekend will rather use "fastbike.brf" or "fastbike-lowprofile.brf" as groups are better respected by cars and trucks)
# #
# ==> where ever possible, choose: # ==> where ever possible, choose:
# - an asphalted way (with good smoothness) # - an asphalted way (with good smoothness)
# - cycleways are prefered # - cycleways are prefered
@ -11,13 +11,13 @@
# - avoid segments with high-traffic # - avoid segments with high-traffic
# #
# The route is calculated using the taggs of the OSM map (such as highway, surface, smoothness, maxspeed, traffic_class...) # The route is calculated using the taggs of the OSM map (such as highway, surface, smoothness, maxspeed, traffic_class...)
# #
---context:global # following code refers to global config
assign processUnusedTags false # set to true if you want to display all tags in the "data"
# to generate turn instructions, adapt the mode by need ---context:global # following code refers to global config
assign turnInstructionMode = 1 # %turnInstructionMode% | Mode for the generated turn instructions | [0=none, 1=auto-choose, 2=locus-style, 3=osmand-style] assign processUnusedTags false # set to true if you want to display all tags in the "data"
# to generate turn instructions, adapt the mode by need
assign turnInstructionMode = 1 # %turnInstructionMode% | Mode for the generated turn instructions | [0=none, 1=auto-choose, 2=locus-style, 3=osmand-style, 4=comment-style, 5=gpsies-style, 6=orux-style, 7=locus-old-style]
# Use the following switches to change behaviour # Use the following switches to change behaviour
@ -25,11 +25,11 @@ assign consider_elevation = false # %consider_elevation% | set to true to
assign avoid_path = false # %avoid_path% | set to true to avoid pathes | boolean assign avoid_path = false # %avoid_path% | set to true to avoid pathes | boolean
assign consider_traffic = 1 # %consider_traffic% | 0 => no cost for "traffic_class" or "maxspeed", 1 => costs are considered!: value example 0.3 | number assign consider_traffic = 1 # %consider_traffic% | 0 => no cost for "traffic_class" or "maxspeed", 1 => costs are considered!: value example 0.3 | number
assign cycleway_lane_penalty = 0 # 0 => when lane, no cost for traffic or max speed, 1 => same cost as on the highway itself: example 0.3 assign cycleway_lane_penalty = 0 # 0 => when lane, no cost for traffic or max speed, 1 => same cost as on the highway itself: example 0.3
assign turnInstructionCatchingRange = 8 # 2 turn instructions are generated only when distance > 8 m assign turnInstructionCatchingRange = 8 # 2 turn instructions are generated only when distance > 8 m
assign turnInstructionRoundabouts = false # roundabout, no "take exit N" (as "N" may be confusing compared to car) assign turnInstructionRoundabouts = false # roundabout, no "take exit N" (as "N" may be confusing compared to car)
assign considerTurnRestrictions = true # turn restrictions are considered assign considerTurnRestrictions = true # turn restrictions are considered
assign validForBikes 1 assign validForBikes 1
@ -42,7 +42,7 @@ assign validForBikes 1
assign downhillcost 60 assign downhillcost 60
assign downhillcutoff switch consider_elevation 1.5 15 assign downhillcutoff switch consider_elevation 1.5 15
assign uphillcost 100 assign uphillcost 100
assign uphillcutoff switch consider_elevation 1.5 15 assign uphillcutoff switch consider_elevation 1.5 15
@ -57,19 +57,19 @@ assign cycleway_right if reversedirection=yes
then if cycleway:left=track|lane|shared_lane then 1 else 0 then if cycleway:left=track|lane|shared_lane then 1 else 0
else if cycleway:right=track|lane|shared_lane then 1 else 0 else if cycleway:right=track|lane|shared_lane then 1 else 0
assign any_cycleway or cycleway=track|lane|shared_lane|shared cycleway_right assign any_cycleway or cycleway=track|lane|shared_lane|shared cycleway_right
# as soon it is supported in lookup, add ==> bicycle_road=yes in any_cycleway # as soon it is supported in lookup, add ==> bicycle_road=yes in any_cycleway
# in relation with "route=bicycle" ? # in relation with "route=bicycle" ?
assign any_cycleroute or route_bicycle_icn=yes or route_bicycle_ncn=yes or route_bicycle_rcn=yes route_bicycle_lcn=yes assign any_cycleroute or route_bicycle_icn=yes or route_bicycle_ncn=yes or route_bicycle_rcn=yes route_bicycle_lcn=yes
assign nodeaccessgranted or any_cycleroute lcn=yes assign nodeaccessgranted or any_cycleroute lcn=yes
assign ispaved or surface=paved surface=asphalt assign ispaved or surface=paved surface=asphalt
assign isunpaved surface=unpaved|gravel|dirt|earth|ground|sand assign isunpaved surface=unpaved|gravel|dirt|earth|ground|sand
assign isfine_gravel surface=fine_gravel|cobblestone|compacted|paving_stones assign isfine_gravel surface=fine_gravel|cobblestone|compacted|paving_stones
assign isconcrete surface=concrete assign isconcrete surface=concrete
assign turncost = if junction=roundabout then 0 assign turncost = if junction=roundabout then 0
else 10 else 10
@ -148,35 +148,35 @@ assign onewaypenalty =
else 0.0 else 0.0
assign surfacepenalty = assign surfacepenalty =
# if "surface" is not defined... # if "surface" is not defined...
switch surface= switch surface=
# then, for Primary, secondary and tertiary asphalt is very probable # then, for Primary, secondary and tertiary asphalt is very probable
switch highway=primary|primary_link|secondary|secondary_link|tertiary|tertiary_link 0 switch highway=primary|primary_link|secondary|secondary_link|tertiary|tertiary_link 0
# then, for residential & Co. probably asphalt.. # then, for residential & Co. probably asphalt..
switch highway=road|residential|unclassified 0.1 switch highway=road|residential|unclassified 0.1
# then, for living_street something paved .. # then, for living_street something paved ..
switch highway=living_street 0.3 switch highway=living_street 0.3
# then, for "service & cycleway" possibly good (but not sure!) ... # then, for "service & cycleway" possibly good (but not sure!) ...
switch highway=service|cycleway 0.5 switch highway=service|cycleway 0.5
# in some cases only smoothness is tagged but surface not! # in some cases only smoothness is tagged but surface not!
switch smoothness=intermediate|good|excellent 0 switch smoothness=intermediate|good|excellent 0
# else, check if tracktype=grade1, then it is "something" paved, so middle penalty # else, check if tracktype=grade1, then it is "something" paved, so middle penalty
switch tracktype=grade1 0.2 switch tracktype=grade1 0.2
# if a cycleroute is defined, surface can not be horrible... # if a cycleroute is defined, surface can not be horrible...
switch any_cycleroute 3.5 5 switch any_cycleroute 3.5 5
switch surface=asphalt 0 switch surface=asphalt 0
switch surface=paved switch smoothness=good|excellent 0.1 0.3 # befestigte(harte)Oberfl sche switch surface=paved switch smoothness=good|excellent 0.1 0.3 # befestigte(harte)Oberfl sche
switch surface=gravel|sand|pebblestone|unpaved 10 # Schotter, Sand, Kies, unbefestigt switch surface=gravel|sand|pebblestone|unpaved 10 # Schotter, Sand, Kies, unbefestigt
switch surface=ground|grass|dirt|earth|mud|clay 25 # naturbelassene Oberfl sche, Gras, Schutz Schlamm... switch surface=ground|grass|dirt|earth|mud|clay 25 # naturbelassene Oberfl sche, Gras, Schutz Schlamm...
switch surface=fine_gravel|compacted switch smoothness=good|excellent 1 4 # Splitt,verdichtete Oberflaesche switch surface=fine_gravel|compacted switch smoothness=good|excellent 1 4 # Splitt,verdichtete Oberflaesche
switch surface=sett switch smoothness=good|excellent 0.1 0.3 # behauene Pflastersteine switch surface=sett switch smoothness=good|excellent 0.1 0.3 # behauene Pflastersteine
switch concrete=plates 1 # Betonplattenwege switch concrete=plates 1 # Betonplattenwege
switch surface=concrete|paving_stones|wood|metal 0.8 # Beton, Pflastersteine (geschnitzt), Holz, Metall switch surface=concrete|paving_stones|wood|metal 0.8 # Beton, Pflastersteine (geschnitzt), Holz, Metall
switch surface=cobblestone|sett switch smoothness=good|excellent 1 2 # Kopfsteinpflaster switch surface=cobblestone|sett switch smoothness=good|excellent 1 2 # Kopfsteinpflaster
# switch surface=unhewn_cobblestone 3 # ungeschnitzter Pflasterstein # switch surface=unhewn_cobblestone 3 # ungeschnitzter Pflasterstein
switch concrete=lanes 3 # Betonspurplatten switch concrete=lanes 3 # Betonspurplatten
switch surface=grass_paver 5 # Rasengittersteine switch surface=grass_paver 5 # Rasengittersteine
# surface not known and probably not paved / no asphalt... # surface not known and probably not paved / no asphalt...
8 8
@ -189,7 +189,7 @@ assign tracktypepenalty
assign trafficpenalty = assign trafficpenalty =
# if any_cycleway then 0 # if any_cycleway then 0
# else # else
if highway=primary|primary_link then if highway=primary|primary_link then
( (
@ -229,12 +229,12 @@ assign smoothnesspenalty =
assign maxspeedpenalty = assign maxspeedpenalty =
switch or highway=primary highway=primary_link switch or highway=primary highway=primary_link
# as soon "name" is supported in lookup, replace with "switch maxspeed= switch name= 2.2 1 # as soon "name" is supported in lookup, replace with "switch maxspeed= switch name= 2.2 1
switch maxspeed=50 multiply 0.2 consider_traffic switch maxspeed=50 multiply 0.2 consider_traffic
# switch any_cycleway multiply 0.2 consider_traffic # switch any_cycleway multiply 0.2 consider_traffic
switch maxspeed=60 multiply 0.7 consider_traffic switch maxspeed=60 multiply 0.7 consider_traffic
switch maxspeed=70 multiply 1.2 consider_traffic switch maxspeed=70 multiply 1.2 consider_traffic
switch maxspeed=80 multiply 1.5 consider_traffic switch maxspeed=80 multiply 1.5 consider_traffic
switch maxspeed=90 multiply 2.0 consider_traffic switch maxspeed=90 multiply 2.0 consider_traffic
switch maxspeed=100 multiply 3.0 consider_traffic switch maxspeed=100 multiply 3.0 consider_traffic
switch maxspeed=110 multiply 11 consider_traffic switch maxspeed=110 multiply 11 consider_traffic
switch maxspeed=120 multiply 12 consider_traffic switch maxspeed=120 multiply 12 consider_traffic
@ -275,36 +275,36 @@ assign usesidepathpenalty =
# give a light advantage to highways with a relation cycleroute # give a light advantage to highways with a relation cycleroute
assign nocycleroute_penalty switch any_cycleroute 0 0.05 assign nocycleroute_penalty switch any_cycleroute 0 0.05
assign not_bicycle_designatedpenalty switch bicycle=designated 0 0.1 assign not_bicycle_designatedpenalty switch bicycle=designated 0 0.1
assign sum_highwaypenalty assign sum_highwaypenalty
add surfacepenalty add surfacepenalty
add tracktypepenalty add tracktypepenalty
add trafficpenalty add trafficpenalty
add smoothnesspenalty add smoothnesspenalty
add maxspeedpenalty add maxspeedpenalty
add usesidepathpenalty add usesidepathpenalty
add nocycleroute_penalty add nocycleroute_penalty
not_bicycle_designatedpenalty not_bicycle_designatedpenalty
# penalties differ when a cycleway is associated to the highway with "cycleway=yes" # penalties differ when a cycleway is associated to the highway with "cycleway=yes"
assign cycleway_surfacepenalty assign cycleway_surfacepenalty
switch any_cycleway switch any_cycleway
switch cycleway:surface= surfacepenalty # if not specified, same as highway switch cycleway:surface= surfacepenalty # if not specified, same as highway
switch cycleway:surface=asphalt 0 switch cycleway:surface=asphalt 0
switch cycleway:surface=sett 0.3 # behauene Pflastersteine switch cycleway:surface=sett 0.3 # behauene Pflastersteine
switch cycleway:surface=paved 0.3 # befestigte(harte)Oberflaesche switch cycleway:surface=paved 0.3 # befestigte(harte)Oberflaesche
switch cycleway:surface=concrete|paving_stones 0.8 # Beton, Pflastersteine (geschnitzt) switch cycleway:surface=concrete|paving_stones 0.8 # Beton, Pflastersteine (geschnitzt)
switch cycleway:surface=cobblestone|sett 2 # Kopfsteinpflaster switch cycleway:surface=cobblestone|sett 2 # Kopfsteinpflaster
switch cycleway:surface=fine_gravel|compacted 4 # Splitt,verdichtete Oberflaesche switch cycleway:surface=fine_gravel|compacted 4 # Splitt,verdichtete Oberflaesche
switch cycleway:surface=gravel 10 # Schotter switch cycleway:surface=gravel 10 # Schotter
0 # unknown value... 0 # unknown value...
1000 # noc cycleway 1000 # noc cycleway
# to be activated after implementation of #241 # to be activated after implementation of #241
#assign cycleway_smoothnesspenalty #assign cycleway_smoothnesspenalty
# switch cycleway:smoothness= smoothnesspenalty # if not specified, same as highway # switch cycleway:smoothness= smoothnesspenalty # if not specified, same as highway
# switch cycleway:smoothness=intermediate 0.3 # switch cycleway:smoothness=intermediate 0.3
# switch cycleway:smoothness=bad 1 # switch cycleway:smoothness=bad 1
# switch cycleway:smoothness=very_bad 2 # switch cycleway:smoothness=very_bad 2
@ -312,17 +312,17 @@ assign cycleway_surfacepenalty
# 0 # 0
# temporary... # temporary...
assign cycleway_smoothnesspenalty smoothnesspenalty # temporray same as highway assign cycleway_smoothnesspenalty smoothnesspenalty # temporray same as highway
assign sum_cyclewaypenalty assign sum_cyclewaypenalty
switch any_cycleway # cycleway exists switch any_cycleway # cycleway exists
add multiply maxspeedpenalty cycleway_lane_penalty add multiply maxspeedpenalty cycleway_lane_penalty
add multiply trafficpenalty cycleway_lane_penalty add multiply trafficpenalty cycleway_lane_penalty
add cycleway_surfacepenalty add cycleway_surfacepenalty
add cycleway_smoothnesspenalty add cycleway_smoothnesspenalty
usesidepathpenalty usesidepathpenalty
# add nocycleroute_penalty # add nocycleroute_penalty
# add not_bicycle_designatedpenalty # add not_bicycle_designatedpenalty
10000 # no cycleway 10000 # no cycleway
assign costfactor assign costfactor
@ -345,7 +345,7 @@ assign costfactor
switch highway=residential switch bicycle_road=yes 1 1.4 switch highway=residential switch bicycle_road=yes 1 1.4
switch highway=service switch ( or service= service=alley ) 1.1 11 switch highway=service switch ( or service= service=alley ) 1.1 11
switch highway=track|road 0.9 switch highway=track|road 0.9
switch highway=path switch avoid_path 2 1 switch highway=path switch avoid_path 2 1
switch highway=footway switch bicycle=yes 1.7 4.7 switch highway=footway switch bicycle=yes 1.7 4.7
19.9 19.9
@ -368,7 +368,7 @@ assign priorityclassifier =
else if ( highway=service ) then 8 else if ( highway=service ) then 8
else if ( highway=cycleway ) then 8 else if ( highway=cycleway ) then 8
else if ( bicycle=designated ) then 8 else if ( bicycle=designated ) then 8
else if ( highway=track|road|path ) else if ( highway=track|road|path )
then if or surface=asphalt|paved|paving_stones|concrete|wood|metal tracktype=grade1 then 8 else 6 then if or surface=asphalt|paved|paving_stones|concrete|wood|metal tracktype=grade1 then 8 else 6
else if ( highway=steps ) then 2 else if ( highway=steps ) then 2
else if ( highway=pedestrian ) then 2 else if ( highway=pedestrian ) then 2
@ -388,7 +388,7 @@ assign isgoodforcars = if greater priorityclassifier 6 then true
# ... encoded into a bitmask # ... encoded into a bitmask
assign classifiermask assign classifiermask
# add isbadoneway # no voice hint if 1 of the 2 possibilities is badoneway # add isbadoneway # no voice hint if 1 of the 2 possibilities is badoneway
add multiply isgoodoneway 2 add multiply isgoodoneway 2
add multiply isroundabout 4 add multiply isroundabout 4
@ -426,12 +426,12 @@ assign footaccess
1 1
assign railwaypenalty switch railway= 0 155 assign railwaypenalty switch railway= 0 155
# assign signalpenalty switch highway=traffic_signals 99 # assign signalpenalty switch highway=traffic_signals 99
# switch crossing=traffic_signals 49 0 # switch crossing=traffic_signals 49 0
# note: in case of a "left-turn" at the traffic-signal the penalty is counted twice... # note: in case of a "left-turn" at the traffic-signal the penalty is counted twice...
assign barrierpenalty switch barrier= 0 assign barrierpenalty switch barrier= 0
switch barrier=block|bollard 59 139 switch barrier=block|bollard 59 139
assign initialcost assign initialcost
add railwaypenalty add railwaypenalty
@ -441,4 +441,4 @@ assign initialcost
0 0
switch footaccess switch footaccess
300 300
1000000 1000000

View file

@ -47,7 +47,7 @@ assign C_r = 0.01 # %C_r% | Rolling resistance coefficient (dimensionle
assign bikerPower = 100 # %bikerPower% | Average power (in W) provided by the biker, for travel time computation | number assign bikerPower = 100 # %bikerPower% | Average power (in W) provided by the biker, for travel time computation | number
# Turn instructions settings # Turn instructions settings
assign turnInstructionMode = 1 # %turnInstructionMode% | Mode for the generated turn instructions | [0=none, 1=auto-choose, 2=locus-style, 3=osmand-style, 4=comment-style, 5=gpsies-style, 6=orux-style] assign turnInstructionMode = 1 # %turnInstructionMode% | Mode for the generated turn instructions | [0=none, 1=auto-choose, 2=locus-style, 3=osmand-style, 4=comment-style, 5=gpsies-style, 6=orux-style, 7=locus-old-style]
assign turnInstructionCatchingRange = 40 # %turnInstructionCatchingRange% | Within this distance (in m) several turning instructions are combined into one and the turning angles are better approximated to the general direction | number assign turnInstructionCatchingRange = 40 # %turnInstructionCatchingRange% | Within this distance (in m) several turning instructions are combined into one and the turning angles are better approximated to the general direction | number
assign turnInstructionRoundabouts = true # %turnInstructionRoundabouts% | Set to "false" to avoid generating special turning instructions for roundabouts | boolean assign turnInstructionRoundabouts = true # %turnInstructionRoundabouts% | Set to "false" to avoid generating special turning instructions for roundabouts | boolean

View file

@ -1,7 +1,7 @@
# Walking-Hiking-Mountain/Alpine Hiking profile TEMPLATE # Walking-Hiking-Mountain/Alpine Hiking profile TEMPLATE
# 18/5/2016 v1.8.7 ! Fixed down/uphillcostfactors for shortest_way - to be really shortest # 18/5/2016 v1.8.7 ! Fixed down/uphillcostfactors for shortest_way - to be really shortest
# #
# SAC T3 - demanding_mountain_hiking - exposed sites may be secured, possible need of hands for balance, Partly exposed with fall hazard, Well sure-footed, Good hiking shoes, Basic alpine experience # SAC T3 - demanding_mountain_hiking - exposed sites may be secured, possible need of hands for balance, Partly exposed with fall hazard, Well sure-footed, Good hiking shoes, Basic alpine experience
# #
# Legend above is placeholder for generated comments of final profile # Legend above is placeholder for generated comments of final profile
# See the profile bottom for changelogs and verbose *) comments # See the profile bottom for changelogs and verbose *) comments
@ -13,7 +13,7 @@
assign consider_elevation 1 # 0 as default, otherwise less interesting flat roads are chosen. assign consider_elevation 1 # 0 as default, otherwise less interesting flat roads are chosen.
assign shortest_way 0 # 0 as default, duplicate shortest standard profile, SAC access limit ignored for now assign shortest_way 0 # 0 as default, duplicate shortest standard profile, SAC access limit ignored for now
assign turnInstructionMode = 1 # 0=none, 1=auto-choose, 2=locus-style, 3=osmand-style assign turnInstructionMode = 1 # %turnInstructionMode% | Mode for the generated turn instructions | [0=none, 1=auto-choose, 2=locus-style, 3=osmand-style, 4=comment-style, 5=gpsies-style, 6=orux-style, 7=locus-old-style]
assign turnInstructionCatchingRange 20 # V1.8.5 / default=40, but foot paths may be more distingushed, especially in cities. assign turnInstructionCatchingRange 20 # V1.8.5 / default=40, but foot paths may be more distingushed, especially in cities.
assign iswet 0 # 0 as default, 1 tries to prevent muddy boots and wet buttocks assign iswet 0 # 0 as default, 1 tries to prevent muddy boots and wet buttocks
@ -28,10 +28,10 @@ assign path_preference 0.0 # 0.0 as default, try 20.0 to penalize non
assign SAC_scale_limit 3 # 0..6, 0 to avoid any SAC paths, 1 for T1 as maximum, 6 for T6 as maximum assign SAC_scale_limit 3 # 0..6, 0 to avoid any SAC paths, 1 for T1 as maximum, 6 for T6 as maximum
# all paths with sac_scale higher than SAC_scale_limit are forbidden. # all paths with sac_scale higher than SAC_scale_limit are forbidden.
assign SAC_scale_preferred 1 # The same, but the preferred SAC scale level. Level below are slightly, above strongly penalized assign SAC_scale_preferred 1 # The same, but the preferred SAC scale level. Level below are slightly, above strongly penalized
assign SAC_access_penalty 9000 # costfactor 9999 means the most horrible but allowed road., assign SAC_access_penalty 9000 # costfactor 9999 means the most horrible but allowed road.,
# 100000=forbidden. This makes difference if forbidden way is the only option. # 100000=forbidden. This makes difference if forbidden way is the only option.
assign SAC_K1 0.05 # Penalizing of SAC levels below preferred assign SAC_K1 0.05 # Penalizing of SAC levels below preferred
assign SAC_K2 0.6 # Penalizing of SAC levels above preferred assign SAC_K2 0.6 # Penalizing of SAC levels above preferred
#orientation/decision penalties, not used for preferred hiking routes #orientation/decision penalties, not used for preferred hiking routes
assign turncost_value 0 # not used now assign turncost_value 0 # not used now
@ -58,14 +58,14 @@ assign Offroad_hillcostfactor multiply -0.3333 ( max -3.0 ( multiply -1.0 (
# progressively decreases hillcosts to be 0.0 at Offroad_factor = 3.0 # progressively decreases hillcosts to be 0.0 at Offroad_factor = 3.0
# if Offroad_factor = 1 , then downhillcost decreases e.g. from 60 to 40 # if Offroad_factor = 1 , then downhillcost decreases e.g. from 60 to 40
assign downhillcost if consider_elevation then assign downhillcost if consider_elevation then
( multiply ( add 1.0 ( multiply Offroad_hillcostfactor -1.0 ) ) downhillcostvalue ) else 0 ( multiply ( add 1.0 ( multiply Offroad_hillcostfactor -1.0 ) ) downhillcostvalue ) else 0
assign uphillcost if consider_elevation then assign uphillcost if consider_elevation then
( multiply ( add 1.0 ( multiply Offroad_hillcostfactor -1.0 ) ) uphillcostvalue ) else 0 ( multiply ( add 1.0 ( multiply Offroad_hillcostfactor -1.0 ) ) uphillcostvalue ) else 0
assign uphillcutoff if consider_elevation then uphillcutoffvalue else 1.5 assign uphillcutoff if consider_elevation then uphillcutoffvalue else 1.5
assign downhillcutoff if consider_elevation then downhillcutoffvalue else 1.5 assign downhillcutoff if consider_elevation then downhillcutoffvalue else 1.5
assign nonhiking_route_penalty add 1.0 max 0.0 hiking_routes_preference assign nonhiking_route_penalty add 1.0 max 0.0 hiking_routes_preference
@ -80,7 +80,7 @@ assign validForFoot 1
#Penalty is ( 1 + SAC_K1)^(SAC_scale_preferred - SAC) -1 for SAC_scale_preferred > SAC, SAC <= SAC_scale_limit #Penalty is ( 1 + SAC_K1)^(SAC_scale_preferred - SAC) -1 for SAC_scale_preferred > SAC, SAC <= SAC_scale_limit
#Penalty is ( 1 + SAC_K2)^(SAC - SAC_scale_preferred) -1 for SAC_scale_preferred < SAC, SAC <= SAC_scale_limit #Penalty is ( 1 + SAC_K2)^(SAC - SAC_scale_preferred) -1 for SAC_scale_preferred < SAC, SAC <= SAC_scale_limit
#extra complexity of code below, with adding +/- 1.0 #extra complexity of code below, with adding +/- 1.0
#is to keep final penalties additive, even with multiplicative incremental penalty approach #is to keep final penalties additive, even with multiplicative incremental penalty approach
#code is run only once, being in global context #code is run only once, being in global context
@ -109,35 +109,35 @@ assign any_hiking_route or route=hiking or route_hiking_iwn=yes
or route_hiking_nwn=yes or route_hiking_rwn=yes or route_hiking_nwn=yes or route_hiking_rwn=yes
or route_hiking_lwn=yes or route_hiking_=yes or route_hiking_lwn=yes or route_hiking_=yes
or route_foot_=yes or route_foot_nwn=yes or route_foot_=yes or route_foot_nwn=yes
or route_foot_rwn=yes route_foot_lwn=yes or route_foot_rwn=yes route_foot_lwn=yes
assign any_cycleroute = assign any_cycleroute =
if route_bicycle_icn=yes then true if route_bicycle_icn=yes then true
else if route_bicycle_ncn=yes then true else if route_bicycle_ncn=yes then true
else if route_bicycle_rcn=yes then true else if route_bicycle_rcn=yes then true
else if route_bicycle_lcn=yes then true else if route_bicycle_lcn=yes then true
else false else false
assign is_ldhr and any_hiking_route not equal 0.0 hiking_routes_preference assign is_ldhr and any_hiking_route not equal 0.0 hiking_routes_preference
assign nodeaccessgranted any_hiking_route assign nodeaccessgranted any_hiking_route
# ismuddy addresses potentially bad surface conditions during wet weather ( mud, slickiness of grass) # ismuddy addresses potentially bad surface conditions during wet weather ( mud, slickiness of grass)
assign ismuddy and or isunpaved surface= assign ismuddy and or isunpaved surface=
and iswet and iswet
not or surface=gravel surface=pebblestone not or surface=gravel surface=pebblestone
assign issidewalk sidewalk=left|right|both|yes assign issidewalk sidewalk=left|right|both|yes
assign istrack highway=track|road|path|footway assign istrack highway=track|road|path|footway
assign ismainroad highway=motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified assign ismainroad highway=motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified
#assign turncost switch or shortest_way is_ldhr 0 turncost_value #v1.5 #assign turncost switch or shortest_way is_ldhr 0 turncost_value #v1.5
assign turncost 0 #v1.8.3 assign turncost 0 #v1.8.3
assign initialcost assign initialcost
switch route=ferry 10000 switch route=ferry 10000
switch or shortest_way is_ldhr 0 initialcost_value switch or shortest_way is_ldhr 0 initialcost_value
assign defaultaccess switch access= not motorroad=yes switch or access=private access=no 0 1 assign defaultaccess switch access= not motorroad=yes switch or access=private access=no 0 1
@ -151,28 +151,28 @@ assign bikeaccess
1 1
not or bicycle=private or bicycle=no bicycle=dismount not or bicycle=private or bicycle=no bicycle=dismount
assign footaccess or any_hiking_route assign footaccess or any_hiking_route
or issidewalk or issidewalk
or and bikeaccess not foot=no or and bikeaccess not foot=no
or bicycle=dismount or bicycle=dismount
switch foot= defaultaccess not foot=private|no switch foot= defaultaccess not foot=private|no
assign accesspenalty switch footaccess 0 switch bikeaccess 4 100000 assign accesspenalty switch footaccess 0 switch bikeaccess 4 100000
assign badoneway = 0 assign badoneway = 0
assign onewaypenalty = 0 assign onewaypenalty = 0
#SAC is estimated path difficulty, #SAC is estimated path difficulty,
#integrating both MTB and SAC scales with estimated MTB/SAC difficulty matching #integrating both MTB and SAC scales with estimated MTB/SAC difficulty matching
#see http://wiki.openstreetmap.org/wiki/Key:mtb:scale #see http://wiki.openstreetmap.org/wiki/Key:mtb:scale
# http://wiki.openstreetmap.org/wiki/Key:sac_scale # http://wiki.openstreetmap.org/wiki/Key:sac_scale
assign SAC assign SAC
if sac_scale= then ( if sac_scale= then (
if mtb:scale= then 0 if mtb:scale= then 0
else if mtb:scale=6|5 then 5 else if mtb:scale=6|5 then 5
else if mtb:scale=4 then 4 else if mtb:scale=4 then 4
else if mtb:scale=3 then 3 else if mtb:scale=3 then 3
@ -181,7 +181,7 @@ assign SAC
else 0 else 0
) )
else else
if sac_scale=difficult_alpine_hiking then 6 if sac_scale=difficult_alpine_hiking then 6
else if sac_scale=demanding_alpine_hiking then 5 else if sac_scale=demanding_alpine_hiking then 5
else if sac_scale=alpine_hiking then 4 else if sac_scale=alpine_hiking then 4
@ -189,29 +189,29 @@ assign SAC
else if sac_scale=mountain_hiking then 2 else if sac_scale=mountain_hiking then 2
else if sac_scale=hiking|T1-hiking|yes then 1 else if sac_scale=hiking|T1-hiking|yes then 1
else 0 else 0
assign SAC_scale_access # if SAC_scale_limit < SAC then true else false assign SAC_scale_access # if SAC_scale_limit < SAC then true else false
if sac_scale= then true else equal ( max SAC_scale_limit SAC ) SAC_scale_limit if sac_scale= then true else equal ( max SAC_scale_limit SAC ) SAC_scale_limit
assign SAC_scale_penalty assign SAC_scale_penalty
if not SAC_scale_access then SAC_access_penalty # not allowed SAC scale if not SAC_scale_access then SAC_access_penalty # not allowed SAC scale
else if equal SAC SAC_scale_preferred then 0.0 else if equal SAC SAC_scale_preferred then 0.0
else if equal ( add SAC 1 ) SAC_scale_preferred then SAC_K1 else if equal ( add SAC 1 ) SAC_scale_preferred then SAC_K1
else if equal ( add SAC 2 ) SAC_scale_preferred then SAC_K1_2 else if equal ( add SAC 2 ) SAC_scale_preferred then SAC_K1_2
else if equal ( add SAC 3 ) SAC_scale_preferred then SAC_K1_3 else if equal ( add SAC 3 ) SAC_scale_preferred then SAC_K1_3
else if equal ( add SAC 4 ) SAC_scale_preferred then SAC_K1_4 else if equal ( add SAC 4 ) SAC_scale_preferred then SAC_K1_4
else if equal ( add SAC 5 ) SAC_scale_preferred then SAC_K1_5 else if equal ( add SAC 5 ) SAC_scale_preferred then SAC_K1_5
else if equal ( add SAC 6 ) SAC_scale_preferred then SAC_K1_6 else if equal ( add SAC 6 ) SAC_scale_preferred then SAC_K1_6
else if equal ( add SAC_scale_preferred 1 ) SAC then SAC_K2 else if equal ( add SAC_scale_preferred 1 ) SAC then SAC_K2
else if equal ( add SAC_scale_preferred 2 ) SAC then SAC_K2_2 else if equal ( add SAC_scale_preferred 2 ) SAC then SAC_K2_2
else if equal ( add SAC_scale_preferred 3 ) SAC then SAC_K2_3 else if equal ( add SAC_scale_preferred 3 ) SAC then SAC_K2_3
else if equal ( add SAC_scale_preferred 4 ) SAC then SAC_K2_4 else if equal ( add SAC_scale_preferred 4 ) SAC then SAC_K2_4
else if equal ( add SAC_scale_preferred 5 ) SAC then SAC_K2_5 else if equal ( add SAC_scale_preferred 5 ) SAC then SAC_K2_5
else if equal ( add SAC_scale_preferred 6 ) SAC then SAC_K2_6 else if equal ( add SAC_scale_preferred 6 ) SAC then SAC_K2_6
else 1.0 else 1.0
assign tracktype_penalty ( assign tracktype_penalty (
if not istrack then 0.0 else if tracktype= then 0.0 if not istrack then 0.0 else if tracktype= then 0.0
else if tracktype=grade1 then 0.1 else if tracktype=grade2 then 0.05 else if tracktype=grade1 then 0.1 else if tracktype=grade2 then 0.05
@ -240,91 +240,91 @@ assign wet_penalty (
) )
assign Offroad_factor_for_road assign Offroad_factor_for_road
if ( equal Offroad_factor 0.0 ) then 0.0 else if ( equal Offroad_factor 0.0 ) then 0.0 else
( (
if ismainroad then Offroad_factor if ismainroad then Offroad_factor
else if ( or ispaved highway=residential|living_street|service|pedestrian ) then ( multiply 0.33 Offroad_factor ) else if ( or ispaved highway=residential|living_street|service|pedestrian ) then ( multiply 0.33 Offroad_factor )
else if ( not isunpaved ) then ( multiply -0.33 Offroad_factor ) else if ( not isunpaved ) then ( multiply -0.33 Offroad_factor )
else ( multiply -1 multiply Offroad_factor ( add 1.0 ( multiply 0.33 SAC_scale_penalty ) ) ) else ( multiply -1 multiply Offroad_factor ( add 1.0 ( multiply 0.33 SAC_scale_penalty ) ) )
) )
assign nonpath_penalty = assign nonpath_penalty =
if ( equal path_preference 0.0 ) then 0.0 # nonpath_penalty inactive if ( equal path_preference 0.0 ) then 0.0 # nonpath_penalty inactive
else if not istrack then path_preference #istrack = highway=track/path/road/footway else if not istrack then path_preference #istrack = highway=track/path/road/footway
else if ispaved then ( multiply path_preference 0.5 ) else if ispaved then ( multiply path_preference 0.5 )
else if or ( and not isunpaved not highway=path ) else if or ( and not isunpaved not highway=path )
( tracktype=grade1|grade2 ) then ( multiply path_preference 0.25 ) ( tracktype=grade1|grade2 ) then ( multiply path_preference 0.25 )
else if not ( and isunpaved else if not ( and isunpaved
and highway=path and highway=path
and tracktype=grade1|grade2 and tracktype=grade1|grade2
not surface=gravel|cobblestone|pebblestone ) not surface=gravel|cobblestone|pebblestone )
then ( multiply path_preference 0.125 ) then ( multiply path_preference 0.125 )
else 0.0 else 0.0
assign rawcostfactor # can be <1.0, is treated later assign rawcostfactor # can be <1.0, is treated later
if shortest_way then ( add 1 accesspenalty ) else if shortest_way then ( add 1 accesspenalty ) else
add nonpath_penalty add nonpath_penalty
add accesspenalty add accesspenalty
( (
if ( and highway= not route=ferry ) then 100000 if ( and highway= not route=ferry ) then 100000
else if highway=steps then ( switch allow_steps ( switch consider_elevation 1.0 3.0 ) 100000 ) else if highway=steps then ( switch allow_steps ( switch consider_elevation 1.0 3.0 ) 100000 )
else if route=ferry then ( if allow_ferries then 2.34 else 100000 ) else if route=ferry then ( if allow_ferries then 2.34 else 100000 )
# iswet=1 in global context section means wet weather, increases penalty for eventually inconvenient ways # iswet=1 in global context section means wet weather, increases penalty for eventually inconvenient ways
# ismuddy boolean relates in wet weather to unpaved or unclassified surface, that can have mud or get slicky in wet weather. # ismuddy boolean relates in wet weather to unpaved or unclassified surface, that can have mud or get slicky in wet weather.
else if highway=pedestrian then ( switch ismuddy 1.3 1.0 ) else if highway=pedestrian then ( switch ismuddy 1.3 1.0 )
else if highway=bridleway then ( switch ismuddy 2.5 switch iswet 1.4 1.2 ) else if highway=bridleway then ( switch ismuddy 2.5 switch iswet 1.4 1.2 )
else if highway=cycleway then ( switch ismuddy 1.4 switch iswet 1.0 1.1 ) else if highway=cycleway then ( switch ismuddy 1.4 switch iswet 1.0 1.1 )
else if highway=residential|living_street else if highway=residential|living_street
then ( switch ismuddy 1.5 switch iswet 1.0 1.1 ) then ( switch ismuddy 1.5 switch iswet 1.0 1.1 )
else if highway=service then ( switch ismuddy 1.5 switch iswet 1.1 1.2 ) else if highway=service then ( switch ismuddy 1.5 switch iswet 1.1 1.2 )
else if istrack then else if istrack then
( add 1.0 add tracktype_penalty add surface_penalty add wet_penalty SAC_scale_penalty ) ( add 1.0 add tracktype_penalty add surface_penalty add wet_penalty SAC_scale_penalty )
else if highway=motorway|motorway_link then 100000 else if highway=motorway|motorway_link then 100000
else if highway=proposed|abandoned|construction then ( switch ismuddy 10 switch iswet 6 4 ) else if highway=proposed|abandoned|construction then ( switch ismuddy 10 switch iswet 6 4 )
else if highway=trunk|trunk_link then else if highway=trunk|trunk_link then
( switch iswet ( switch issidewalk 1.5 10 ) ( switch issidewalk 2.0 20 ) ) ( switch iswet ( switch issidewalk 1.5 10 ) ( switch issidewalk 2.0 20 ) )
else if highway=primary|primary_link then else if highway=primary|primary_link then
( switch iswet ( switch issidewalk 1.5 5 ) ( switch issidewalk 2.0 10 ) ) ( switch iswet ( switch issidewalk 1.5 5 ) ( switch issidewalk 2.0 10 ) )
else if highway=secondary|secondary_link then else if highway=secondary|secondary_link then
( switch iswet ( switch issidewalk 1.2 2.5 ) ( switch issidewalk 1.5 4.0 ) ) ( switch iswet ( switch issidewalk 1.2 2.5 ) ( switch issidewalk 1.5 4.0 ) )
else if highway=tertiary|tertiary_link then else if highway=tertiary|tertiary_link then
( if iswet then ( switch issidewalk 1.1 1.5 ) else ( switch issidewalk 1.2 2.5 ) ) ( if iswet then ( switch issidewalk 1.1 1.5 ) else ( switch issidewalk 1.2 2.5 ) )
else if highway=unclassified then else if highway=unclassified then
( if ismuddy then 3.0 else if iswet then ( switch issidewalk 1.0 1.3 ) else ( switch issidewalk 1.1 1.5 ) ) ( if ismuddy then 3.0 else if iswet then ( switch issidewalk 1.0 1.3 ) else ( switch issidewalk 1.1 1.5 ) )
else add cost_of_unknown switch ismuddy 0.5 0.0 else add cost_of_unknown switch ismuddy 0.5 0.0
) )
assign rawcostfactor2 assign rawcostfactor2
if equal hiking_routes_preference 0.0 then rawcostfactor # Not preferring hiking routes if equal hiking_routes_preference 0.0 then rawcostfactor # Not preferring hiking routes
else if is_ldhr then rawcostfactor # is hiking route else if is_ldhr then rawcostfactor # is hiking route
else multiply rawcostfactor nonhiking_route_penalty else multiply rawcostfactor nonhiking_route_penalty
assign costfactor if shortest_way then ( add 1 accesspenalty ) assign costfactor if shortest_way then ( add 1 accesspenalty )
else max 1.0 add rawcostfactor2 Offroad_factor_for_road else max 1.0 add rawcostfactor2 Offroad_factor_for_road
assign downhillcostfactor assign downhillcostfactor
if shortest_way then ( add 1 accesspenalty ) else if shortest_way then ( add 1 accesspenalty ) else
max 1.0 max 1.0
add rawcostfactor2 add rawcostfactor2
add Offroad_factor_for_road add Offroad_factor_for_road
if ismuddy then 0.5 # slicky if ismuddy then 0.5 # slicky
else if surface=grass then -0.2 # soft impact else if surface=grass then -0.2 # soft impact
else if ispaved then 0.2 # hard impact else if ispaved then 0.2 # hard impact
else if surface=gravel|pebblestone|fine_gravel then 0.3 # slides else if surface=gravel|pebblestone|fine_gravel then 0.3 # slides
else 0.0 else 0.0
assign uphillcostfactor assign uphillcostfactor
if shortest_way then ( add 1 accesspenalty ) else if shortest_way then ( add 1 accesspenalty ) else
max 1.0 max 1.0
add rawcostfactor2 add rawcostfactor2
add Offroad_factor_for_road add Offroad_factor_for_road
if ismuddy then 0.3 # slicky if ismuddy then 0.3 # slicky
@ -332,9 +332,9 @@ assign uphillcostfactor
else if ispaved then -0.1 # sure foot else if ispaved then -0.1 # sure foot
else if surface=gravel|pebblestone|fine_gravel then 0.2 # slides else if surface=gravel|pebblestone|fine_gravel then 0.2 # slides
else 0.0 else 0.0
# way priorities used for voice hint generation # way priorities used for voice hint generation
assign priorityclassifier = assign priorityclassifier =
if ( highway=motorway ) then 30 if ( highway=motorway ) then 30
@ -350,12 +350,12 @@ assign priorityclassifier =
else if ( highway=unclassified ) then 20 else if ( highway=unclassified ) then 20
else if ( highway=residential|living_street ) then 18 else if ( highway=residential|living_street ) then 18
else if ( highway=steps|pedestrian ) then 16 else if ( highway=steps|pedestrian ) then 16
else if ( highway=service|cycleway ) then if ( or tracktype=grade1 ispaved ) then 14 else 12 else if ( highway=service|cycleway ) then if ( or tracktype=grade1 ispaved ) then 14 else 12
else if ( highway=track|road|bridleway ) then if ( or tracktype=grade1 ispaved ) then 10 else 8 else if ( highway=track|road|bridleway ) then if ( or tracktype=grade1 ispaved ) then 10 else 8
else if ( highway=path|footway ) then ( if ( or tracktype=grade1 ispaved ) then 6 else if ( highway=path|footway ) then ( if ( or tracktype=grade1 ispaved ) then 6
else if tracktype=grade2 then 4 else if tracktype=grade2 then 4
else if not surface=grass|gravel then 3 else if not surface=grass|gravel then 3
else 2 ) else 2 )
else 0 else 0
# some more classifying bits used for voice hint generation... # some more classifying bits used for voice hint generation...
@ -375,8 +375,8 @@ assign classifiermask add isbadoneway
add multiply isgoodoneway 2 add multiply isgoodoneway 2
add multiply isroundabout 4 add multiply isroundabout 4
add multiply islinktype 8 add multiply islinktype 8
multiply isgoodforcars 16 multiply isgoodforcars 16
---context:node # following code refers to node tags ---context:node # following code refers to node tags
@ -436,9 +436,9 @@ assign initialcost switch or bikeaccess footaccess 0 1000000
# - 0.33 * MTB_factor for not paved/not unpaved roads, # - 0.33 * MTB_factor for not paved/not unpaved roads,
# - MTB_factor * ( 1 + 0.33 * smoothnesspenalty ) for unpaved roads. - at MTB_factor 3.0 smootheness is ignored # - MTB_factor * ( 1 + 0.33 * smoothnesspenalty ) for unpaved roads. - at MTB_factor 3.0 smootheness is ignored
# #
# Default is 0.0 = no effect. # Default is 0.0 = no effect.
# Recommended -0.5 - +1.0 # Recommended -0.5 - +1.0
# Reasonable -2.0 .. +3.0, # Reasonable -2.0 .. +3.0,
# #
# Final costfactor is kept >= 1 for final costfacto values. # Final costfactor is kept >= 1 for final costfacto values.
############################################################################################# #############################################################################################
@ -453,13 +453,13 @@ assign initialcost switch or bikeaccess footaccess 0 1000000
# #
# 2014-10-10 v1.1 - changed hiking route preference logic # 2014-10-10 v1.1 - changed hiking route preference logic
# 1.2 - fixed preference counting bug # 1.2 - fixed preference counting bug
# 2014-10-11 1.3 - adding foot route to hiking routes, # 2014-10-11 1.3 - adding foot route to hiking routes,
# fixed ferry cost to respect initial cost triggerring. # fixed ferry cost to respect initial cost triggerring.
# added bikeaccess, added shortest way mode, code cleanup # added bikeaccess, added shortest way mode, code cleanup
# 2014-10-12: v1.4 - involving turncosts and way/node initial costs as orientation/decision penalties, # 2014-10-12: v1.4 - involving turncosts and way/node initial costs as orientation/decision penalties,
# but turning them off for sticking to hiking routes as extra preference, # but turning them off for sticking to hiking routes as extra preference,
# tweaking cost preferences # tweaking cost preferences
# 2014-10-13 v1.5 # 2014-10-13 v1.5
# redesigned route preference policy - turncost turned off even for nonsticky but preferred hiking routes # redesigned route preference policy - turncost turned off even for nonsticky but preferred hiking routes
# cost tweaking. # cost tweaking.
# removed uniform cost=1 for sticky hiking routes, to distinguish quality # removed uniform cost=1 for sticky hiking routes, to distinguish quality
@ -467,14 +467,14 @@ assign initialcost switch or bikeaccess footaccess 0 1000000
# used not round costs to often trigger initial cost calculation # used not round costs to often trigger initial cost calculation
#v1.51 - bugfix of redundant routing penalty #v1.51 - bugfix of redundant routing penalty
#v 1.6 - initialcost penalty only for sticking routes, decreased way penalties for preferring routes #v 1.6 - initialcost penalty only for sticking routes, decreased way penalties for preferring routes
# 31/5/2015 v 1.7 ALFA + sac_scale + sac_scale_limit implemented # 31/5/2015 v 1.7 ALFA + sac_scale + sac_scale_limit implemented
# 10/6/2015 v1.7.1 ALFA * sac_scale improved # 10/6/2015 v1.7.1 ALFA * sac_scale improved
# + MTB scale integrated to SAC scale # + MTB scale integrated to SAC scale
# + sac_scale_preferred implemented, with progressive penalizing for SAC <> SAC preferred # + sac_scale_preferred implemented, with progressive penalizing for SAC <> SAC preferred
# 10/6/2015 v1.7.2 BETA ! Fixed general way access penalties # 10/6/2015 v1.7.2 BETA ! Fixed general way access penalties
# 15/6/2015 v1.7.3 BETA * SAC-MTB scale integration reevaluated, increased MTB scale penalty # 15/6/2015 v1.7.3 BETA * SAC-MTB scale integration reevaluated, increased MTB scale penalty
# * MTB scale penalty used as fallback if no SAC rating # * MTB scale penalty used as fallback if no SAC rating
# 16/6/2015 v1.7.4 ALFA * Optimized SAC logic # 16/6/2015 v1.7.4 ALFA * Optimized SAC logic
# 17/6/2015 v1.7.5 BETA + Track penalty system # 17/6/2015 v1.7.5 BETA + Track penalty system
# 20/6/2015 v1.7.6 RELEASE * Modified and simplified route preferencing # 20/6/2015 v1.7.6 RELEASE * Modified and simplified route preferencing
# 01/12/2015 v1.8.1 ALFA +ported MTB_factor from bicycle Trekking template, renamed for hiking context to Offroad_factor # 01/12/2015 v1.8.1 ALFA +ported MTB_factor from bicycle Trekking template, renamed for hiking context to Offroad_factor

View file

@ -16,7 +16,7 @@ assign uphillcutoff 0
assign validForBikes 1 assign validForBikes 1
assign validForCars 1 assign validForCars 1
assign turnInstructionMode = 1 # 0=none, 1=auto-choose, 2=locus-style, 3=osmand-style, 4=comment-style, 5=gpsies-style, 6=orux-style assign turnInstructionMode = 1 # %turnInstructionMode% | Mode for the generated turn instructions | [0=none, 1=auto-choose, 2=locus-style, 3=osmand-style, 4=comment-style, 5=gpsies-style, 6=orux-style, 7=locus-old-style]
---context:way # following code refers to way-tags ---context:way # following code refers to way-tags

View file

@ -7,7 +7,7 @@ assign downhillcutoff 1.5
assign uphillcost 0 assign uphillcost 0
assign uphillcutoff 1.5 assign uphillcutoff 1.5
assign turnInstructionMode = 1 # 0=none, 1=auto-choose, 2=locus-style, 3=osmand-style, 4=comment-style, 5=gpsies-style, 6=orux-style assign turnInstructionMode = 1 # %turnInstructionMode% | Mode for the generated turn instructions | [0=none, 1=auto-choose, 2=locus-style, 3=osmand-style, 4=comment-style, 5=gpsies-style, 6=orux-style, 7=locus-old-style]
assign validForFoot 1 assign validForFoot 1
---context:way # following code refers to way-tags ---context:way # following code refers to way-tags

View file

@ -35,7 +35,7 @@ assign C_r = 0.01 # %C_r% | Rolling resistance coefficient (dimensionle
assign bikerPower = 100 # %bikerPower% | Average power (in W) provided by the biker, for travel time computation | number assign bikerPower = 100 # %bikerPower% | Average power (in W) provided by the biker, for travel time computation | number
# Turn instructions settings # Turn instructions settings
assign turnInstructionMode = 1 # %turnInstructionMode% | Mode for the generated turn instructions | [0=none, 1=auto-choose, 2=locus-style, 3=osmand-style, 4=comment-style, 5=gpsies-style, 6=orux-style] assign turnInstructionMode = 1 # %turnInstructionMode% | Mode for the generated turn instructions | [0=none, 1=auto-choose, 2=locus-style, 3=osmand-style, 4=comment-style, 5=gpsies-style, 6=orux-style, 7=locus-old-style]
assign turnInstructionCatchingRange = 40 # %turnInstructionCatchingRange% | Within this distance (in m) several turning instructions are combined into one and the turning angles are better approximated to the general direction | number assign turnInstructionCatchingRange = 40 # %turnInstructionCatchingRange% | Within this distance (in m) several turning instructions are combined into one and the turning angles are better approximated to the general direction | number
assign turnInstructionRoundabouts = true # %turnInstructionRoundabouts% | Set to "false" to avoid generating special turning instructions for roundabouts | boolean assign turnInstructionRoundabouts = true # %turnInstructionRoundabouts% | Set to "false" to avoid generating special turning instructions for roundabouts | boolean

View file

@ -1,460 +1,460 @@
# #
# Profile for fast recumbent bikes, contributed by http://www.velomobilforum.de # Profile for fast recumbent bikes, contributed by http://www.velomobilforum.de
---context:global ---context:global
assign no_steps = false # %no_steps% | keine Stufen, das Liegerad soll nicht getragen werden müssen | boolean assign no_steps = false # %no_steps% | keine Stufen, das Liegerad soll nicht getragen werden müssen | boolean
assign no_wrong_oneway = false # %no_wrong oneway% | keine Einbahnstrasse in falsche Richtung, auch nicht schiebend | boolean assign no_wrong_oneway = false # %no_wrong oneway% | keine Einbahnstrasse in falsche Richtung, auch nicht schiebend | boolean
assign dismount_cost = 1000 # %dismount_cost% | Umweg in Meter der in Kauf genommen wird bevor eine Strecke genommen wird bei der man austeigen muss, ab 1 000 000 wird keine Schiebestrecke mehr genommen | number assign dismount_cost = 1000 # %dismount_cost% | Umweg in Meter der in Kauf genommen wird bevor eine Strecke genommen wird bei der man austeigen muss, ab 1 000 000 wird keine Schiebestrecke mehr genommen | number
assign avoid_main_roads = 5 # %avoid_main_roads% | große Straße vermeiden(0-10): 0 = nicht vermeiden, 1 = leicht vermeiden, 3 = Standard, 10 = stark vermeiden | number assign avoid_main_roads = 5 # %avoid_main_roads% | große Straße vermeiden(0-10): 0 = nicht vermeiden, 1 = leicht vermeiden, 3 = Standard, 10 = stark vermeiden | number
assign avoid_small_roads = 5 # %avoid_small_roads% | kleine Straße vermeiden(0-10): 0 = nicht vermeiden, 1 = leicht vermeiden, 5 = Standard, 10 = stark vermeiden | number assign avoid_small_roads = 5 # %avoid_small_roads% | kleine Straße vermeiden(0-10): 0 = nicht vermeiden, 1 = leicht vermeiden, 5 = Standard, 10 = stark vermeiden | number
assign avoid_cycleways = 3 # %avoid_cycleways% | Radwege vermeiden(0-10): 0 = nicht vermeiden, 1 = leicht vermeiden, 3 = Standard, 10 = stark vermeiden | number assign avoid_cycleways = 3 # %avoid_cycleways% | Radwege vermeiden(0-10): 0 = nicht vermeiden, 1 = leicht vermeiden, 3 = Standard, 10 = stark vermeiden | number
assign avoid_elevation = 5 # %avoid_elevation% | Hohenmeter vermeiden(0-10): 0 = nicht vermeiden, 1 = leicht vermeiden, 5 = Standard, 10 = stark vermeiden | number assign avoid_elevation = 5 # %avoid_elevation% | Hohenmeter vermeiden(0-10): 0 = nicht vermeiden, 1 = leicht vermeiden, 5 = Standard, 10 = stark vermeiden | number
assign avoid_bad_ways = 8 # %avoid_bad_ways% | Schlechte Wege vermeiden(0-10): 0 = nicht vermeiden, 1 = leicht vermeiden, 8 = Standard, 10 = stark vermeiden | number assign avoid_bad_ways = 8 # %avoid_bad_ways% | Schlechte Wege vermeiden(0-10): 0 = nicht vermeiden, 1 = leicht vermeiden, 8 = Standard, 10 = stark vermeiden | number
assign totalMass = 90 # %totalMass% | Gesamtmasse des Fahrzeugs (Fahrzeug, Fahrer, Gepäck...) in kg, für Fahrtzeitschätzung | number assign totalMass = 90 # %totalMass% | Gesamtmasse des Fahrzeugs (Fahrzeug, Fahrer, Gepäck...) in kg, für Fahrtzeitschätzung | number
assign maxSpeed = 60 # Maximale Geschwindigkeit ab der der Fahrer bremst in km/h assign maxSpeed = 60 # Maximale Geschwindigkeit ab der der Fahrer bremst in km/h
assign S_C_x = 0.23 # Effektive Stirnfläche in m² assign S_C_x = 0.23 # Effektive Stirnfläche in m²
assign C_r = 0.004 # Rollwiderstand assign C_r = 0.004 # Rollwiderstand
assign bikerPower = 125 # %bikerPower% | Dauerleistung in Watt, für Fahrtzeitschätzung| number assign bikerPower = 125 # %bikerPower% | Dauerleistung in Watt, für Fahrtzeitschätzung| number
assign ignore_bicycle_no = false # %ignore_bicycle_no% | für Regionen mit falschen bicyle=no tags können sie mit "true" ignoriert werden. Auch Shuttletransporte (bicycle=dismount + foot=no) werden geroutet | boolean assign ignore_bicycle_no = false # %ignore_bicycle_no% | für Regionen mit falschen bicyle=no tags können sie mit "true" ignoriert werden. Auch Shuttletransporte (bicycle=dismount + foot=no) werden geroutet | boolean
assign turnInstructionMode = 1 # %turnInstructionMode% | Modus für die Abbiegehinweise | [0=keine, 1=automatische Wahl, 2=locus-Style, 3=osmand-Style, 4=comment-Style, 5=gpsies-Style, 6=orux-Style] assign turnInstructionMode = 1 # %turnInstructionMode% | Modus für die Abbiegehinweise | [0=keine, 1=automatische Wahl, 2=locus-Style, 3=osmand-Style, 4=comment-Style, 5=gpsies-Style, 6=orux-Style, 7=locus-old-Style]
assign turnInstructionCatchingRange 20 # innerhalb dieser Strecke werden mehrere Abiegehinweise zu einem zusammengefasst und die Abiegewinkel werden besser an die generelle Richtung angenähert assign turnInstructionCatchingRange 20 # innerhalb dieser Strecke werden mehrere Abiegehinweise zu einem zusammengefasst und die Abiegewinkel werden besser an die generelle Richtung angenähert
assign turnInstructionRoundabouts true # mit "false" werden keine speziellen Abiegehinweise für den Kreisverkehr generiert assign turnInstructionRoundabouts true # mit "false" werden keine speziellen Abiegehinweise für den Kreisverkehr generiert
assign avoidmr2 multiply 0.04 multiply avoid_main_roads avoid_main_roads assign avoidmr2 multiply 0.04 multiply avoid_main_roads avoid_main_roads
assign avoidsr multiply 0.2 avoid_small_roads assign avoidsr multiply 0.2 avoid_small_roads
assign avoidbw multiply 0.125 avoid_bad_ways assign avoidbw multiply 0.125 avoid_bad_ways
assign avoid_ele multiply avoid_elevation 0.2 assign avoid_ele multiply avoid_elevation 0.2
assign downhillcost multiply avoid_ele 80 # Kosten für die Höhenmeter bergab assign downhillcost multiply avoid_ele 80 # Kosten für die Höhenmeter bergab
assign downhillcutoff 0.1 # Gefälle unter diesem Wert in Prozent werden nicht gewertet assign downhillcutoff 0.1 # Gefälle unter diesem Wert in Prozent werden nicht gewertet
assign uphillcost multiply avoid_ele 80 # Kosten für die Höhenmeter bergauf assign uphillcost multiply avoid_ele 80 # Kosten für die Höhenmeter bergauf
assign uphillcutoff 1 # Steigungen unter diesem Wert in Prozent werden nicht gewertet assign uphillcutoff 1 # Steigungen unter diesem Wert in Prozent werden nicht gewertet
assign validForBikes true # bei true werden die Außnahmen bei den Abbiegebeschränkungen für Fahrräder aktiviert assign validForBikes true # bei true werden die Außnahmen bei den Abbiegebeschränkungen für Fahrräder aktiviert
assign considerTurnRestrictions true # bei false werden die Abbiegebeschränkungen ignoriert assign considerTurnRestrictions true # bei false werden die Abbiegebeschränkungen ignoriert
assign pass1coefficient 2.5 # Berechnugskoeffizient für erste schnelle Berechnung assign pass1coefficient 2.5 # Berechnugskoeffizient für erste schnelle Berechnung
assign pass2coefficient 0 # Berechnugskoeffizient für zweite exakte Berechnung assign pass2coefficient 0 # Berechnugskoeffizient für zweite exakte Berechnung
# sinnvolle Werte für den ersten Koeffizienten: # sinnvolle Werte für den ersten Koeffizienten:
# 1 exakte Berechnung beim ersten Durchlauf # 1 exakte Berechnung beim ersten Durchlauf
# umso größer die Werte umso schneller und ungenauer die erste Berechnung # umso größer die Werte umso schneller und ungenauer die erste Berechnung
# sinnvolle Werte für den zweiten Koeffizienten: # sinnvolle Werte für den zweiten Koeffizienten:
# 0 exakte Berechnung mit Beschränkung des Suchgebiets über die Kosten der ersten Berechnung # 0 exakte Berechnung mit Beschränkung des Suchgebiets über die Kosten der ersten Berechnung
# -1 keine zweite Berechnung, nur sinnvoll bei 1 im ersten Durchlauf # -1 keine zweite Berechnung, nur sinnvoll bei 1 im ersten Durchlauf
# Um die ungenauen SRTM Höhendaten zu filtern werden für jeweils für Anstiege und Gefälle Puffer verwendet. Erst wenn diese überschritten werden die Segmente als Anstiege oder Gefälle gewertet. # Um die ungenauen SRTM Höhendaten zu filtern werden für jeweils für Anstiege und Gefälle Puffer verwendet. Erst wenn diese überschritten werden die Segmente als Anstiege oder Gefälle gewertet.
assign elevationpenaltybuffer 7 # Höhenpuffer (in Meter) ab dem die Höhenstrafen beginnen und das Segment als Anstieg und Gefälle gewertet wird assign elevationpenaltybuffer 7 # Höhenpuffer (in Meter) ab dem die Höhenstrafen beginnen und das Segment als Anstieg und Gefälle gewertet wird
assign elevationmaxbuffer 13 # Maximale Puffergröße (in Meter), alles darüberhinausgehende wird voll bestraft assign elevationmaxbuffer 13 # Maximale Puffergröße (in Meter), alles darüberhinausgehende wird voll bestraft
assign elevationbufferreduce 1 # im Bereich zwischen elevationpenaltybuffer und elevationmaxbuffer wird eine Höhenstrafe, die einer Steigung oder Gefälle dieses Wertes (in Prozent) entspricht, verhängt und diese Höhenmeter vom Puffer abgezogen. assign elevationbufferreduce 1 # im Bereich zwischen elevationpenaltybuffer und elevationmaxbuffer wird eine Höhenstrafe, die einer Steigung oder Gefälle dieses Wertes (in Prozent) entspricht, verhängt und diese Höhenmeter vom Puffer abgezogen.
---context:way ---context:way
# Parameter für die Wege # Parameter für die Wege
#zusätzliche Kosten in Meter für jeden Streckenabschnitt #zusätzliche Kosten in Meter für jeden Streckenabschnitt
assign any_cycleroute or route_bicycle_icn=yes or route_bicycle_ncn=yes or route_bicycle_rcn=yes route_bicycle_lcn=yes assign any_cycleroute or route_bicycle_icn=yes or route_bicycle_ncn=yes or route_bicycle_rcn=yes route_bicycle_lcn=yes
assign nodeaccessgranted or any_cycleroute lcn=yes assign nodeaccessgranted or any_cycleroute lcn=yes
assign cycleway assign cycleway
or highway=cycleway and highway=path|footway|pedestrian bicycle=designated|yes or highway=cycleway and highway=path|footway|pedestrian bicycle=designated|yes
assign footway assign footway
or highway=footway|pedestrian and highway=path foot=designated|yes or highway=footway|pedestrian and highway=path foot=designated|yes
assign turncost assign turncost
switch junction=roundabout 0 switch junction=roundabout 0
150 # Kosten die für eine 90 Grad Abbiegung berechnet werden. Für kleinere Winkel werden sie mit turncost*cos(Winkel) berechnet, bei Kreisverkehr keine weitere Kosten 150 # Kosten die für eine 90 Grad Abbiegung berechnet werden. Für kleinere Winkel werden sie mit turncost*cos(Winkel) berechnet, bei Kreisverkehr keine weitere Kosten
assign initialclassifier # hier wird bestimmten Wegen ein Wert zugeordnet und wenn er sich vom vorherigen unterscheidet die initalcost hinzugerechnet assign initialclassifier # hier wird bestimmten Wegen ein Wert zugeordnet und wenn er sich vom vorherigen unterscheidet die initalcost hinzugerechnet
switch route=ferry 2 switch route=ferry 2
switch highway=steps 3 switch highway=steps 3
switch cycleway 4 switch cycleway 4
switch footway 5 switch footway 5
1 1
assign initialcost assign initialcost
switch route=ferry 10000 # Kosten wenn eine Fähre verwendet wird switch route=ferry 10000 # Kosten wenn eine Fähre verwendet wird
switch highway=steps switch no_steps 1000000 dismount_cost # Kosten für Stufen switch highway=steps switch no_steps 1000000 dismount_cost # Kosten für Stufen
switch cycleway multiply 11.1111112 multiply avoid_cycleways avoid_cycleways # Kosten für Radwege switch cycleway multiply 11.1111112 multiply avoid_cycleways avoid_cycleways # Kosten für Radwege
switch footway dismount_cost # Kosten für Fußwege switch footway dismount_cost # Kosten für Fußwege
0 0
# Kosten ab hier als Meter für jeden tatsächlichen Meter # Kosten ab hier als Meter für jeden tatsächlichen Meter
assign oneway assign oneway
switch oneway= switch oneway=
junction=roundabout junction=roundabout
or oneway=yes or oneway=true oneway=1 or oneway=yes or oneway=true oneway=1
assign onewaypenalty assign onewaypenalty
switch switch reversedirection=yes oneway oneway=-1 switch switch reversedirection=yes oneway oneway=-1
switch or cycleway=opposite or cycleway=opposite_lane or cycleway=opposite_track oneway:bicycle=no 0 #zusätzliche Kosten für in Gegenrichtung für Radfahrer freigegebene Einbahnstraßen in Gegenrichtung switch or cycleway=opposite or cycleway=opposite_lane or cycleway=opposite_track oneway:bicycle=no 0 #zusätzliche Kosten für in Gegenrichtung für Radfahrer freigegebene Einbahnstraßen in Gegenrichtung
switch no_wrong_oneway 10000 switch no_wrong_oneway 10000
switch or highway=primary highway=primary_link 50 #zusätzliche Kosten für Bundesstraßen Einbahnstraßen in Gegenrichtung switch or highway=primary highway=primary_link 50 #zusätzliche Kosten für Bundesstraßen Einbahnstraßen in Gegenrichtung
switch or highway=secondary highway=secondary_link 30 #zusätzliche Kosten für Landstraßen Einbahnstraßen in Gegenrichtung switch or highway=secondary highway=secondary_link 30 #zusätzliche Kosten für Landstraßen Einbahnstraßen in Gegenrichtung
switch or highway=tertiary highway=tertiary_link 25 #zusätzliche Kosten für Kreisstraßen Einbahnstraßen in Gegenrichtung switch or highway=tertiary highway=tertiary_link 25 #zusätzliche Kosten für Kreisstraßen Einbahnstraßen in Gegenrichtung
20.0 #zusätzliche Kosten für sonstige Einbahnstraßen in Gegenrichtung 20.0 #zusätzliche Kosten für sonstige Einbahnstraßen in Gegenrichtung
0.0 0.0
assign defaultaccess assign defaultaccess
switch access= switch access=
not motorroad=yes not motorroad=yes
switch or access=private access=no switch or access=private access=no
0 0
1 1
assign bikeaccess assign bikeaccess
or any_cycleroute or any_cycleroute
switch bicycle= switch bicycle=
switch vehicle= switch vehicle=
defaultaccess defaultaccess
switch or vehicle=private vehicle=no switch or vehicle=private vehicle=no
0 0
1 1
not or bicycle=private or and not ignore_bicycle_no bicycle=no bicycle=dismount not or bicycle=private or and not ignore_bicycle_no bicycle=no bicycle=dismount
assign footaccess assign footaccess
or bikeaccess or bikeaccess
or and bicycle=dismount ignore_bicycle_no or and bicycle=dismount ignore_bicycle_no
switch foot= switch foot=
defaultaccess defaultaccess
not or foot=private foot=no not or foot=private foot=no
assign accesspenalty assign accesspenalty
switch bikeaccess switch bikeaccess
0 0
switch footaccess switch footaccess
10 #Zusatzkosten fürs Schieben 10 #Zusatzkosten fürs Schieben
10000 #Zusatzkosten für gesperrte oder private Wege 10000 #Zusatzkosten für gesperrte oder private Wege
assign maxspeed_forward assign maxspeed_forward
switch maxspeed:forward=50 50 switch maxspeed:forward=50 50
switch maxspeed:forward=30 30 switch maxspeed:forward=30 30
switch maxspeed:forward=10 10 switch maxspeed:forward=10 10
switch maxspeed:forward=20 20 switch maxspeed:forward=20 20
switch maxspeed:forward=40 40 switch maxspeed:forward=40 40
switch maxspeed:forward=60 60 switch maxspeed:forward=60 60
switch maxspeed:forward=70 70 switch maxspeed:forward=70 70
switch maxspeed:forward=80 80 switch maxspeed:forward=80 80
switch maxspeed:forward=90 90 switch maxspeed:forward=90 90
switch maxspeed:forward=100 100 switch maxspeed:forward=100 100
switch maxspeed:forward=110 110 switch maxspeed:forward=110 110
switch maxspeed:forward=120 120 switch maxspeed:forward=120 120
switch maxspeed:forward=130 130 switch maxspeed:forward=130 130
switch maxspeed:forward=urban 50 switch maxspeed:forward=urban 50
switch maxspeed:forward=rural 100 switch maxspeed:forward=rural 100
0 0
assign maxspeed_backward assign maxspeed_backward
switch maxspeed:backward=50 50 switch maxspeed:backward=50 50
switch maxspeed:backward=30 30 switch maxspeed:backward=30 30
switch maxspeed:backward=10 10 switch maxspeed:backward=10 10
switch maxspeed:backward=20 20 switch maxspeed:backward=20 20
switch maxspeed:backward=40 40 switch maxspeed:backward=40 40
switch maxspeed:backward=60 60 switch maxspeed:backward=60 60
switch maxspeed:backward=70 70 switch maxspeed:backward=70 70
switch maxspeed:backward=80 80 switch maxspeed:backward=80 80
switch maxspeed:backward=90 90 switch maxspeed:backward=90 90
switch maxspeed:backward=100 100 switch maxspeed:backward=100 100
switch maxspeed:backward=110 110 switch maxspeed:backward=110 110
switch maxspeed:backward=120 120 switch maxspeed:backward=120 120
switch maxspeed:backward=130 130 switch maxspeed:backward=130 130
switch maxspeed:backward=urban 50 switch maxspeed:backward=urban 50
switch maxspeed:backward=rural 100 switch maxspeed:backward=rural 100
0 0
assign maxspeed assign maxspeed
switch and reversedirection=yes maxspeed_backward maxspeed_backward switch and reversedirection=yes maxspeed_backward maxspeed_backward
switch and not reversedirection=yes maxspeed_forward maxspeed_forward switch and not reversedirection=yes maxspeed_forward maxspeed_forward
switch maxspeed=50 50 switch maxspeed=50 50
switch maxspeed=30 30 switch maxspeed=30 30
switch maxspeed=10 10 switch maxspeed=10 10
switch maxspeed=20 20 switch maxspeed=20 20
switch maxspeed=40 40 switch maxspeed=40 40
switch maxspeed=60 60 switch maxspeed=60 60
switch maxspeed=70 70 switch maxspeed=70 70
switch maxspeed=80 80 switch maxspeed=80 80
switch maxspeed=90 90 switch maxspeed=90 90
switch maxspeed=100 100 switch maxspeed=100 100
switch maxspeed=110 110 switch maxspeed=110 110
switch maxspeed=120 120 switch maxspeed=120 120
switch maxspeed=130 130 switch maxspeed=130 130
switch maxspeed=urban 50 switch maxspeed=urban 50
switch maxspeed=rural 100 switch maxspeed=rural 100
999 999
assign downspeedpenalty assign downspeedpenalty
switch equal maxspeed 10 4 # Zusatzkosten für Geschwindigkeitsbegrenzung 10 km/h bei Gefälle switch equal maxspeed 10 4 # Zusatzkosten für Geschwindigkeitsbegrenzung 10 km/h bei Gefälle
switch equal maxspeed 20 1.5 # Zusatzkosten für Geschwindigkeitsbegrenzung 20 km/h bei Gefälle switch equal maxspeed 20 1.5 # Zusatzkosten für Geschwindigkeitsbegrenzung 20 km/h bei Gefälle
switch equal maxspeed 30 0.7 # Zusatzkosten für Geschwindigkeitsbegrenzung 30 km/h bei Gefälle switch equal maxspeed 30 0.7 # Zusatzkosten für Geschwindigkeitsbegrenzung 30 km/h bei Gefälle
switch equal maxspeed 40 0.4 # Zusatzkosten für Geschwindigkeitsbegrenzung 40 km/h bei Gefälle switch equal maxspeed 40 0.4 # Zusatzkosten für Geschwindigkeitsbegrenzung 40 km/h bei Gefälle
switch equal maxspeed 50 0.2 # Zusatzkosten für Geschwindigkeitsbegrenzung 50 km/h bei Gefälle switch equal maxspeed 50 0.2 # Zusatzkosten für Geschwindigkeitsbegrenzung 50 km/h bei Gefälle
0 0
assign flatspeedpenalty assign flatspeedpenalty
switch equal maxspeed 10 2 # Zusatzkosten für Geschwindigkeitsbegrenzung 10 km/h in der Ebene switch equal maxspeed 10 2 # Zusatzkosten für Geschwindigkeitsbegrenzung 10 km/h in der Ebene
switch equal maxspeed 20 0.5 # Zusatzkosten für Geschwindigkeitsbegrenzung 20 km/h in der Ebene switch equal maxspeed 20 0.5 # Zusatzkosten für Geschwindigkeitsbegrenzung 20 km/h in der Ebene
switch equal maxspeed 30 0.15 # Zusatzkosten für Geschwindigkeitsbegrenzung 30 km/h in der Ebene switch equal maxspeed 30 0.15 # Zusatzkosten für Geschwindigkeitsbegrenzung 30 km/h in der Ebene
switch equal maxspeed 40 0.12 # Zusatzkosten für Geschwindigkeitsbegrenzung 40 km/h in der Ebene switch equal maxspeed 40 0.12 # Zusatzkosten für Geschwindigkeitsbegrenzung 40 km/h in der Ebene
switch equal maxspeed 50 0.1 # Zusatzkosten für Geschwindigkeitsbegrenzung 50 km/h in der Ebene switch equal maxspeed 50 0.1 # Zusatzkosten für Geschwindigkeitsbegrenzung 50 km/h in der Ebene
0 0
assign upspeedpenalty assign upspeedpenalty
switch equal maxspeed 10 1.5 # Zusatzkosten für Geschwindigkeitsbegrenzung 10 km/h bei Anstiegen switch equal maxspeed 10 1.5 # Zusatzkosten für Geschwindigkeitsbegrenzung 10 km/h bei Anstiegen
switch equal maxspeed 20 0.4 # Zusatzkosten für Geschwindigkeitsbegrenzung 20 km/h bei Anstiegen switch equal maxspeed 20 0.4 # Zusatzkosten für Geschwindigkeitsbegrenzung 20 km/h bei Anstiegen
switch equal maxspeed 30 0.1 # Zusatzkosten für Geschwindigkeitsbegrenzung 30 km/h bei Anstiegen switch equal maxspeed 30 0.1 # Zusatzkosten für Geschwindigkeitsbegrenzung 30 km/h bei Anstiegen
0 0
assign surfacepenalty assign surfacepenalty
add switch embedded_rails=tram|yes|rail 10 # Zusatzkosten bei Schienen in der Fahrbahn add switch embedded_rails=tram|yes|rail 10 # Zusatzkosten bei Schienen in der Fahrbahn
0 0
multiply avoidbw multiply avoidbw
switch surface=asphalt|paved 0 #Zusatzkosten für Teer oder versiegelte Flächen switch surface=asphalt|paved 0 #Zusatzkosten für Teer oder versiegelte Flächen
switch concrete=plates 1 # Zusatzkosten für Betonplattenwege switch concrete=plates 1 # Zusatzkosten für Betonplattenwege
switch concrete=lanes 2 # Zusatzkosten für Betonspurplatten switch concrete=lanes 2 # Zusatzkosten für Betonspurplatten
switch surface=concrete|paving_stones|wood|metal 0.4 #Zusatzkosten für Beton, Pflastersteine, Holz oder Metall switch surface=concrete|paving_stones|wood|metal 0.4 #Zusatzkosten für Beton, Pflastersteine, Holz oder Metall
switch surface=cobblestone|fine_gravel|compacted|sett|grass_paver 4 #Zusatzkosten für Kopfsteinpflaster, Splitt, verdichtete Deckschicht, behauene Pflastersteine oder Rasengittersteine switch surface=cobblestone|fine_gravel|compacted|sett|grass_paver 4 #Zusatzkosten für Kopfsteinpflaster, Splitt, verdichtete Deckschicht, behauene Pflastersteine oder Rasengittersteine
switch surface=gravel|sand|pebblestone 10 #Zusatzkosten für Schotter, Sand oder Kies switch surface=gravel|sand|pebblestone 10 #Zusatzkosten für Schotter, Sand oder Kies
switch surface=ground|grass|unpaved|dirt|earth|mud|clay 50 #Zusatzkosten für naturbelassene Wege, Grasswege, unbefestigte Wege, Schmutzwege, erdige Wege, schlammige Wege oder Lehmwege switch surface=ground|grass|unpaved|dirt|earth|mud|clay 50 #Zusatzkosten für naturbelassene Wege, Grasswege, unbefestigte Wege, Schmutzwege, erdige Wege, schlammige Wege oder Lehmwege
0 0
assign smoothnesspenalty assign smoothnesspenalty
multiply avoidbw multiply avoidbw
switch smoothness=excellent|good|very_good 0 #Zusatzkosten für excellente, gute, oder sehr gute Oberflächen switch smoothness=excellent|good|very_good 0 #Zusatzkosten für excellente, gute, oder sehr gute Oberflächen
switch smoothness=intermediate|medium 0.7 #Zusatzkosten für mittelmäßige Oberflächen switch smoothness=intermediate|medium 0.7 #Zusatzkosten für mittelmäßige Oberflächen
switch smoothness=rough|poor 2 #Zusatzkosten für raue oder schlechte Oberflächen switch smoothness=rough|poor 2 #Zusatzkosten für raue oder schlechte Oberflächen
switch smoothness=robust_wheels|bad 10 #Zusatzkosten für Oberflächen die robuste Reifen benötigen oder schlechte Oberflächen switch smoothness=robust_wheels|bad 10 #Zusatzkosten für Oberflächen die robuste Reifen benötigen oder schlechte Oberflächen
switch smoothness=high_clearance|off_road_wheels|very_bad|horrible|very_horrible|impassable 100 #Zusatzkosten für Oberflächen die eine erhöhte Bodenfreiheit oder Geländebereifung benötigen, schrecklich, sehr schrecklich oder unpasierbar sind switch smoothness=high_clearance|off_road_wheels|very_bad|horrible|very_horrible|impassable 100 #Zusatzkosten für Oberflächen die eine erhöhte Bodenfreiheit oder Geländebereifung benötigen, schrecklich, sehr schrecklich oder unpasierbar sind
0 0
assign costfactor assign costfactor
# dieser Abschnitt ist für die Kosten in der Ebene # dieser Abschnitt ist für die Kosten in der Ebene
switch and highway= not route=ferry 10000 # Kosten für alles ohne higway tag außer Fähren switch and highway= not route=ferry 10000 # Kosten für alles ohne higway tag außer Fähren
switch or highway=proposed highway=abandoned 10000 # Kosten für geplante oder Wege im Bau switch or highway=proposed highway=abandoned 10000 # Kosten für geplante oder Wege im Bau
min 9999 min 9999
max 1 max 1
add onewaypenalty add onewaypenalty
add accesspenalty add accesspenalty
add max surfacepenalty smoothnesspenalty add max surfacepenalty smoothnesspenalty
add flatspeedpenalty add flatspeedpenalty
max 1 max 1
switch highway=motorway|motorway_link 10000 # Kosten für Autobahnen switch highway=motorway|motorway_link 10000 # Kosten für Autobahnen
switch route=ferry 10.67 # Kosten für Fähren switch route=ferry 10.67 # Kosten für Fähren
switch highway=trunk|trunk_link add 1 multiply avoidmr2 4 # Kosten für eine autobahnänliche Straße switch highway=trunk|trunk_link add 1 multiply avoidmr2 4 # Kosten für eine autobahnänliche Straße
switch highway=primary|primary_link add 0.7 multiply avoidmr2 1.3 # Kosten für Bundesstraßen switch highway=primary|primary_link add 0.7 multiply avoidmr2 1.3 # Kosten für Bundesstraßen
switch highway=secondary|secondary_link 1 # Kosten für Landstraßen switch highway=secondary|secondary_link 1 # Kosten für Landstraßen
switch highway=tertiary|tertiary_link add 0.7 multiply avoidsr 0.3 # Kosten für Kreisstraßen switch highway=tertiary|tertiary_link add 0.7 multiply avoidsr 0.3 # Kosten für Kreisstraßen
switch highway=unclassified add 0.7 multiply avoidsr 0.3 # Kosten für Verbindungsstraßen switch highway=unclassified add 0.7 multiply avoidsr 0.3 # Kosten für Verbindungsstraßen
switch highway=residential|service add 0.7 multiply avoidsr 0.5 # Kosten für Wohn- und Zufahrtsstraßen switch highway=residential|service add 0.7 multiply avoidsr 0.5 # Kosten für Wohn- und Zufahrtsstraßen
switch highway=track switch highway=track
switch tracktype=grade1 add 0.7 multiply avoidsr 0.5 # Kosten für geteerte, betonierte oder gepflasterte Feldwege switch tracktype=grade1 add 0.7 multiply avoidsr 0.5 # Kosten für geteerte, betonierte oder gepflasterte Feldwege
switch tracktype=grade2 multiply avoidbw add 1 multiply avoidsr 6 # Kosten für geschotterte Feldwege switch tracktype=grade2 multiply avoidbw add 1 multiply avoidsr 6 # Kosten für geschotterte Feldwege
switch tracktype=grade3 multiply avoidbw 40 # Kosten für Feldwege mit weichem Untergrund switch tracktype=grade3 multiply avoidbw 40 # Kosten für Feldwege mit weichem Untergrund
switch tracktype=grade4 multiply avoidbw 50 # Kosten für unbefestigte Feldwege switch tracktype=grade4 multiply avoidbw 50 # Kosten für unbefestigte Feldwege
switch tracktype=grade5 multiply avoidbw 50 # Kosten für kaum erkennbare Feldwege switch tracktype=grade5 multiply avoidbw 50 # Kosten für kaum erkennbare Feldwege
switch surface= multiply avoidbw 20 # Kosten für Feldwege ohne Oberflächenangabe switch surface= multiply avoidbw 20 # Kosten für Feldwege ohne Oberflächenangabe
add 0.7 multiply avoidsr 0.5 # Kosten für Feldwege mit Oberflächenangabe add 0.7 multiply avoidsr 0.5 # Kosten für Feldwege mit Oberflächenangabe
switch cycleway add 0.58 multiply avoid_cycleways 0.24 # Kosten für Fahrradwege switch cycleway add 0.58 multiply avoid_cycleways 0.24 # Kosten für Fahrradwege
switch highway=living_street add 2 multiply avoidsr 2 # Kosten für Spielstraßen switch highway=living_street add 2 multiply avoidsr 2 # Kosten für Spielstraßen
switch highway=road add 3 multiply avoidsr 4 # Kosten für noch nicht genauer beschriebene Straße switch highway=road add 3 multiply avoidsr 4 # Kosten für noch nicht genauer beschriebene Straße
switch footway 20 # Kosten für Fußwege switch footway 20 # Kosten für Fußwege
switch highway=steps 30 # Kosten für Stufen switch highway=steps 30 # Kosten für Stufen
switch highway=path switch highway=path
switch surface= multiply avoidbw 40 # Kosten für Pfade ohne Oberflächenangabe switch surface= multiply avoidbw 40 # Kosten für Pfade ohne Oberflächenangabe
multiply avoidsr add 0.58 multiply avoid_cycleways 0.24 # Kosten für Pfade mit Oberflächenangabe multiply avoidsr add 0.58 multiply avoid_cycleways 0.24 # Kosten für Pfade mit Oberflächenangabe
switch highway=bridleway multiply avoidbw 80 # Kosten für Reitwege switch highway=bridleway multiply avoidbw 80 # Kosten für Reitwege
20 # Kosten für sonstige Wege 20 # Kosten für sonstige Wege
assign uphillcostfactor assign uphillcostfactor
# dieser Abschnitt ist für die Kosten bei Anstiegen # dieser Abschnitt ist für die Kosten bei Anstiegen
# da er von der Struktur identisch wie der vorherige Abschnitt werde ich die Beschreibung hier nicht wiederholen # da er von der Struktur identisch wie der vorherige Abschnitt werde ich die Beschreibung hier nicht wiederholen
switch and highway= not route=ferry 10000 switch and highway= not route=ferry 10000
switch or highway=proposed highway=abandoned 10000 switch or highway=proposed highway=abandoned 10000
min 9999 min 9999
max 1 max 1
add onewaypenalty add onewaypenalty
add accesspenalty add accesspenalty
add max surfacepenalty smoothnesspenalty add max surfacepenalty smoothnesspenalty
add upspeedpenalty add upspeedpenalty
max 1 max 1
switch highway=motorway|motorway_link 10000 switch highway=motorway|motorway_link 10000
switch route=ferry 10.67 switch route=ferry 10.67
switch highway=trunk|trunk_link add 1 multiply avoidmr2 6 switch highway=trunk|trunk_link add 1 multiply avoidmr2 6
switch highway=primary|primary_link add 0.7 multiply avoidmr2 2.3 switch highway=primary|primary_link add 0.7 multiply avoidmr2 2.3
switch highway=secondary|secondary_link add 0.7 multiply avoidmr2 0.5 switch highway=secondary|secondary_link add 0.7 multiply avoidmr2 0.5
switch highway=tertiary|tertiary_link 1 switch highway=tertiary|tertiary_link 1
switch highway=unclassified 1 switch highway=unclassified 1
switch highway=residential|service add 0.7 multiply avoidsr 0.3 switch highway=residential|service add 0.7 multiply avoidsr 0.3
switch highway=track switch highway=track
switch tracktype=grade1 add 0.7 multiply avoidsr 0.3 switch tracktype=grade1 add 0.7 multiply avoidsr 0.3
switch tracktype=grade2 multiply avoidbw add 1 multiply avoidsr 2 switch tracktype=grade2 multiply avoidbw add 1 multiply avoidsr 2
switch tracktype=grade3 multiply avoidbw 40 switch tracktype=grade3 multiply avoidbw 40
switch tracktype=grade4 multiply avoidbw 50 switch tracktype=grade4 multiply avoidbw 50
switch tracktype=grade5 multiply avoidbw 50 switch tracktype=grade5 multiply avoidbw 50
switch surface= multiply avoidbw 20 switch surface= multiply avoidbw 20
add 0.7 multiply avoidsr 0.3 add 0.7 multiply avoidsr 0.3
switch cycleway add 0.28 multiply avoid_cycleways 0.24 switch cycleway add 0.28 multiply avoid_cycleways 0.24
switch highway=living_street add 1 multiply avoidsr 1.5 switch highway=living_street add 1 multiply avoidsr 1.5
switch highway=road add 4 multiply avoidsr 6 switch highway=road add 4 multiply avoidsr 6
switch footway 30 switch footway 30
switch highway=steps 40 switch highway=steps 40
switch highway=path switch highway=path
switch surface= multiply avoidbw 40 switch surface= multiply avoidbw 40
multiply avoidsr add 0.28 multiply avoid_cycleways 0.24 multiply avoidsr add 0.28 multiply avoid_cycleways 0.24
switch highway=bridleway multiply avoidbw 80 switch highway=bridleway multiply avoidbw 80
20 20
assign downhillcostfactor assign downhillcostfactor
# dieser Abschnitt ist für die Kosten bei Gefälle # dieser Abschnitt ist für die Kosten bei Gefälle
# da er von der Struktur identisch wie der vorvorherige Abschnitt werde ich die Beschreibung hier auch nicht wiederholen # da er von der Struktur identisch wie der vorvorherige Abschnitt werde ich die Beschreibung hier auch nicht wiederholen
switch and highway= not route=ferry 10000 switch and highway= not route=ferry 10000
switch or highway=proposed highway=abandoned 10000 switch or highway=proposed highway=abandoned 10000
min 9999 min 9999
max 1 max 1
add downspeedpenalty add downspeedpenalty
add onewaypenalty add onewaypenalty
add accesspenalty add accesspenalty
add max smoothnesspenalty surfacepenalty add max smoothnesspenalty surfacepenalty
max 1 max 1
switch highway=motorway|motorway_link 10000 switch highway=motorway|motorway_link 10000
switch route=ferry 10.67 switch route=ferry 10.67
switch highway=trunk|trunk_link add 1 multiply avoidmr2 2 switch highway=trunk|trunk_link add 1 multiply avoidmr2 2
switch highway=primary|primary_link add 0.7 multiply avoidmr2 1.3 switch highway=primary|primary_link add 0.7 multiply avoidmr2 1.3
switch highway=secondary|secondary_link 1 switch highway=secondary|secondary_link 1
switch highway=tertiary|tertiary_link add 0.5 multiply avoidsr 0.5 switch highway=tertiary|tertiary_link add 0.5 multiply avoidsr 0.5
switch highway=unclassified add 0.6 multiply avoidsr 0.6 switch highway=unclassified add 0.6 multiply avoidsr 0.6
switch highway=residential|service add 1 multiply avoidsr 1 switch highway=residential|service add 1 multiply avoidsr 1
switch highway=track switch highway=track
switch tracktype=grade1 add 1 multiply avoidsr 1 switch tracktype=grade1 add 1 multiply avoidsr 1
switch tracktype=grade2 multiply avoidbw add 4 multiply avoidsr 4 switch tracktype=grade2 multiply avoidbw add 4 multiply avoidsr 4
switch tracktype=grade3 multiply avoidbw 40 switch tracktype=grade3 multiply avoidbw 40
switch tracktype=grade4 multiply avoidbw 50 switch tracktype=grade4 multiply avoidbw 50
switch tracktype=grade5 multiply avoidbw 50 switch tracktype=grade5 multiply avoidbw 50
switch surface= multiply avoidbw 20 switch surface= multiply avoidbw 20
add 1 multiply avoidsr 1 add 1 multiply avoidsr 1
switch cycleway add 0.5 multiply avoid_cycleways 0.5 switch cycleway add 0.5 multiply avoid_cycleways 0.5
switch highway=living_street add 2 multiply avoidsr 6 switch highway=living_street add 2 multiply avoidsr 6
switch highway=road add 4 multiply avoidsr 6 switch highway=road add 4 multiply avoidsr 6
switch footway 30 switch footway 30
switch highway=steps 40 switch highway=steps 40
switch highway=path switch highway=path
switch surface= multiply avoidbw 40 switch surface= multiply avoidbw 40
multiply avoidsr add 0.5 multiply avoid_cycleways 0.5 multiply avoidsr add 0.5 multiply avoid_cycleways 0.5
switch highway=bridleway multiply avoidbw 80 switch highway=bridleway multiply avoidbw 80
20 20
# hier kommen Variablen die zur Generierung der Abbiegehinweise benötigt werden # hier kommen Variablen die zur Generierung der Abbiegehinweise benötigt werden
assign priorityclassifier = assign priorityclassifier =
if ( highway=motorway ) then 30 if ( highway=motorway ) then 30
else if ( highway=motorway_link ) then 29 else if ( highway=motorway_link ) then 29
else if ( highway=trunk ) then 28 else if ( highway=trunk ) then 28
else if ( highway=trunk_link ) then 27 else if ( highway=trunk_link ) then 27
else if ( highway=primary ) then 26 else if ( highway=primary ) then 26
else if ( highway=primary_link ) then 25 else if ( highway=primary_link ) then 25
else if ( highway=secondary ) then 24 else if ( highway=secondary ) then 24
else if ( highway=secondary_link ) then 23 else if ( highway=secondary_link ) then 23
else if ( highway=tertiary ) then 22 else if ( highway=tertiary ) then 22
else if ( highway=tertiary_link ) then 21 else if ( highway=tertiary_link ) then 21
else if ( highway=unclassified ) then 20 else if ( highway=unclassified ) then 20
else if ( highway=residential|living_street ) then 6 else if ( highway=residential|living_street ) then 6
else if ( highway=service ) then 6 else if ( highway=service ) then 6
else if ( highway=cycleway ) then 6 else if ( highway=cycleway ) then 6
else if ( bicycle=designated ) then 6 else if ( bicycle=designated ) then 6
else if ( highway=track ) then if tracktype=grade1 then 6 else 4 else if ( highway=track ) then if tracktype=grade1 then 6 else 4
else if ( highway=bridleway|road|path|footway ) then 4 else if ( highway=bridleway|road|path|footway ) then 4
else if ( highway=steps ) then 2 else if ( highway=steps ) then 2
else if ( highway=pedestrian ) then 2 else if ( highway=pedestrian ) then 2
else 0 else 0
assign isbadoneway = not equal onewaypenalty 0 assign isbadoneway = not equal onewaypenalty 0
assign isgoodoneway = if reversedirection=yes then oneway=-1 assign isgoodoneway = if reversedirection=yes then oneway=-1
else if oneway= then junction=roundabout else oneway=yes|true|1 else if oneway= then junction=roundabout else oneway=yes|true|1
assign isroundabout = junction=roundabout assign isroundabout = junction=roundabout
assign islinktype = highway=motorway_link|trunk_link|primary_link|secondary_link|tertiary_link assign islinktype = highway=motorway_link|trunk_link|primary_link|secondary_link|tertiary_link
assign isgoodforcars = if greater priorityclassifier 6 then true assign isgoodforcars = if greater priorityclassifier 6 then true
else if highway=residential|living_street|service then true else if highway=residential|living_street|service then true
else if ( and highway=track tracktype=grade1 ) then true else if ( and highway=track tracktype=grade1 ) then true
else false else false
assign classifiermask add isbadoneway assign classifiermask add isbadoneway
add multiply isgoodoneway 2 add multiply isgoodoneway 2
add multiply isroundabout 4 add multiply isroundabout 4
add multiply islinktype 8 add multiply islinktype 8
multiply isgoodforcars 16 multiply isgoodforcars 16
---context:node # following code refers to node tags ---context:node # following code refers to node tags
# Parameter für Knotenpunkte # Parameter für Knotenpunkte
# Kosten an Knotenpunkten in Meter # Kosten an Knotenpunkten in Meter
assign defaultaccess assign defaultaccess
switch access= switch access=
1 # add default barrier restrictions here! 1 # add default barrier restrictions here!
switch or access=private access=no switch or access=private access=no
0 0
1 1
assign bikeaccess assign bikeaccess
or nodeaccessgranted=yes or nodeaccessgranted=yes
switch bicycle= switch bicycle=
switch vehicle= switch vehicle=
defaultaccess defaultaccess
switch or vehicle=private vehicle=no switch or vehicle=private vehicle=no
0 0
1 1
switch or bicycle=private and not or highway=crossing ignore_bicycle_no or bicycle=no bicycle=dismount switch or bicycle=private and not or highway=crossing ignore_bicycle_no or bicycle=no bicycle=dismount
0 0
1 1
assign footaccess assign footaccess
or bicycle=dismount or bicycle=dismount
switch foot= switch foot=
defaultaccess defaultaccess
switch or foot=private foot=no switch or foot=private foot=no
0 0
1 1
assign initialcost assign initialcost
add switch highway=traffic_signals 200 # Kosten für Ampel add switch highway=traffic_signals 200 # Kosten für Ampel
switch highway=stop 150 # Kosten für Stoppschild switch highway=stop 150 # Kosten für Stoppschild
switch railway=crossing|level_crossing 200 # Kosten für Bahnübergang switch railway=crossing|level_crossing 200 # Kosten für Bahnübergang
switch highway=steps switch no_steps 1000000 dismount_cost #Kosten für Stufe switch highway=steps switch no_steps 1000000 dismount_cost #Kosten für Stufe
0 0
switch bikeaccess switch bikeaccess
0 0
switch footaccess switch footaccess
dismount_cost # Kosten fürs Aussteigen dismount_cost # Kosten fürs Aussteigen
1000000 #Kosten für verbotene oder private Wege 1000000 #Kosten für verbotene oder private Wege

View file

@ -1,460 +1,460 @@
# #
# Profile for fast velomobiles, contributed by http://www.velomobilforum.de # Profile for fast velomobiles, contributed by http://www.velomobilforum.de
---context:global ---context:global
assign no_steps = true # %no_steps% | keine Stufen, das Velomobil soll nicht getragen werden müssen | boolean assign no_steps = true # %no_steps% | keine Stufen, das Velomobil soll nicht getragen werden müssen | boolean
assign no_wrong_oneway = false # %no_wrong oneway% | keine Einbahnstrasse in falsche Richtung, auch nicht schiebend | boolean assign no_wrong_oneway = false # %no_wrong oneway% | keine Einbahnstrasse in falsche Richtung, auch nicht schiebend | boolean
assign dismount_cost = 1000 # %dismount_cost% | Umweg in Meter der in Kauf genommen wird bevor eine Strecke genommen wird bei der man austeigen muss, ab 1 000 000 wird keine Schiebestrecke mehr genommen | number assign dismount_cost = 1000 # %dismount_cost% | Umweg in Meter der in Kauf genommen wird bevor eine Strecke genommen wird bei der man austeigen muss, ab 1 000 000 wird keine Schiebestrecke mehr genommen | number
assign avoid_main_roads = 3 # %avoid_main_roads% | große Straße vermeiden(0-10): 0 = nicht vermeiden, 1 = leicht vermeiden, 3 = Standard, 10 = stark vermeiden | number assign avoid_main_roads = 3 # %avoid_main_roads% | große Straße vermeiden(0-10): 0 = nicht vermeiden, 1 = leicht vermeiden, 3 = Standard, 10 = stark vermeiden | number
assign avoid_small_roads = 5 # %avoid_small_roads% | kleine Straße vermeiden(0-10): 0 = nicht vermeiden, 1 = leicht vermeiden, 5 = Standard, 10 = stark vermeiden | number assign avoid_small_roads = 5 # %avoid_small_roads% | kleine Straße vermeiden(0-10): 0 = nicht vermeiden, 1 = leicht vermeiden, 5 = Standard, 10 = stark vermeiden | number
assign avoid_cycleways = 8 # %avoid_cycleways% | Radwege vermeiden(0-10): 0 = nicht vermeiden, 1 = leicht vermeiden, 8 = Standard, 10 = stark vermeiden | number assign avoid_cycleways = 8 # %avoid_cycleways% | Radwege vermeiden(0-10): 0 = nicht vermeiden, 1 = leicht vermeiden, 8 = Standard, 10 = stark vermeiden | number
assign avoid_elevation = 5 # %avoid_elevation% | Hohenmeter vermeiden(0-10): 0 = nicht vermeiden, 1 = leicht vermeiden, 5 = Standard, 10 = stark vermeiden | number assign avoid_elevation = 5 # %avoid_elevation% | Hohenmeter vermeiden(0-10): 0 = nicht vermeiden, 1 = leicht vermeiden, 5 = Standard, 10 = stark vermeiden | number
assign avoid_bad_ways = 8 # %avoid_bad_ways% | Schlechte Wege vermeiden(0-10): 0 = nicht vermeiden, 1 = leicht vermeiden, 8 = Standard, 10 = stark vermeiden | number assign avoid_bad_ways = 8 # %avoid_bad_ways% | Schlechte Wege vermeiden(0-10): 0 = nicht vermeiden, 1 = leicht vermeiden, 8 = Standard, 10 = stark vermeiden | number
assign totalMass = 110 # %totalMass% | Gesamtmasse des Fahrzeugs (Fahrzeug, Fahrer, Gepäck...) in kg, für Fahrtzeitschätzung | number assign totalMass = 110 # %totalMass% | Gesamtmasse des Fahrzeugs (Fahrzeug, Fahrer, Gepäck...) in kg, für Fahrtzeitschätzung | number
assign maxSpeed = 60 # Maximale Geschwindigkeit ab der der Fahrer bremst in km/h assign maxSpeed = 60 # Maximale Geschwindigkeit ab der der Fahrer bremst in km/h
assign S_C_x = 0.05 # Effektive Stirnfläche in m² assign S_C_x = 0.05 # Effektive Stirnfläche in m²
assign C_r = 0.005 # Rollwiderstand assign C_r = 0.005 # Rollwiderstand
assign bikerPower = 125 # %bikerPower% | Dauerleistung in Watt, für Fahrtzeitschätzung| number assign bikerPower = 125 # %bikerPower% | Dauerleistung in Watt, für Fahrtzeitschätzung| number
assign ignore_bicycle_no = false # %ignore_bicycle_no% | für Regionen mit falschen bicyle=no tags können sie mit "true" ignoriert werden. Auch Shuttletransporte (bicycle=dismount + foot=no) werden geroutet | boolean assign ignore_bicycle_no = false # %ignore_bicycle_no% | für Regionen mit falschen bicyle=no tags können sie mit "true" ignoriert werden. Auch Shuttletransporte (bicycle=dismount + foot=no) werden geroutet | boolean
assign turnInstructionMode = 1 # %turnInstructionMode% | Modus für die Abbiegehinweise | [0=keine, 1=automatische Wahl, 2=locus-Style, 3=osmand-Style, 4=comment-Style, 5=gpsies-Style, 6=orux-Style] assign turnInstructionMode = 1 # %turnInstructionMode% | Modus für die Abbiegehinweise | [0=keine, 1=automatische Wahl, 2=locus-Style, 3=osmand-Style, 4=comment-Style, 5=gpsies-Style, 6=orux-Style, 7=locus-old-Style]
assign turnInstructionCatchingRange 20 # innerhalb dieser Strecke werden mehrere Abiegehinweise zu einem zusammengefasst und die Abiegewinkel werden besser an die generelle Richtung angenähert assign turnInstructionCatchingRange 20 # innerhalb dieser Strecke werden mehrere Abiegehinweise zu einem zusammengefasst und die Abiegewinkel werden besser an die generelle Richtung angenähert
assign turnInstructionRoundabouts true # mit "false" werden keine speziellen Abiegehinweise für den Kreisverkehr generiert assign turnInstructionRoundabouts true # mit "false" werden keine speziellen Abiegehinweise für den Kreisverkehr generiert
assign avoidmr2 multiply 0.11111111 multiply avoid_main_roads avoid_main_roads assign avoidmr2 multiply 0.11111111 multiply avoid_main_roads avoid_main_roads
assign avoidsr multiply 0.2 avoid_small_roads assign avoidsr multiply 0.2 avoid_small_roads
assign avoidbw multiply 0.125 avoid_bad_ways assign avoidbw multiply 0.125 avoid_bad_ways
assign avoid_ele multiply avoid_elevation 0.2 assign avoid_ele multiply avoid_elevation 0.2
assign downhillcost multiply avoid_ele 80 # Kosten für die Höhenmeter bergab assign downhillcost multiply avoid_ele 80 # Kosten für die Höhenmeter bergab
assign downhillcutoff 0.1 # Gefälle unter diesem Wert in Prozent werden nicht gewertet assign downhillcutoff 0.1 # Gefälle unter diesem Wert in Prozent werden nicht gewertet
assign uphillcost multiply avoid_ele 80 # Kosten für die Höhenmeter bergauf assign uphillcost multiply avoid_ele 80 # Kosten für die Höhenmeter bergauf
assign uphillcutoff 1 # Steigungen unter diesem Wert in Prozent werden nicht gewertet assign uphillcutoff 1 # Steigungen unter diesem Wert in Prozent werden nicht gewertet
assign validForBikes true # bei true werden die Außnahmen bei den Abbiegebeschränkungen für Fahrräder aktiviert assign validForBikes true # bei true werden die Außnahmen bei den Abbiegebeschränkungen für Fahrräder aktiviert
assign considerTurnRestrictions true # bei false werden die Abbiegebeschränkungen ignoriert assign considerTurnRestrictions true # bei false werden die Abbiegebeschränkungen ignoriert
assign pass1coefficient 3 # Berechnugskoeffizient für erste schnelle Berechnung assign pass1coefficient 3 # Berechnugskoeffizient für erste schnelle Berechnung
assign pass2coefficient 0 # Berechnugskoeffizient für zweite exakte Berechnung assign pass2coefficient 0 # Berechnugskoeffizient für zweite exakte Berechnung
# sinnvolle Werte für den ersten Koeffizienten: # sinnvolle Werte für den ersten Koeffizienten:
# 1 exakte Berechnung beim ersten Durchlauf # 1 exakte Berechnung beim ersten Durchlauf
# umso größer die Werte umso schneller und ungenauer die erste Berechnung # umso größer die Werte umso schneller und ungenauer die erste Berechnung
# sinnvolle Werte für den zweiten Koeffizienten: # sinnvolle Werte für den zweiten Koeffizienten:
# 0 exakte Berechnung mit Beschränkung des Suchgebiets über die Kosten der ersten Berechnung # 0 exakte Berechnung mit Beschränkung des Suchgebiets über die Kosten der ersten Berechnung
# -1 keine zweite Berechnung, nur sinnvoll bei 1 im ersten Durchlauf # -1 keine zweite Berechnung, nur sinnvoll bei 1 im ersten Durchlauf
# Um die ungenauen SRTM Höhendaten zu filtern werden für jeweils für Anstiege und Gefälle Puffer verwendet. Erst wenn diese überschritten werden die Segmente als Anstiege oder Gefälle gewertet. # Um die ungenauen SRTM Höhendaten zu filtern werden für jeweils für Anstiege und Gefälle Puffer verwendet. Erst wenn diese überschritten werden die Segmente als Anstiege oder Gefälle gewertet.
assign elevationpenaltybuffer 7 # Höhenpuffer (in Meter) ab dem die Höhenstrafen beginnen und das Segment als Anstieg und Gefälle gewertet wird assign elevationpenaltybuffer 7 # Höhenpuffer (in Meter) ab dem die Höhenstrafen beginnen und das Segment als Anstieg und Gefälle gewertet wird
assign elevationmaxbuffer 13 # Maximale Puffergröße (in Meter), alles darüberhinausgehende wird voll bestraft assign elevationmaxbuffer 13 # Maximale Puffergröße (in Meter), alles darüberhinausgehende wird voll bestraft
assign elevationbufferreduce 1 # im Bereich zwischen elevationpenaltybuffer und elevationmaxbuffer wird eine Höhenstrafe, die einer Steigung oder Gefälle dieses Wertes (in Prozent) entspricht, verhängt und diese Höhenmeter vom Puffer abgezogen. assign elevationbufferreduce 1 # im Bereich zwischen elevationpenaltybuffer und elevationmaxbuffer wird eine Höhenstrafe, die einer Steigung oder Gefälle dieses Wertes (in Prozent) entspricht, verhängt und diese Höhenmeter vom Puffer abgezogen.
---context:way ---context:way
# Parameter für die Wege # Parameter für die Wege
#zusätzliche Kosten in Meter für jeden Streckenabschnitt #zusätzliche Kosten in Meter für jeden Streckenabschnitt
assign any_cycleroute or route_bicycle_icn=yes or route_bicycle_ncn=yes or route_bicycle_rcn=yes route_bicycle_lcn=yes assign any_cycleroute or route_bicycle_icn=yes or route_bicycle_ncn=yes or route_bicycle_rcn=yes route_bicycle_lcn=yes
assign nodeaccessgranted or any_cycleroute lcn=yes assign nodeaccessgranted or any_cycleroute lcn=yes
assign cycleway assign cycleway
or highway=cycleway and highway=path|footway|pedestrian bicycle=designated|yes or highway=cycleway and highway=path|footway|pedestrian bicycle=designated|yes
assign footway assign footway
or highway=footway|pedestrian and highway=path foot=designated|yes or highway=footway|pedestrian and highway=path foot=designated|yes
assign turncost assign turncost
switch junction=roundabout 0 switch junction=roundabout 0
150 # Kosten die für eine 90 Grad Abbiegung berechnet werden. Für kleinere Winkel werden sie mit turncost*cos(Winkel) berechnet, bei Kreisverkehr keine weitere Kosten 150 # Kosten die für eine 90 Grad Abbiegung berechnet werden. Für kleinere Winkel werden sie mit turncost*cos(Winkel) berechnet, bei Kreisverkehr keine weitere Kosten
assign initialclassifier # hier wird bestimmten Wegen ein Wert zugeordnet und wenn er sich vom vorherigen unterscheidet die initalcost hinzugerechnet assign initialclassifier # hier wird bestimmten Wegen ein Wert zugeordnet und wenn er sich vom vorherigen unterscheidet die initalcost hinzugerechnet
switch route=ferry 2 switch route=ferry 2
switch highway=steps 3 switch highway=steps 3
switch cycleway 4 switch cycleway 4
switch footway 5 switch footway 5
1 1
assign initialcost assign initialcost
switch route=ferry 15000 # Kosten wenn eine Fähre verwendet wird switch route=ferry 15000 # Kosten wenn eine Fähre verwendet wird
switch highway=steps switch no_steps 1000000 dismount_cost # Kosten für Stufen switch highway=steps switch no_steps 1000000 dismount_cost # Kosten für Stufen
switch cycleway multiply 12.5 multiply avoid_cycleways avoid_cycleways # Kosten für Radwege switch cycleway multiply 12.5 multiply avoid_cycleways avoid_cycleways # Kosten für Radwege
switch footway dismount_cost # Kosten für Fußwege switch footway dismount_cost # Kosten für Fußwege
0 0
# Kosten ab hier als Meter für jeden tatsächlichen Meter # Kosten ab hier als Meter für jeden tatsächlichen Meter
assign oneway assign oneway
switch oneway= switch oneway=
junction=roundabout junction=roundabout
or oneway=yes or oneway=true oneway=1 or oneway=yes or oneway=true oneway=1
assign onewaypenalty assign onewaypenalty
switch switch reversedirection=yes oneway oneway=-1 switch switch reversedirection=yes oneway oneway=-1
switch or cycleway=opposite or cycleway=opposite_lane or cycleway=opposite_track oneway:bicycle=no 0 #zusätzliche Kosten für in Gegenrichtung für Radfahrer freigegebene Einbahnstraßen in Gegenrichtung switch or cycleway=opposite or cycleway=opposite_lane or cycleway=opposite_track oneway:bicycle=no 0 #zusätzliche Kosten für in Gegenrichtung für Radfahrer freigegebene Einbahnstraßen in Gegenrichtung
switch no_wrong_oneway 10000 switch no_wrong_oneway 10000
switch or highway=primary highway=primary_link 50 #zusätzliche Kosten für Bundesstraßen Einbahnstraßen in Gegenrichtung switch or highway=primary highway=primary_link 50 #zusätzliche Kosten für Bundesstraßen Einbahnstraßen in Gegenrichtung
switch or highway=secondary highway=secondary_link 30 #zusätzliche Kosten für Landstraßen Einbahnstraßen in Gegenrichtung switch or highway=secondary highway=secondary_link 30 #zusätzliche Kosten für Landstraßen Einbahnstraßen in Gegenrichtung
switch or highway=tertiary highway=tertiary_link 25 #zusätzliche Kosten für Kreisstraßen Einbahnstraßen in Gegenrichtung switch or highway=tertiary highway=tertiary_link 25 #zusätzliche Kosten für Kreisstraßen Einbahnstraßen in Gegenrichtung
20.0 #zusätzliche Kosten für sonstige Einbahnstraßen in Gegenrichtung 20.0 #zusätzliche Kosten für sonstige Einbahnstraßen in Gegenrichtung
0.0 0.0
assign defaultaccess assign defaultaccess
switch access= switch access=
not motorroad=yes not motorroad=yes
switch or access=private access=no switch or access=private access=no
0 0
1 1
assign bikeaccess assign bikeaccess
or any_cycleroute or any_cycleroute
switch bicycle= switch bicycle=
switch vehicle= switch vehicle=
defaultaccess defaultaccess
switch or vehicle=private vehicle=no switch or vehicle=private vehicle=no
0 0
1 1
not or bicycle=private or and not ignore_bicycle_no bicycle=no bicycle=dismount not or bicycle=private or and not ignore_bicycle_no bicycle=no bicycle=dismount
assign footaccess assign footaccess
or bikeaccess or bikeaccess
or and bicycle=dismount ignore_bicycle_no or and bicycle=dismount ignore_bicycle_no
switch foot= switch foot=
defaultaccess defaultaccess
not or foot=private foot=no not or foot=private foot=no
assign accesspenalty assign accesspenalty
switch bikeaccess switch bikeaccess
0 0
switch footaccess switch footaccess
15 #Zusatzkosten fürs Schieben 15 #Zusatzkosten fürs Schieben
10000 #Zusatzkosten für gesperrte oder private Wege 10000 #Zusatzkosten für gesperrte oder private Wege
assign maxspeed_forward assign maxspeed_forward
switch maxspeed:forward=50 50 switch maxspeed:forward=50 50
switch maxspeed:forward=30 30 switch maxspeed:forward=30 30
switch maxspeed:forward=10 10 switch maxspeed:forward=10 10
switch maxspeed:forward=20 20 switch maxspeed:forward=20 20
switch maxspeed:forward=40 40 switch maxspeed:forward=40 40
switch maxspeed:forward=60 60 switch maxspeed:forward=60 60
switch maxspeed:forward=70 70 switch maxspeed:forward=70 70
switch maxspeed:forward=80 80 switch maxspeed:forward=80 80
switch maxspeed:forward=90 90 switch maxspeed:forward=90 90
switch maxspeed:forward=100 100 switch maxspeed:forward=100 100
switch maxspeed:forward=110 110 switch maxspeed:forward=110 110
switch maxspeed:forward=120 120 switch maxspeed:forward=120 120
switch maxspeed:forward=130 130 switch maxspeed:forward=130 130
switch maxspeed:forward=urban 50 switch maxspeed:forward=urban 50
switch maxspeed:forward=rural 100 switch maxspeed:forward=rural 100
0 0
assign maxspeed_backward assign maxspeed_backward
switch maxspeed:backward=50 50 switch maxspeed:backward=50 50
switch maxspeed:backward=30 30 switch maxspeed:backward=30 30
switch maxspeed:backward=10 10 switch maxspeed:backward=10 10
switch maxspeed:backward=20 20 switch maxspeed:backward=20 20
switch maxspeed:backward=40 40 switch maxspeed:backward=40 40
switch maxspeed:backward=60 60 switch maxspeed:backward=60 60
switch maxspeed:backward=70 70 switch maxspeed:backward=70 70
switch maxspeed:backward=80 80 switch maxspeed:backward=80 80
switch maxspeed:backward=90 90 switch maxspeed:backward=90 90
switch maxspeed:backward=100 100 switch maxspeed:backward=100 100
switch maxspeed:backward=110 110 switch maxspeed:backward=110 110
switch maxspeed:backward=120 120 switch maxspeed:backward=120 120
switch maxspeed:backward=130 130 switch maxspeed:backward=130 130
switch maxspeed:backward=urban 50 switch maxspeed:backward=urban 50
switch maxspeed:backward=rural 100 switch maxspeed:backward=rural 100
0 0
assign maxspeed assign maxspeed
switch and reversedirection=yes maxspeed_backward maxspeed_backward switch and reversedirection=yes maxspeed_backward maxspeed_backward
switch and not reversedirection=yes maxspeed_forward maxspeed_forward switch and not reversedirection=yes maxspeed_forward maxspeed_forward
switch maxspeed=50 50 switch maxspeed=50 50
switch maxspeed=30 30 switch maxspeed=30 30
switch maxspeed=10 10 switch maxspeed=10 10
switch maxspeed=20 20 switch maxspeed=20 20
switch maxspeed=40 40 switch maxspeed=40 40
switch maxspeed=60 60 switch maxspeed=60 60
switch maxspeed=70 70 switch maxspeed=70 70
switch maxspeed=80 80 switch maxspeed=80 80
switch maxspeed=90 90 switch maxspeed=90 90
switch maxspeed=100 100 switch maxspeed=100 100
switch maxspeed=110 110 switch maxspeed=110 110
switch maxspeed=120 120 switch maxspeed=120 120
switch maxspeed=130 130 switch maxspeed=130 130
switch maxspeed=urban 50 switch maxspeed=urban 50
switch maxspeed=rural 100 switch maxspeed=rural 100
999 999
assign downspeedpenalty assign downspeedpenalty
switch equal maxspeed 10 5 # Zusatzkosten für Geschwindigkeitsbegrenzung 10 km/h bei Gefälle switch equal maxspeed 10 5 # Zusatzkosten für Geschwindigkeitsbegrenzung 10 km/h bei Gefälle
switch equal maxspeed 20 2 # Zusatzkosten für Geschwindigkeitsbegrenzung 20 km/h bei Gefälle switch equal maxspeed 20 2 # Zusatzkosten für Geschwindigkeitsbegrenzung 20 km/h bei Gefälle
switch equal maxspeed 30 1 # Zusatzkosten für Geschwindigkeitsbegrenzung 30 km/h bei Gefälle switch equal maxspeed 30 1 # Zusatzkosten für Geschwindigkeitsbegrenzung 30 km/h bei Gefälle
switch equal maxspeed 40 0.8 # Zusatzkosten für Geschwindigkeitsbegrenzung 40 km/h bei Gefälle switch equal maxspeed 40 0.8 # Zusatzkosten für Geschwindigkeitsbegrenzung 40 km/h bei Gefälle
switch equal maxspeed 50 0.5 # Zusatzkosten für Geschwindigkeitsbegrenzung 50 km/h bei Gefälle switch equal maxspeed 50 0.5 # Zusatzkosten für Geschwindigkeitsbegrenzung 50 km/h bei Gefälle
0 0
assign flatspeedpenalty assign flatspeedpenalty
switch equal maxspeed 10 3 # Zusatzkosten für Geschwindigkeitsbegrenzung 10 km/h in der Ebene switch equal maxspeed 10 3 # Zusatzkosten für Geschwindigkeitsbegrenzung 10 km/h in der Ebene
switch equal maxspeed 20 1 # Zusatzkosten für Geschwindigkeitsbegrenzung 20 km/h in der Ebene switch equal maxspeed 20 1 # Zusatzkosten für Geschwindigkeitsbegrenzung 20 km/h in der Ebene
switch equal maxspeed 30 0.5 # Zusatzkosten für Geschwindigkeitsbegrenzung 30 km/h in der Ebene switch equal maxspeed 30 0.5 # Zusatzkosten für Geschwindigkeitsbegrenzung 30 km/h in der Ebene
switch equal maxspeed 40 0.3 # Zusatzkosten für Geschwindigkeitsbegrenzung 40 km/h in der Ebene switch equal maxspeed 40 0.3 # Zusatzkosten für Geschwindigkeitsbegrenzung 40 km/h in der Ebene
switch equal maxspeed 50 0.1 # Zusatzkosten für Geschwindigkeitsbegrenzung 50 km/h in der Ebene switch equal maxspeed 50 0.1 # Zusatzkosten für Geschwindigkeitsbegrenzung 50 km/h in der Ebene
0 0
assign upspeedpenalty assign upspeedpenalty
switch equal maxspeed 10 1.5 # Zusatzkosten für Geschwindigkeitsbegrenzung 10 km/h bei Anstiegen switch equal maxspeed 10 1.5 # Zusatzkosten für Geschwindigkeitsbegrenzung 10 km/h bei Anstiegen
switch equal maxspeed 20 0.4 # Zusatzkosten für Geschwindigkeitsbegrenzung 20 km/h bei Anstiegen switch equal maxspeed 20 0.4 # Zusatzkosten für Geschwindigkeitsbegrenzung 20 km/h bei Anstiegen
switch equal maxspeed 30 0.1 # Zusatzkosten für Geschwindigkeitsbegrenzung 30 km/h bei Anstiegen switch equal maxspeed 30 0.1 # Zusatzkosten für Geschwindigkeitsbegrenzung 30 km/h bei Anstiegen
0 0
assign surfacepenalty assign surfacepenalty
add switch embedded_rails=tram|yes|rail 20 # Zusatzkosten bei Schienen in der Fahrbahn add switch embedded_rails=tram|yes|rail 20 # Zusatzkosten bei Schienen in der Fahrbahn
0 0
multiply avoidbw multiply avoidbw
switch surface=asphalt|paved 0 #Zusatzkosten für Teer oder versiegelte Flächen switch surface=asphalt|paved 0 #Zusatzkosten für Teer oder versiegelte Flächen
switch concrete=plates 1 # Zusatzkosten für Betonplattenwege switch concrete=plates 1 # Zusatzkosten für Betonplattenwege
switch concrete=lanes 5 # Zusatzkosten für Betonspurplatten switch concrete=lanes 5 # Zusatzkosten für Betonspurplatten
switch surface=concrete|paving_stones|wood|metal 0.5 #Zusatzkosten für Beton, Pflastersteine, Holz oder Metall switch surface=concrete|paving_stones|wood|metal 0.5 #Zusatzkosten für Beton, Pflastersteine, Holz oder Metall
switch surface=cobblestone|fine_gravel|compacted|sett|grass_paver 5 #Zusatzkosten für Kopfsteinpflaster, Splitt, verdichtete Deckschicht, behauene Pflastersteine oder Rasengittersteine switch surface=cobblestone|fine_gravel|compacted|sett|grass_paver 5 #Zusatzkosten für Kopfsteinpflaster, Splitt, verdichtete Deckschicht, behauene Pflastersteine oder Rasengittersteine
switch surface=gravel|sand|pebblestone 10 #Zusatzkosten für Schotter, Sand oder Kies switch surface=gravel|sand|pebblestone 10 #Zusatzkosten für Schotter, Sand oder Kies
switch surface=ground|grass|unpaved|dirt|earth|mud|clay 50 #Zusatzkosten für naturbelassene Wege, Grasswege, unbefestigte Wege, Schmutzwege, erdige Wege, schlammige Wege oder Lehmwege switch surface=ground|grass|unpaved|dirt|earth|mud|clay 50 #Zusatzkosten für naturbelassene Wege, Grasswege, unbefestigte Wege, Schmutzwege, erdige Wege, schlammige Wege oder Lehmwege
0 0
assign smoothnesspenalty assign smoothnesspenalty
multiply avoidbw multiply avoidbw
switch smoothness=excellent|good|very_good 0 #Zusatzkosten für excellente, gute, oder sehr gute Oberflächen switch smoothness=excellent|good|very_good 0 #Zusatzkosten für excellente, gute, oder sehr gute Oberflächen
switch smoothness=intermediate|medium 1 #Zusatzkosten für mittelmäßige Oberflächen switch smoothness=intermediate|medium 1 #Zusatzkosten für mittelmäßige Oberflächen
switch smoothness=rough|poor 2 #Zusatzkosten für raue oder schlechte Oberflächen switch smoothness=rough|poor 2 #Zusatzkosten für raue oder schlechte Oberflächen
switch smoothness=robust_wheels|bad 10 #Zusatzkosten für Oberflächen die robuste Reifen benötigen oder schlechte Oberflächen switch smoothness=robust_wheels|bad 10 #Zusatzkosten für Oberflächen die robuste Reifen benötigen oder schlechte Oberflächen
switch smoothness=high_clearance|off_road_wheels|very_bad|horrible|very_horrible|impassable 100 #Zusatzkosten für Oberflächen die eine erhöhte Bodenfreiheit oder Geländebereifung benötigen, schrecklich, sehr schrecklich oder unpasierbar sind switch smoothness=high_clearance|off_road_wheels|very_bad|horrible|very_horrible|impassable 100 #Zusatzkosten für Oberflächen die eine erhöhte Bodenfreiheit oder Geländebereifung benötigen, schrecklich, sehr schrecklich oder unpasierbar sind
0 0
assign costfactor assign costfactor
# dieser Abschnitt ist für die Kosten in der Ebene # dieser Abschnitt ist für die Kosten in der Ebene
switch and highway= not route=ferry 10000 # Kosten für alles ohne higway tag außer Fähren switch and highway= not route=ferry 10000 # Kosten für alles ohne higway tag außer Fähren
switch or highway=proposed highway=abandoned 10000 # Kosten für geplante oder Wege im Bau switch or highway=proposed highway=abandoned 10000 # Kosten für geplante oder Wege im Bau
min 9999 min 9999
max 1 max 1
add onewaypenalty add onewaypenalty
add accesspenalty add accesspenalty
add max surfacepenalty smoothnesspenalty add max surfacepenalty smoothnesspenalty
add flatspeedpenalty add flatspeedpenalty
max 1 max 1
switch highway=motorway|motorway_link 10000 # Kosten für Autobahnen switch highway=motorway|motorway_link 10000 # Kosten für Autobahnen
switch route=ferry 10.67 # Kosten für Fähren switch route=ferry 10.67 # Kosten für Fähren
switch highway=trunk|trunk_link add 1 multiply avoidmr2 1.5 # Kosten für eine autobahnänliche Straße switch highway=trunk|trunk_link add 1 multiply avoidmr2 1.5 # Kosten für eine autobahnänliche Straße
switch highway=primary|primary_link add 0.5 multiply avoidmr2 0.7 # Kosten für Bundesstraßen switch highway=primary|primary_link add 0.5 multiply avoidmr2 0.7 # Kosten für Bundesstraßen
switch highway=secondary|secondary_link 1 # Kosten für Landstraßen switch highway=secondary|secondary_link 1 # Kosten für Landstraßen
switch highway=tertiary|tertiary_link add 0.5 multiply avoidsr 0.6 # Kosten für Kreisstraßen switch highway=tertiary|tertiary_link add 0.5 multiply avoidsr 0.6 # Kosten für Kreisstraßen
switch highway=unclassified add 0.5 multiply avoidsr 0.7 # Kosten für Verbindungsstraßen switch highway=unclassified add 0.5 multiply avoidsr 0.7 # Kosten für Verbindungsstraßen
switch highway=residential|service add 0.7 multiply avoidsr 1 # Kosten für Wohn- und Zufahrtsstraßen switch highway=residential|service add 0.7 multiply avoidsr 1 # Kosten für Wohn- und Zufahrtsstraßen
switch highway=track switch highway=track
switch tracktype=grade1 add 1 multiply avoidsr 1.5 # Kosten für geteerte, betonierte oder gepflasterte Feldwege switch tracktype=grade1 add 1 multiply avoidsr 1.5 # Kosten für geteerte, betonierte oder gepflasterte Feldwege
switch tracktype=grade2 multiply avoidbw add 4 multiply avoidsr 6 # Kosten für geschotterte Feldwege switch tracktype=grade2 multiply avoidbw add 4 multiply avoidsr 6 # Kosten für geschotterte Feldwege
switch tracktype=grade3 multiply avoidbw 40 # Kosten für Feldwege mit weichem Untergrund switch tracktype=grade3 multiply avoidbw 40 # Kosten für Feldwege mit weichem Untergrund
switch tracktype=grade4 multiply avoidbw 50 # Kosten für unbefestigte Feldwege switch tracktype=grade4 multiply avoidbw 50 # Kosten für unbefestigte Feldwege
switch tracktype=grade5 multiply avoidbw 50 # Kosten für kaum erkennbare Feldwege switch tracktype=grade5 multiply avoidbw 50 # Kosten für kaum erkennbare Feldwege
switch surface= multiply avoidbw 20 # Kosten für Feldwege ohne Oberflächenangabe switch surface= multiply avoidbw 20 # Kosten für Feldwege ohne Oberflächenangabe
add 1 multiply avoidsr 1.5 # Kosten für Feldwege mit Oberflächenangabe add 1 multiply avoidsr 1.5 # Kosten für Feldwege mit Oberflächenangabe
switch cycleway add 0.58 multiply avoid_cycleways 0.24 # Kosten für Fahrradwege switch cycleway add 0.58 multiply avoid_cycleways 0.24 # Kosten für Fahrradwege
switch highway=living_street add 2 multiply avoidsr 3 # Kosten für Spielstraßen switch highway=living_street add 2 multiply avoidsr 3 # Kosten für Spielstraßen
switch highway=road add 4 multiply avoidsr 6 # Kosten für noch nicht genauer beschriebene Straße switch highway=road add 4 multiply avoidsr 6 # Kosten für noch nicht genauer beschriebene Straße
switch footway 30 # Kosten für Fußwege switch footway 30 # Kosten für Fußwege
switch highway=steps 40 # Kosten für Stufen switch highway=steps 40 # Kosten für Stufen
switch highway=path switch highway=path
switch surface= multiply avoidbw 40 # Kosten für Pfade ohne Oberflächenangabe switch surface= multiply avoidbw 40 # Kosten für Pfade ohne Oberflächenangabe
add 4 multiply avoidsr 6 # Kosten für Pfade mit Oberflächenangabe add 4 multiply avoidsr 6 # Kosten für Pfade mit Oberflächenangabe
switch highway=bridleway multiply avoidbw 80 # Kosten für Reitwege switch highway=bridleway multiply avoidbw 80 # Kosten für Reitwege
20 # Kosten für sonstige Wege 20 # Kosten für sonstige Wege
assign uphillcostfactor assign uphillcostfactor
# dieser Abschnitt ist für die Kosten bei Anstiegen # dieser Abschnitt ist für die Kosten bei Anstiegen
# da er von der Struktur identisch wie der vorherige Abschnitt werde ich die Beschreibung hier nicht wiederholen # da er von der Struktur identisch wie der vorherige Abschnitt werde ich die Beschreibung hier nicht wiederholen
switch and highway= not route=ferry 10000 switch and highway= not route=ferry 10000
switch or highway=proposed highway=abandoned 10000 switch or highway=proposed highway=abandoned 10000
min 9999 min 9999
max 1 max 1
add onewaypenalty add onewaypenalty
add accesspenalty add accesspenalty
add max surfacepenalty smoothnesspenalty add max surfacepenalty smoothnesspenalty
add upspeedpenalty add upspeedpenalty
max 1 max 1
switch highway=motorway|motorway_link 10000 switch highway=motorway|motorway_link 10000
switch route=ferry 10.67 switch route=ferry 10.67
switch highway=trunk|trunk_link add 1 multiply avoidmr2 5.5 switch highway=trunk|trunk_link add 1 multiply avoidmr2 5.5
switch highway=primary|primary_link add 0.5 multiply avoidmr2 2.5 switch highway=primary|primary_link add 0.5 multiply avoidmr2 2.5
switch highway=secondary|secondary_link add 0.5 multiply avoidmr2 0.7 switch highway=secondary|secondary_link add 0.5 multiply avoidmr2 0.7
switch highway=tertiary|tertiary_link 1 switch highway=tertiary|tertiary_link 1
switch highway=unclassified 1 switch highway=unclassified 1
switch highway=residential|service add 0.6 multiply avoidsr 0.9 switch highway=residential|service add 0.6 multiply avoidsr 0.9
switch highway=track switch highway=track
switch tracktype=grade1 add 0.8 multiply avoidsr 1.2 switch tracktype=grade1 add 0.8 multiply avoidsr 1.2
switch tracktype=grade2 multiply avoidbw add 4 multiply avoidsr 6 switch tracktype=grade2 multiply avoidbw add 4 multiply avoidsr 6
switch tracktype=grade3 multiply avoidbw 40 switch tracktype=grade3 multiply avoidbw 40
switch tracktype=grade4 multiply avoidbw 50 switch tracktype=grade4 multiply avoidbw 50
switch tracktype=grade5 multiply avoidbw 50 switch tracktype=grade5 multiply avoidbw 50
switch surface= multiply avoidbw 20 switch surface= multiply avoidbw 20
add 1 multiply avoidsr 1.5 add 1 multiply avoidsr 1.5
switch cycleway add 0.24 multiply avoid_cycleways 0.22 switch cycleway add 0.24 multiply avoid_cycleways 0.22
switch highway=living_street add 2 multiply avoidsr 3 switch highway=living_street add 2 multiply avoidsr 3
switch highway=road add 4 multiply avoidsr 6 switch highway=road add 4 multiply avoidsr 6
switch footway 30 switch footway 30
switch highway=steps 40 switch highway=steps 40
switch highway=path switch highway=path
switch surface= multiply avoidbw 40 switch surface= multiply avoidbw 40
add 4 multiply avoidsr 6 add 4 multiply avoidsr 6
switch highway=bridleway multiply avoidbw 80 switch highway=bridleway multiply avoidbw 80
20 20
assign downhillcostfactor assign downhillcostfactor
# dieser Abschnitt ist für die Kosten bei Gefälle # dieser Abschnitt ist für die Kosten bei Gefälle
# da er von der Struktur identisch wie der vorvorherige Abschnitt werde ich die Beschreibung hier auch nicht wiederholen # da er von der Struktur identisch wie der vorvorherige Abschnitt werde ich die Beschreibung hier auch nicht wiederholen
switch and highway= not route=ferry 10000 switch and highway= not route=ferry 10000
switch or highway=proposed highway=abandoned 10000 switch or highway=proposed highway=abandoned 10000
min 9999 min 9999
max 1 max 1
add downspeedpenalty add downspeedpenalty
add onewaypenalty add onewaypenalty
add accesspenalty add accesspenalty
add max smoothnesspenalty surfacepenalty add max smoothnesspenalty surfacepenalty
max 1 max 1
switch highway=motorway|motorway_link 10000 switch highway=motorway|motorway_link 10000
switch route=ferry 10.67 switch route=ferry 10.67
switch highway=trunk|trunk_link add 0.5 multiply avoidmr2 1 switch highway=trunk|trunk_link add 0.5 multiply avoidmr2 1
switch highway=primary|primary_link add 0.5 multiply avoidmr2 0.5 switch highway=primary|primary_link add 0.5 multiply avoidmr2 0.5
switch highway=secondary|secondary_link 1 switch highway=secondary|secondary_link 1
switch highway=tertiary|tertiary_link add 0.6 multiply avoidsr 0.9 switch highway=tertiary|tertiary_link add 0.6 multiply avoidsr 0.9
switch highway=unclassified add 0.6 multiply avoidsr 1.1 switch highway=unclassified add 0.6 multiply avoidsr 1.1
switch highway=residential|service add 1 multiply avoidsr 1.5 switch highway=residential|service add 1 multiply avoidsr 1.5
switch highway=track switch highway=track
switch tracktype=grade1 add 1.8 multiply avoidsr 1.2 switch tracktype=grade1 add 1.8 multiply avoidsr 1.2
switch tracktype=grade2 multiply avoidbw add 4 multiply avoidsr 6 switch tracktype=grade2 multiply avoidbw add 4 multiply avoidsr 6
switch tracktype=grade3 multiply avoidbw 40 switch tracktype=grade3 multiply avoidbw 40
switch tracktype=grade4 multiply avoidbw 50 switch tracktype=grade4 multiply avoidbw 50
switch tracktype=grade5 multiply avoidbw 50 switch tracktype=grade5 multiply avoidbw 50
switch surface= multiply avoidbw 20 switch surface= multiply avoidbw 20
add 1.8 multiply avoidsr 1.2 add 1.8 multiply avoidsr 1.2
switch cycleway add 0.2 multiply avoid_cycleways 0.6 switch cycleway add 0.2 multiply avoid_cycleways 0.6
switch highway=living_street add 2 multiply avoidsr 6 switch highway=living_street add 2 multiply avoidsr 6
switch highway=road add 4 multiply avoidsr 6 switch highway=road add 4 multiply avoidsr 6
switch footway 30 switch footway 30
switch highway=steps 40 switch highway=steps 40
switch highway=path switch highway=path
switch surface= multiply avoidbw 40 switch surface= multiply avoidbw 40
add 4 multiply avoidsr 6 add 4 multiply avoidsr 6
switch highway=bridleway multiply avoidbw 80 switch highway=bridleway multiply avoidbw 80
20 20
# hier kommen Variablen die zur Generierung der Abbiegehinweise benötigt werden # hier kommen Variablen die zur Generierung der Abbiegehinweise benötigt werden
assign priorityclassifier = assign priorityclassifier =
if ( highway=motorway ) then 30 if ( highway=motorway ) then 30
else if ( highway=motorway_link ) then 29 else if ( highway=motorway_link ) then 29
else if ( highway=trunk ) then 28 else if ( highway=trunk ) then 28
else if ( highway=trunk_link ) then 27 else if ( highway=trunk_link ) then 27
else if ( highway=primary ) then 26 else if ( highway=primary ) then 26
else if ( highway=primary_link ) then 25 else if ( highway=primary_link ) then 25
else if ( highway=secondary ) then 24 else if ( highway=secondary ) then 24
else if ( highway=secondary_link ) then 23 else if ( highway=secondary_link ) then 23
else if ( highway=tertiary ) then 22 else if ( highway=tertiary ) then 22
else if ( highway=tertiary_link ) then 21 else if ( highway=tertiary_link ) then 21
else if ( highway=unclassified ) then 20 else if ( highway=unclassified ) then 20
else if ( highway=residential|living_street ) then 6 else if ( highway=residential|living_street ) then 6
else if ( highway=service ) then 6 else if ( highway=service ) then 6
else if ( highway=cycleway ) then 6 else if ( highway=cycleway ) then 6
else if ( bicycle=designated ) then 6 else if ( bicycle=designated ) then 6
else if ( highway=track ) then if tracktype=grade1 then 6 else 4 else if ( highway=track ) then if tracktype=grade1 then 6 else 4
else if ( highway=bridleway|road|path|footway ) then 4 else if ( highway=bridleway|road|path|footway ) then 4
else if ( highway=steps ) then 2 else if ( highway=steps ) then 2
else if ( highway=pedestrian ) then 2 else if ( highway=pedestrian ) then 2
else 0 else 0
assign isbadoneway = not equal onewaypenalty 0 assign isbadoneway = not equal onewaypenalty 0
assign isgoodoneway = if reversedirection=yes then oneway=-1 assign isgoodoneway = if reversedirection=yes then oneway=-1
else if oneway= then junction=roundabout else oneway=yes|true|1 else if oneway= then junction=roundabout else oneway=yes|true|1
assign isroundabout = junction=roundabout assign isroundabout = junction=roundabout
assign islinktype = highway=motorway_link|trunk_link|primary_link|secondary_link|tertiary_link assign islinktype = highway=motorway_link|trunk_link|primary_link|secondary_link|tertiary_link
assign isgoodforcars = if greater priorityclassifier 6 then true assign isgoodforcars = if greater priorityclassifier 6 then true
else if highway=residential|living_street|service then true else if highway=residential|living_street|service then true
else if ( and highway=track tracktype=grade1 ) then true else if ( and highway=track tracktype=grade1 ) then true
else false else false
assign classifiermask add isbadoneway assign classifiermask add isbadoneway
add multiply isgoodoneway 2 add multiply isgoodoneway 2
add multiply isroundabout 4 add multiply isroundabout 4
add multiply islinktype 8 add multiply islinktype 8
multiply isgoodforcars 16 multiply isgoodforcars 16
---context:node # following code refers to node tags ---context:node # following code refers to node tags
# Parameter für Knotenpunkte # Parameter für Knotenpunkte
# Kosten an Knotenpunkten in Meter # Kosten an Knotenpunkten in Meter
assign defaultaccess assign defaultaccess
switch access= switch access=
1 # add default barrier restrictions here! 1 # add default barrier restrictions here!
switch or access=private access=no switch or access=private access=no
0 0
1 1
assign bikeaccess assign bikeaccess
or nodeaccessgranted=yes or nodeaccessgranted=yes
switch bicycle= switch bicycle=
switch vehicle= switch vehicle=
defaultaccess defaultaccess
switch or vehicle=private vehicle=no switch or vehicle=private vehicle=no
0 0
1 1
switch or bicycle=private and not or highway=crossing ignore_bicycle_no or bicycle=no bicycle=dismount switch or bicycle=private and not or highway=crossing ignore_bicycle_no or bicycle=no bicycle=dismount
0 0
1 1
assign footaccess assign footaccess
or bicycle=dismount or bicycle=dismount
switch foot= switch foot=
defaultaccess defaultaccess
switch or foot=private foot=no switch or foot=private foot=no
0 0
1 1
assign initialcost assign initialcost
add switch highway=traffic_signals 250 # Kosten für Ampel add switch highway=traffic_signals 250 # Kosten für Ampel
switch highway=stop 250 # Kosten für Stoppschild switch highway=stop 250 # Kosten für Stoppschild
switch railway=crossing|level_crossing 350 # Kosten für Bahnübergang switch railway=crossing|level_crossing 350 # Kosten für Bahnübergang
switch highway=steps switch no_steps 1000000 dismount_cost #Kosten für Stufe switch highway=steps switch no_steps 1000000 dismount_cost #Kosten für Stufe
0 0
switch bikeaccess switch bikeaccess
0 0
switch footaccess switch footaccess
dismount_cost # Kosten fürs Aussteigen dismount_cost # Kosten fürs Aussteigen
1000000 #Kosten für verbotene oder private Wege 1000000 #Kosten für verbotene oder private Wege