diff options
author | mvglasow <michael -at- vonglasow.com> | 2019-09-04 23:05:39 +0300 |
---|---|---|
committer | mvglasow <michael -at- vonglasow.com> | 2019-09-04 23:05:39 +0300 |
commit | 209b872f20ed5fa8d4136c6cd5eea42314a0d4ce (patch) | |
tree | 57f0ee228d105cff867379712186fdf5dc22d96a | |
parent | 5abf5e4bb63b5d9cb53bc737df203ddff3ddebbb (diff) | |
parent | 571f8018dc18caa9294a9bd2cf415b5ea7508a58 (diff) | |
download | navit-209b872f20ed5fa8d4136c6cd5eea42314a0d4ce.tar.gz |
Merge branch 'baltic_admin_levels' of github.com:mvglasow/navit into baltic_admin_levels
-rw-r--r-- | navit/navit_shipped.xml | 39 | ||||
-rwxr-xr-x | navit/script/cabify.sh | 3 | ||||
-rwxr-xr-x | navit/startonce.sh | 20 | ||||
-rwxr-xr-x | navit/tools/cleanattr.sh | 9 | ||||
-rw-r--r-- | scripts/basic_upload_apks.py | 1 |
5 files changed, 35 insertions, 37 deletions
diff --git a/navit/navit_shipped.xml b/navit/navit_shipped.xml index 409b149e8..5473349c7 100644 --- a/navit/navit_shipped.xml +++ b/navit/navit_shipped.xml @@ -276,24 +276,27 @@ Waypoint</text></img> <roadprofile item_types="roundabout" speed="10" route_weight="10"/> <roadprofile item_types="ferry" speed="40" route_weight="40"/> </vehicleprofile> - <vehicleprofile name="bike" route_depth="18:25%,18:40000" flags="0x40000000" flags_forward_mask="0x40000000" flags_reverse_mask="0x40000000" maxspeed_handling="1" route_mode="0" static_speed="5" static_distance="25"> - <roadprofile item_types="steps" speed="2" route_weight="5" /> - <roadprofile item_types="street_pedestrian,footway" speed="5" route_weight="10" /> - <roadprofile item_types="path,track_ground" speed="12" route_weight="12" /> - <roadprofile item_types="track_gravelled" speed="17" route_weight="15" /> - <!-- cycleways, paved tracks, serviceways etc. are the favourite ways --> - <roadprofile item_types="track_paved,cycleway,street_service,street_parking_lane" speed="22" route_weight="20" /> + <vehicleprofile name="bike" route_depth="18:25%,18:40000" flags="0x40000000" flags_forward_mask="0x40000002" flags_reverse_mask="0x40000001" maxspeed_handling="1" route_mode="0" static_speed="5" static_distance="25"> + <!-- cycleways and paved tracks are the favourite ways (caveat: can be next to a main road) --> + <roadprofile item_types="track_paved,cycleway" speed="20" route_weight="20" /> <!-- residential, unclassified, living street etc. --> - <roadprofile item_types="street_0,street_1_city,living_street" speed="20" route_weight="15" /> - <!-- tertiary and minor roads are acceptable, but should be avoided in favour of tracks and cycleways --> - <roadprofile item_types="street_2_city,street_1_land,street_2_land" speed="22" route_weight="12" /> - <!-- secondary etc. are acceptable when necessary --> - <roadprofile item_types="street_3_city" speed="22" route_weight="10" /> - <!-- primary, trunk etc. should be avoided --> - <roadprofile item_types="street_4_city,ramp" speed="22" route_weight="7" /> - <!-- Those types do not appear in maptool.c and therefore are not used ATM --> - <roadprofile item_types="street_3_land,street_4_land" speed="20" route_weight="7" /> - <!--roundabout does not apply to OSMaps --> + <roadprofile item_types="street_0,street_1_city,street_1_land,living_street" speed="20" route_weight="20" /> + <!-- ways shared with pedestrians are OK if access flags permit, but lower preference (caveat: may or may not be segregated) --> + <roadprofile item_types="street_pedestrian,footway" speed="17" route_weight="17" /> + <!-- serviceways etc. are OK but lower preference --> + <roadprofile item_types="street_service,street_parking_lane" speed="17" route_weight="15" /> + <!-- tertiary roads are acceptable, but should be avoided in favour of tracks and cycleways --> + <roadprofile item_types="street_2_city,street_2_land" speed="20" route_weight="15" /> + <!-- secondary, primary and trunk are acceptable when necessary, but give preference to lower tiers --> + <roadprofile item_types="street_3_city,street_3_land" speed="20" route_weight="15" /> + <roadprofile item_types="street_4_land,street_4_city" speed="20" route_weight="12" /> + <roadprofile item_types="street_n_lanes,ramp" speed="20" route_weight="10" /> + <!-- low preference for rough terrain --> + <roadprofile item_types="path,track_ground" speed="7" route_weight="7" /> + <roadprofile item_types="track_gravelled" speed="17" route_weight="12" /> + <!-- avoid steps unless that means a huge detour --> + <roadprofile item_types="steps" speed="2" route_weight="2" /> + <!--roundabout does not apply to OSM maps --> <roadprofile item_types="roundabout" speed="20" route_weight="10"/> <roadprofile item_types="ferry" speed="40" route_weight="40"/> </vehicleprofile> @@ -414,7 +417,7 @@ Waypoint</text></img> <xi:include href="$NAVIT_SHAREDIR/maps/*.xml"/> </mapset> - <!-- Mapset template for openstreetmaps --> + <!-- Mapset template for OpenStreetMap --> <mapset enabled="no"> <map type="binfile" enabled="yes" data="/media/mmc2/MapsNavit/osm_europe.bin"/> </mapset> diff --git a/navit/script/cabify.sh b/navit/script/cabify.sh index ea6dba4b4..98a475072 100755 --- a/navit/script/cabify.sh +++ b/navit/script/cabify.sh @@ -2,8 +2,7 @@ function check_pocketcab() { - which pocketpc-cab &> /dev/null - if [ $? -ne 0 ] + if ! which pocketpc-cab &> /dev/null then echo "You don't have pocketpc-cab installed or not in PATH" exit diff --git a/navit/startonce.sh b/navit/startonce.sh index 3e27d77f0..04220b33b 100755 --- a/navit/startonce.sh +++ b/navit/startonce.sh @@ -21,9 +21,8 @@ NAVIT="./navit" function check_wmctrl() { - which wmctrl > /dev/null - - if [ $? -ne 0 ] ; then + if ! which wmctrl > /dev/null + then echo "I need the 'wmctrl' program. Exit." exit 1 fi @@ -39,9 +38,8 @@ function start_navit() pid=$! - echo -n "$pid" > $PIDFILE - - if [ $? -eq 0 ] ; then + if ! echo -n "$pid" > $PIDFILE + then echo "Started navit with PID $pid." else kill $pid @@ -59,12 +57,12 @@ function check_navit() { if [ -f $PIDFILE ] ; then pid=$(cat $PIDFILE) - kill -0 $pid 2>/dev/null - if [ $? -eq 0 ] ; then - echo "Bringing Navit to front" + if ! kill -0 $pid 2>/dev/null + then + echo "Bringing Navit to front" - winid=$(wmctrl -l -p | grep -e "^[^:blank:]*[:blank:]*[^:blank:]*[:blank:]*$pid[:blank:]*" | sed 's/ .*//') - wmctrl -i -R $winid + winid=$(wmctrl -l -p | grep -e "^[^:blank:]*[:blank:]*[^:blank:]*[:blank:]*$pid[:blank:]*" | sed 's/ .*//') + wmctrl -i -R $winid exit 0 fi diff --git a/navit/tools/cleanattr.sh b/navit/tools/cleanattr.sh index 200db5b66..c5e36792a 100755 --- a/navit/tools/cleanattr.sh +++ b/navit/tools/cleanattr.sh @@ -20,8 +20,8 @@ if [ -f $TMPFILE ] ; then exit 1; fi -touch $TMPFILE -if [ $? -ne 0 ] ; then +if ! touch $TMPFILE +then echo "Could not write to temporary file $TEMPFILE." echo "Please make sure you have write access to the temporary directory." exit 1; @@ -35,9 +35,8 @@ cp $ATTRFILE $TMPFILE for ATTRNAME in $ATTRLIST ; do ATTR="attr_$ATTRNAME" - grep -rI $ATTR ./* > /dev/null - - if [ $? -ne 0 ] ; then + if ! grep -rI $ATTR ./* > /dev/null + then echo "Unused attribute: $ATTR" grep -v "ATTR($ATTRNAME)" $TMPFILE > $TMPFILE2 mv $TMPFILE2 $TMPFILE diff --git a/scripts/basic_upload_apks.py b/scripts/basic_upload_apks.py index b4b439536..1bd911f15 100644 --- a/scripts/basic_upload_apks.py +++ b/scripts/basic_upload_apks.py @@ -79,4 +79,3 @@ def main(argv): if __name__ == '__main__': main(sys.argv) - |