Hi Gerd

Attached is a patch that doesn't assign a driving side to more types of
ways where it is not relevant. This speeds up processing slightly and,
in some circumstances, stop the warning:
"Tile contains both drive-on-left (#) and drive-on-right roads (#)"

Previously ferries were ignored, this patch additional ignores one-way
roads and roads that don't allow motor vehicles (eg footpaths &
cycleways)

Ticker
Index: src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java	(revision 4574)
+++ src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java	(working copy)
@@ -305,6 +305,7 @@
 			
 			boolean wasReversed = false;
 			String oneWay = way.getTag(TK_ONEWAY);
+			boolean noDrivingSide = false;
 			if (oneWay != null){
 				if("-1".equals(oneWay) || "reverse".equals(oneWay)) {
 					// it's a oneway street in the reverse direction
@@ -313,10 +314,12 @@
 					way.reverse();
 					wasReversed = true;
 					way.addTag(TK_ONEWAY, "yes");
+					noDrivingSide = true;
 				}
 
 				if (way.tagIsLikeYes(TK_ONEWAY)) {
 					way.addTag(TK_ONEWAY, "yes");
+					noDrivingSide = true;
 					if (foundType.isRoad() && hasSkipDeadEndCheckNode(way))
 						way.addTag("mkgmap:dead-end-check", "false");
 				} else { 
@@ -328,7 +331,7 @@
 			if (cw.isRoad()){
 				roads.add(cw);
 				numRoads++;
-				if (!cw.isFerry()) {
+				if (!noDrivingSide && !cw.isFerry() && (cw.getAccess() & ~(AccessTagsAndBits.FOOT|AccessTagsAndBits.BIKE)) != 0) {
 					String countryIso = LocatorConfig.get().getCountryISOCode(way.getTag(TKM_COUNTRY));
 					if (countryIso != null) {
 						boolean drivingSideIsLeft = LocatorConfig.get().getDriveOnLeftFlag(countryIso);
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to