New upstream version 0.0.0+svn4565
Bas Couwenberg
3 years ago
206 | 206 | ;--mdr7-excl=name[,name...] |
207 | 207 | : Specify words which should be omitted from the road index. |
208 | 208 | It was added before option road-name-config and is probably no longer needed. |
209 | : Example usage: --x-mdr7-excl="Road, Street, Weg" | |
209 | : Example usage: --mdr7-excl="Road, Street, Weg" | |
210 | 210 | |
211 | 211 | ;--mdr7-del=name[,name...] |
212 | 212 | : Use this option if your style adds strings to the labels of roads which you |
204 | 204 | --mdr7-excl=name[,name...] |
205 | 205 | Specify words which should be omitted from the road index. It was added |
206 | 206 | before option road-name-config and is probably no longer needed. |
207 | Example usage: --x-mdr7-excl="Road, Street, Weg" | |
207 | Example usage: --mdr7-excl="Road, Street, Weg" | |
208 | 208 | |
209 | 209 | --mdr7-del=name[,name...] |
210 | 210 | Use this option if your style adds strings to the labels of roads which you |
0 | svn.version: 4555 | |
1 | build.timestamp: 2020-06-22T17:00:46+0100 | |
0 | svn.version: 4565 | |
1 | build.timestamp: 2020-07-22T20:17:43+0100 |
12 | 12 | # 1 | 15 mph / 20 km/h |
13 | 13 | # 0 | 3 mph / 5 km/h |
14 | 14 | # |
15 | ||
16 | maxspeed:advisory=* {set maxspeed='${maxspeed:advisory}'} | |
17 | #maxspeed:practial=* {set maxspeed='${maxspeed:practial}'} | |
18 | # maxspeed:practial is disabled here in the default style because verifiability of it is disputed. | |
19 | # see: https://wiki.openstreetmap.org/wiki/Key:maxspeed:practical | |
15 | 20 | |
16 | 21 | maxspeed=walk { set maxspeed=10 } |
17 | 22 | maxspeed~'.*:living_street' { set maxspeed=10 } |
39 | 44 | maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() <= 120 { set mkgmap:road-speed-max = 6 } |
40 | 45 | # mkgmap:road-speed-max = 7 has no effect |
41 | 46 | #maxspeed=* & mkgmap:road-speed-max!=* { set mkgmap:road-speed-max = 7 } |
47 | ||
48 | # Experiments with Garmin devices have deduced 7/unlimited speed to be device dependent; values of 112 & | |
49 | # 132 km/h (70, 82 mph) seen: http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2014q3/021620.html | |
50 | # The following rule limits it for all countries except Germany. A few other roads elsewhere are unlimited | |
51 | # and they would be expected to have a maxspeed:* tag that will override this. | |
52 | highway=motorway & maxspeed!=* & mkgmap:road-speed-max!=* & mkgmap:country!=DEU {set mkgmap:road-speed-max=6} |
2316 | 2316 | ;1 |
2317 | 2317 | [end] |
2318 | 2318 | [_point] |
2319 | type=0x021 | |
2319 | type=0x020 | |
2320 | 2320 | subtype=0x00 |
2321 | 2321 | ;GRMN_TYPE: // |
2322 | 2322 | String=Exit |
2340 | 2340 | ;12345678 |
2341 | 2341 | [end] |
2342 | 2342 | [_point] |
2343 | type=0x021 | |
2343 | type=0x023 | |
2344 | 2344 | subtype=0x0f |
2345 | 2345 | ;GRMN_TYPE: // |
2346 | 2346 | String=Services |
150 | 150 | private final boolean linkPOIsToWays; |
151 | 151 | private final boolean mergeRoads; |
152 | 152 | private final boolean routable; |
153 | private boolean forceEndNodesRoutingNodes; | |
153 | 154 | private final Tags styleOptionTags; |
154 | 155 | private static final String STYLE_OPTION_PREF = "mkgmap:option:"; |
155 | 156 | private final PrefixSuffixFilter prefixSuffixFilter; |
223 | 224 | admLevelNod3 = props.getProperty("add-boundary-nodes-at-admin-boundaries", 2); |
224 | 225 | addBoundaryNodesAtAdminBoundaries = routable && admLevelNod3 > 0; |
225 | 226 | keepBlanks = props.containsKey("keep-blanks"); |
227 | forceEndNodesRoutingNodes = !props.getProperty("no-force-end-nodes-routing-nodes", false); | |
226 | 228 | } |
227 | 229 | |
228 | 230 | /** |
514 | 516 | |
515 | 517 | /** One type result for nodes to avoid recreating one for each node. */ |
516 | 518 | private NodeTypeResult nodeTypeResult = new NodeTypeResult(); |
519 | ||
517 | 520 | |
518 | 521 | private class NodeTypeResult implements TypeResult { |
519 | 522 | private Node node; |
966 | 969 | if ("left".equals(driveOn) && numDriveOnLeftRoads == 0 && numDriveOnRightRoads > 0) |
967 | 970 | log.warn("The drive-on-left flag is set but tile contains only drive-on-right roads"); |
968 | 971 | if ("right".equals(driveOn) && numDriveOnRightRoads == 0 && numDriveOnLeftRoads > 0) |
969 | log.warn("The drive-on-left flag is NOT set used but tile contains only drive-on-left roads"); | |
972 | log.warn("The drive-on-left flag is NOT set but tile contains only drive-on-left roads"); | |
970 | 973 | } |
971 | 974 | assert dol != null; |
972 | 975 | return dol; |
1498 | 1501 | */ |
1499 | 1502 | private void addRoadAfterSplittingLoops(ConvertedWay cw) { |
1500 | 1503 | Way way = cw.getWay(); |
1504 | ||
1505 | if (routable && (forceEndNodesRoutingNodes || wayRelMap.containsKey(way.getId()))) { | |
1506 | // make sure the way has nodes at each end | |
1507 | way.getPoints().get(0).incHighwayCount(); | |
1508 | way.getPoints().get(way.getPoints().size() - 1).incHighwayCount(); | |
1509 | } | |
1510 | ||
1501 | 1511 | // check if the way is a loop or intersects with itself |
1502 | 1512 | |
1503 | 1513 | boolean wayWasSplit = true; // aka rescan required |
2107 | 2117 | int replType = -1; |
2108 | 2118 | try { |
2109 | 2119 | replType = Integer.decode(replTypeString); |
2110 | if (GType.isRoutableLineType(replType)) { | |
2120 | if (GType.isSpecialRoutableLineType(replType)) { | |
2111 | 2121 | replType = -1; |
2112 | 2122 | log.error("type value in", tagKey, "should not be a routable type:" + replTypeString); |
2113 | 2123 | } |
259 | 259 | * known to cause routing errors if used for non-routable lines. |
260 | 260 | */ |
261 | 261 | public static boolean isSpecialRoutableLineType(int type){ |
262 | return type >= 0x01 && type <= 0x13 || type == 0x16 || type == 0x1a || type == 0x1b; | |
262 | return type >= 0x01 && type <= 0x13 || type == 0x16 || type == 0x1a || type == 0x1b || type >= 0x2c && type <= 0x2f; | |
263 | 263 | } |
264 | 264 | |
265 | 265 | /** |
47 | 47 | private long firstNodeRef; |
48 | 48 | private long lastNodeRef; |
49 | 49 | private boolean missingNodeRef; |
50 | private boolean removeEmptyValue = true; | |
50 | 51 | |
51 | 52 | /** |
52 | 53 | * Set a set of tags with values that are to be deleted on input. |
100 | 101 | * should be discarded. |
101 | 102 | */ |
102 | 103 | protected String keepTag(String key, String val) { |
103 | if (val.isEmpty()) | |
104 | if (removeEmptyValue && val.isEmpty()) | |
104 | 105 | return null; |
105 | 106 | if(deletedTags != null) { |
106 | 107 | Set<String> vals = deletedTags.get(key); |
205 | 206 | this.removeFixme = b; |
206 | 207 | } |
207 | 208 | |
209 | /** | |
210 | * Enable removal of tags / value pairs where value is empty. | |
211 | * @param b true: enable the filter | |
212 | */ | |
213 | public void setDeleteEmptyValueTag(boolean b) { | |
214 | this.removeEmptyValue= b; | |
215 | } | |
216 | ||
208 | 217 | public boolean isIgnoreBounds() { |
209 | 218 | return ignoreBounds; |
210 | 219 | } |
233 | 242 | */ |
234 | 243 | |
235 | 244 | public abstract void parse(InputStream is) throws FormatException; |
245 | ||
236 | 246 | } |