Добавил патч для запрета проезда через шлагбаумы
parent
316cc49212
commit
03672af919
|
@ -13,8 +13,6 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
|
|||
DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs gyp && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ADD geos-3.7.diff /home
|
||||
|
||||
RUN mkdir /home/valhalla && \
|
||||
cd /home/valhalla && \
|
||||
git clone https://github.com/kevinkreiser/prime_server && \
|
||||
|
@ -28,8 +26,12 @@ RUN cd /home/valhalla && \
|
|||
cd /home/valhalla/valhalla && \
|
||||
git submodule update --init --recursive
|
||||
|
||||
ADD geos-3.7.diff /home
|
||||
ADD private-access.diff /home
|
||||
|
||||
RUN cd /home/valhalla/valhalla && \
|
||||
patch -p1 < /home/geos-3.7.diff && \
|
||||
patch -p1 < /home/private-access.diff && \
|
||||
npm install node-cmake && \
|
||||
cd /home/valhalla/valhalla && mkdir build && cd build && cmake .. && make -j4 install && \
|
||||
tar -cf /home/valhalla/valhalla.tar -T install_manifest.txt && \
|
||||
|
|
|
@ -0,0 +1,232 @@
|
|||
diff --git a/lua/graph.lua b/lua/graph.lua
|
||||
index 2fa78fe01..dd417d11e 100644
|
||||
--- a/lua/graph.lua
|
||||
+++ b/lua/graph.lua
|
||||
@@ -76,7 +76,7 @@ default_speed = {
|
||||
|
||||
access = {
|
||||
["yes"] = "true",
|
||||
-["private"] = "true",
|
||||
+["private"] = "false",
|
||||
["no"] = "false",
|
||||
["permissive"] = "true",
|
||||
["agricultural"] = "false",
|
||||
@@ -90,7 +90,7 @@ access = {
|
||||
["customers"] = "true",
|
||||
["official"] = "false",
|
||||
["public"] = "true",
|
||||
-["restricted"] = "true",
|
||||
+["restricted"] = "false",
|
||||
["allowed"] = "true",
|
||||
["emergency"] = "false"
|
||||
}
|
||||
@@ -133,7 +133,7 @@ use = {
|
||||
|
||||
motor_vehicle = {
|
||||
["yes"] = "true",
|
||||
-["private"] = "true",
|
||||
+["private"] = "false",
|
||||
["no"] = "false",
|
||||
["permissive"] = "true",
|
||||
["agricultural"] = "false",
|
||||
@@ -145,14 +145,14 @@ motor_vehicle = {
|
||||
["customers"] = "true",
|
||||
["official"] = "false",
|
||||
["public"] = "true",
|
||||
-["restricted"] = "true",
|
||||
+["restricted"] = "false",
|
||||
["allowed"] = "true"
|
||||
}
|
||||
|
||||
moped = {
|
||||
["yes"] = "true",
|
||||
["designated"] = "true",
|
||||
-["private"] = "true",
|
||||
+["private"] = "false",
|
||||
["permissive"] = "true",
|
||||
["destination"] = "true",
|
||||
["delivery"] = "true",
|
||||
@@ -164,7 +164,7 @@ moped = {
|
||||
|
||||
foot = {
|
||||
["yes"] = "true",
|
||||
-["private"] = "true",
|
||||
+["private"] = "false",
|
||||
["no"] = "false",
|
||||
["permissive"] = "true",
|
||||
["agricultural"] = "false",
|
||||
@@ -177,7 +177,7 @@ foot = {
|
||||
["customers"] = "true",
|
||||
["official"] = "true",
|
||||
["public"] = "true",
|
||||
-["restricted"] = "true",
|
||||
+["restricted"] = "false",
|
||||
["crossing"] = "true",
|
||||
["sidewalk"] = "true",
|
||||
["allowed"] = "true",
|
||||
@@ -195,7 +195,7 @@ wheelchair = {
|
||||
["public"] = "true",
|
||||
["permissive"] = "true",
|
||||
["only"] = "true",
|
||||
-["private"] = "true",
|
||||
+["private"] = "false",
|
||||
["impassable"] = "false",
|
||||
["partial"] = "false",
|
||||
["bad"] = "false",
|
||||
@@ -209,7 +209,7 @@ bus = {
|
||||
["designated"] = "true",
|
||||
["urban"] = "true",
|
||||
["permissive"] = "true",
|
||||
-["restricted"] = "true",
|
||||
+["restricted"] = "false",
|
||||
["destination"] = "true",
|
||||
["delivery"] = "false",
|
||||
["official"] = "false"
|
||||
@@ -233,7 +233,7 @@ truck = {
|
||||
["delivery"] = "true",
|
||||
["local"] = "true",
|
||||
["agricultural"] = "false",
|
||||
-["private"] = "true",
|
||||
+["private"] = "false",
|
||||
["discouraged"] = "false",
|
||||
["permissive"] = "false",
|
||||
["unsuitable"] = "false",
|
||||
@@ -281,7 +281,7 @@ bicycle = {
|
||||
["share_busway"] = "true",
|
||||
["none"] = "false",
|
||||
["allowed"] = "true",
|
||||
-["private"] = "true",
|
||||
+["private"] = "false",
|
||||
["official"] = "true"
|
||||
}
|
||||
|
||||
@@ -299,7 +299,7 @@ cycleway = {
|
||||
["sidepath"] = "true",
|
||||
["share_busway"] = "true",
|
||||
["allowed"] = "true",
|
||||
-["private"] = "true",
|
||||
+["private"] = "false",
|
||||
["cyclestreet"] = "true",
|
||||
["crossing"] = "true"
|
||||
}
|
||||
@@ -372,7 +372,7 @@ toll = {
|
||||
--node proc needs the same info as above but in the form of a mask so duplicate..
|
||||
motor_vehicle_node = {
|
||||
["yes"] = 1,
|
||||
-["private"] = 1,
|
||||
+["private"] = 0,
|
||||
["no"] = 0,
|
||||
["permissive"] = 1,
|
||||
["agricultural"] = 0,
|
||||
@@ -384,7 +384,7 @@ motor_vehicle_node = {
|
||||
["customers"] = 1,
|
||||
["official"] = 0,
|
||||
["public"] = 1,
|
||||
-["restricted"] = 1,
|
||||
+["restricted"] = 0,
|
||||
["allowed"] = 1
|
||||
}
|
||||
|
||||
@@ -404,13 +404,13 @@ bicycle_node = {
|
||||
["share_busway"] = 4,
|
||||
["none"] = 0,
|
||||
["allowed"] = 4,
|
||||
-["private"] = 4,
|
||||
+["private"] = 0,
|
||||
["official"] = 4
|
||||
}
|
||||
|
||||
foot_node = {
|
||||
["yes"] = 2,
|
||||
-["private"] = 2,
|
||||
+["private"] = 0,
|
||||
["no"] = 0,
|
||||
["permissive"] = 2,
|
||||
["agricultural"] = 0,
|
||||
@@ -423,7 +423,7 @@ foot_node = {
|
||||
["customers"] = 2,
|
||||
["official"] = 2,
|
||||
["public"] = 2,
|
||||
-["restricted"] = 2,
|
||||
+["restricted"] = 0,
|
||||
["crossing"] = 2,
|
||||
["sidewalk"] = 2,
|
||||
["allowed"] = 2,
|
||||
@@ -441,7 +441,7 @@ wheelchair_node = {
|
||||
["public"] = 256,
|
||||
["permissive"] = 256,
|
||||
["only"] = 256,
|
||||
-["private"] = 256,
|
||||
+["private"] = 0,
|
||||
["impassable"] = 0,
|
||||
["partial"] = 0,
|
||||
["bad"] = 0,
|
||||
@@ -452,7 +452,7 @@ wheelchair_node = {
|
||||
moped_node = {
|
||||
["yes"] = 512,
|
||||
["designated"] = 512,
|
||||
-["private"] = 512,
|
||||
+["private"] = 0,
|
||||
["permissive"] = 512,
|
||||
["destination"] = 512,
|
||||
["delivery"] = 512,
|
||||
@@ -464,7 +464,7 @@ moped_node = {
|
||||
|
||||
motor_cycle_node = {
|
||||
["yes"] = 1024,
|
||||
-["private"] = 1024,
|
||||
+["private"] = 0,
|
||||
["no"] = 0,
|
||||
["permissive"] = 1024,
|
||||
["agricultural"] = 0,
|
||||
@@ -476,7 +476,7 @@ motor_cycle_node = {
|
||||
["customers"] = 1024,
|
||||
["official"] = 0,
|
||||
["public"] = 1024,
|
||||
-["restricted"] = 1024,
|
||||
+["restricted"] = 0,
|
||||
["allowed"] = 1024
|
||||
}
|
||||
|
||||
@@ -486,7 +486,7 @@ bus_node = {
|
||||
["designated"] = 64,
|
||||
["urban"] = 64,
|
||||
["permissive"] = 64,
|
||||
-["restricted"] = 64,
|
||||
+["restricted"] = 0,
|
||||
["destination"] = 64,
|
||||
["delivery"] = 0,
|
||||
["official"] = 0,
|
||||
@@ -500,7 +500,7 @@ truck_node = {
|
||||
["delivery"] = 8,
|
||||
["local"] = 8,
|
||||
["agricultural"] = 0,
|
||||
-["private"] = 8,
|
||||
+["private"] = 0,
|
||||
["discouraged"] = 0,
|
||||
["permissive"] = 0,
|
||||
["unsuitable"] = 0,
|
||||
@@ -1590,6 +1590,13 @@ function nodes_proc (kv, nokeys)
|
||||
local moped = moped_tag or 512
|
||||
local motorcycle = motorcycle_tag or 1024
|
||||
|
||||
+ --check for gates and bollards
|
||||
+ local gate = kv["barrier"] == "gate" or kv["barrier"] == "lift_gate"
|
||||
+ local bollard = false
|
||||
+ if gate == true and not kv["access"] then
|
||||
+ access = "false"
|
||||
+ end
|
||||
+
|
||||
--if access = false use tag if exists, otherwise no access for that mode.
|
||||
if (access == "false" or kv["vehicle"] == "no" or kv["hov"] == "designated") then
|
||||
auto = auto_tag or 0
|
||||
@@ -1609,9 +1616,6 @@ function nodes_proc (kv, nokeys)
|
||||
hov = hov_tag or 0
|
||||
end
|
||||
|
||||
- --check for gates and bollards
|
||||
- local gate = kv["barrier"] == "gate" or kv["barrier"] == "lift_gate"
|
||||
- local bollard = false
|
||||
if gate == false then
|
||||
--if there was a bollard cars can't get through it
|
||||
bollard = kv["barrier"] == "bollard" or kv["barrier"] == "block" or kv["bollard"] == "removable" or false
|
Loading…
Reference in New Issue