Codebase list mkgmap / e99c0f1
Imported Upstream version 0.0.0+svn3498 Bas Couwenberg 9 years ago
7 changed file(s) with 72 addition(s) and 42 deletion(s). Raw diff Collapse all Expand all
5858 [options="header"]
5959 |=========================================================
6060 | Tag | Description | Required mkgmap option
61 | +mkgmap:way-has-pois+ | +true+ for ways that have at least one point with a tag +access=\*+, +barrier=\*+, or +highway=*+ | 'link-pois-to-ways'
62 | +mkgmap:dead-end-check+ | Set to +false+ to disable the dead end check for a specific way | 'report-dead-ends'
63 | +mkgmap:flare-check+ | Set to +true+ to force the flare check for a specific way, set to +false+ to disable it | 'check-roundabout-flares'
64 | +mkgmap:dir-check+ | Set to +false+ to tell mkgmap to ignore the way when checking roundabouts for clockwise direction | 'check-roundabouts'
65 | +mkgmap:no-dir-check+ | Set to +true+ to tell mkgmap to ignore the way when checking roundabouts for clockwise direction | 'check-roundabouts'
66
67 |=========================================================
68
61 | +mkgmap:way-has-pois+ | +true+ for ways that have at least one point with a tag +access=\*+, +barrier=\*+, or +highway=*+ | 'link-pois-to-ways'
62 | +mkgmap:dead-end-check+ | Set to +false+ to disable the dead end check for a specific way | 'report-dead-ends'
63 | +mkgmap:flare-check+ | Set to +true+ to force the flare check for a specific way, set to +false+ to disable it | 'check-roundabout-flares'
64 | +mkgmap:dir-check+ | Set to +false+ to tell mkgmap to ignore the way when checking roundabouts for direction | 'check-roundabouts'
65 | +mkgmap:no-dir-check+ | Set to +true+ to tell mkgmap to ignore the way when checking roundabouts for direction | 'check-roundabouts'
66 | +mkgmap:synthesised+ | Set to +true+ to tell mkgmap that this is an additional way created using the continue statement in an action block and that it should be excluded from checks | 'check-roundabouts', 'check-roundabout-flares'
67
68 |=========================================================
69
6970
7071 .POI address tags
7172 [options="header"]
726726 stacking two lines on top of each other.
727727 For example if you want to mark a bridge in a distinctive way you
728728 could match on +bridge=yes+, you would then almost always use +continue+ so
729 that the +highway+ tag could be matched later. If you failed to do this
730 then there might be a break in the road for routing purposes.
731
732 Note that by default when using the _continue_ statement the action block
733 of the rule (if there is one) will only be applied _within this rule_ and
734 not during any following rule matches. Use the _continue with_actions_
735 statement if you want to change this behaviour (see next section).
729 that the +highway+ tag could be matched later. If you failed to do this
730 then there might be a break in the road for routing purposes.
731
732 Note that when using the _continue_ statement, the action block
733 of the rule (if there is one) will only be applied _within this rule_ and
734 not during any following rule matches. Use the _continue with_actions_
735 statement if you want to change this behaviour (see next section).
736736
737737 === continue with_actions ===
738738 The with_actions statement modifies the continue behaviour in such a way,
0 svn.version: 3478
1 build.timestamp: 2015-02-26T07:49:21+0000
0 svn.version: 3498
1 build.timestamp: 2015-03-18T08:13:59+0000
00 #
1 # Sets the road speed based on the maxspeed tag.
2 # In case mkgmap:road-speed-class is set the element
3 # road_speed is overriden.
1 # Sets the maximum road speed based on the maxspeed tag.
2 # In case mkgmap:road-speed-max is set the element road_speed is limited.
43 #
54 # road_speed classification:
65 # road_speed | highest speed
1413 # 0 | 3 mph / 5 km/h
1514 #
1615
17 maxspeed=* & mkgmap:road-speed-class!=* & maxspeedkmh() > 110 { set mkgmap:road-speed-class = 7 }
18 maxspeed=* & mkgmap:road-speed-class!=* & maxspeedkmh() > 90 { set mkgmap:road-speed-class = 6 }
19 maxspeed=* & mkgmap:road-speed-class!=* & maxspeedkmh() > 80 { set mkgmap:road-speed-class = 5 }
20 maxspeed=* & mkgmap:road-speed-class!=* & maxspeedkmh() > 60 { set mkgmap:road-speed-class = 4 }
21 maxspeed=* & mkgmap:road-speed-class!=* & maxspeedkmh() > 40 { set mkgmap:road-speed-class = 3 }
22 maxspeed=* & mkgmap:road-speed-class!=* & maxspeedkmh() > 20 { set mkgmap:road-speed-class = 2 }
23 # change class 1 to 10 km/h which is not correct but better handles living_streets with maxspeed=7
24 maxspeed=* & mkgmap:road-speed-class!=* & maxspeedkmh() > 10 { set mkgmap:road-speed-class = 1 }
25 maxspeed=* & mkgmap:road-speed-class!=* & maxspeedkmh()=* { set mkgmap:road-speed-class = 0 }
16 maxspeed=walk { set maxspeed=10 }
17 maxspeed~'.*:living_street' { set maxspeed=10 }
18
19 maxspeed=RU:urban { set maxspeed=60 }
20 maxspeed=UA:urban { set maxspeed=60 }
21 maxspeed~'.*:urban' { set maxspeed=50 }
22
23 maxspeed=AT:rural { set maxspeed=100 }
24 maxspeed=DE:rural { set maxspeed=100 }
25 maxspeed~'.*:rural' { set maxspeed=90 }
26
27 maxspeed~'.*:trunk' { set maxspeed=100 }
28 maxspeed~'.*:motorway' { set maxspeed=130 }
29
30 # delete maxspeed if we still cannot convert it to km/h
31 maxspeed=* & maxspeedkmh()!=* { delete maxspeed }
32
33 maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() <= 10 { set mkgmap:road-speed-max = 0 }
34 maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() <= 25 { set mkgmap:road-speed-max = 1 }
35 maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() <= 45 { set mkgmap:road-speed-max = 2 }
36 maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() <= 60 { set mkgmap:road-speed-max = 3 }
37 maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() <= 85 { set mkgmap:road-speed-max = 4 }
38 maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() <= 100 { set mkgmap:road-speed-max = 5 }
39 maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() <= 120 { set mkgmap:road-speed-max = 6 }
40 # mkgmap:road-speed-max = 7 has no effect
41 #maxspeed=* & mkgmap:road-speed-max!=* { set mkgmap:road-speed-max = 7 }
166166 Sort sort = getConfig().getSort();
167167 List<SortKey<Mdr7Record>> sortedStreets = new ArrayList<>(allStreets.size());
168168 for (Mdr7Record m : allStreets) {
169 String partialName = m.getPartialName();
170 String name = m.getName();
171 SortKey<Mdr7Record> nameKey = sort.createSortKey(m, m.getName(), m.getMapIndex());
172 SortKey<Mdr7Record> partialKey = name.equals(partialName) ? nameKey : sort.createSortKey(m, partialName);
173 MultiSortKey<Mdr7Record> sortKey = new MultiSortKey<>(partialKey, nameKey, null);
174 sortedStreets.add(sortKey);
169 sortedStreets.add(new MultiSortKey<>(
170 sort.createSortKey(m, m.getPartialName()),
171 sort.createSortKey(m, m.getInitialPart(), m.getMapIndex()),
172 null));
175173 }
176174 Collections.sort(sortedStreets);
177175
6868 return city;
6969 }
7070
71 public int getNameOffset() {
72 return nameOffset & 0xff;
73 }
74
7175 public void setNameOffset(byte nameOffset) {
7276 this.nameOffset = nameOffset;
7377 }
108112 public String toString() {
109113 return name + " in " + city.getName();
110114 }
115
116 public String getInitialPart() {
117 return name.substring(0, (nameOffset & 0xff));
118 }
111119 }
455455 Way cycleWay = new Way(way.getId(), way.getPoints());
456456 cycleWay.copyTags(way);
457457
458 String name = way.getTag("name");
459 if(name != null)
460 name += " (cycleway)";
461 else
462 name = "cycleway";
463 cycleWay.addTag("name", name);
464458 cycleWay.addTag("access", "no");
465459 cycleWay.addTag("bicycle", "yes");
466 cycleWay.addTag("foot", "no");
467460 cycleWay.addTag("mkgmap:synthesised", "yes");
468461 cycleWay.addTag(onewayTagKey, "no");
462 // remove explicit access tags
463 cycleWay.deleteTag("foot");
464 cycleWay.deleteTag("motorcar");
465 cycleWay.deleteTag("goods");
466 cycleWay.deleteTag("hgv");
467 cycleWay.deleteTag("bus");
468 cycleWay.deleteTag("taxi");
469 cycleWay.deleteTag("emergency");
470 cycleWay.deleteTag("vehicle");
471 cycleWay.deleteTag("motor_vehicle");
472 cycleWay.deleteTag("carpool");
473 cycleWay.deleteTag("motorcycle");
474 cycleWay.deleteTag("psv");
475 cycleWay.deleteTag("truck");
469476 return cycleWay;
470477 }
471478