Index: src/uk/me/parabola/imgfmt/app/net/RoadDef.java
===================================================================
--- src/uk/me/parabola/imgfmt/app/net/RoadDef.java	(revision 4287)
+++ src/uk/me/parabola/imgfmt/app/net/RoadDef.java	(working copy)
@@ -29,7 +29,6 @@
 import uk.me.parabola.imgfmt.MapFailedException;
 import uk.me.parabola.imgfmt.Utils;
 import uk.me.parabola.imgfmt.app.BitWriter;
-import uk.me.parabola.imgfmt.app.Coord;
 import uk.me.parabola.imgfmt.app.ImgFileWriter;
 import uk.me.parabola.imgfmt.app.Label;
 import uk.me.parabola.imgfmt.app.lbl.City;
@@ -232,8 +231,11 @@
 		writeLevelDivs(writer, maxlevel);
 
 		if((netFlags & NET_FLAG_ADDRINFO) != 0) {
-			nodeCount--;
-			if (nodeCount + 2 != nnodes){
+			if (nodeCount > 0) {
+				// the very first and last nodes of the polylines making up this road are not counted
+				nodeCount -= 2;
+			}
+			if (nnodes > 0 && nodeCount + 2 != nnodes){
 				log.error("internal error? The nodeCount doesn't match value calculated by RoadNetWork:",this);
 			}
 			writer.put1u(nodeCount & 0xff); // lo bits of node count
@@ -392,6 +394,8 @@
 
 		if (level == 0) {
 			nodeCount += pl.getNodeCount(hasHouseNumbers());
+			if (l.size() > 1)
+				nodeCount--;
 		}
 	}
 
Index: src/uk/me/parabola/imgfmt/app/trergn/Polyline.java
===================================================================
--- src/uk/me/parabola/imgfmt/app/trergn/Polyline.java	(revision 4287)
+++ src/uk/me/parabola/imgfmt/app/trergn/Polyline.java	(working copy)
@@ -278,19 +278,12 @@
 	}
 
 	/**
-	 * 
+	 * Count the number of special nodes.
 	 * @param countAllNodes : false: count only coord nodes, true: count number nodes
-	 * @return
+	 * @return the number of coord nodes or the number of nodes which are number nodes (coord nodes are always number nodes)
 	 */
 	public int getNodeCount(boolean countAllNodes ) {
-		int idx = 0;
-		int count = 0;
-		
-		for (Coord co : points) {
-			if (idx++ > 0 && (co.getId() > 0 || countAllNodes && co.isNumberNode()))
-				count++;
-		}
-		return count;
+		return (int) points.stream().filter(c -> c.getId() > 0 || countAllNodes && c.isNumberNode()).count();
 	}
 
 	public boolean hasHouseNumbers() {
Index: src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java	(revision 4287)
+++ src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java	(working copy)
@@ -1800,7 +1800,7 @@
 					arcLength += d;
 				}
 			}
-			if(p.getHighwayCount() > 1 || p.getOnCountryBorder()) {
+			if(routable && (p.getHighwayCount() > 1 || p.getOnCountryBorder())) {
 				// this point is a node connecting highways
 				CoordNode coordNode = nodeIdMap.get(p);
 				if(coordNode == null) {
Index: src/uk/me/parabola/mkgmap/osmstyle/housenumber/HousenumberGenerator.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/housenumber/HousenumberGenerator.java	(revision 4287)
+++ src/uk/me/parabola/mkgmap/osmstyle/housenumber/HousenumberGenerator.java	(working copy)
@@ -446,6 +446,8 @@
 	public void addRoad(Way osmRoad, MapRoad road) {
 		allRoads.add(road);
 		if (numbersEnabled) {
+			road.getPoints().get(0).setNumberNode(true);
+			road.getPoints().get(road.getPoints().size() - 1).setNumberNode(true);
 			if("false".equals(osmRoad.getTag(numbersTagKey))) 
 				road.setSkipHousenumberProcessing(true);
 			
Index: src/uk/me/parabola/mkgmap/reader/polish/PolishMapDataSource.java
===================================================================
--- src/uk/me/parabola/mkgmap/reader/polish/PolishMapDataSource.java	(revision 4287)
+++ src/uk/me/parabola/mkgmap/reader/polish/PolishMapDataSource.java	(working copy)
@@ -38,6 +38,7 @@
 import java.util.Map;
 
 import uk.me.parabola.imgfmt.FormatException;
+import uk.me.parabola.imgfmt.MapFailedException;
 import uk.me.parabola.imgfmt.Utils;
 import uk.me.parabola.imgfmt.app.Area;
 import uk.me.parabola.imgfmt.app.Coord;
@@ -54,10 +55,12 @@
 import uk.me.parabola.mkgmap.general.MapElement;
 import uk.me.parabola.mkgmap.general.MapLine;
 import uk.me.parabola.mkgmap.general.MapPoint;
+import uk.me.parabola.mkgmap.general.MapRoad;
 import uk.me.parabola.mkgmap.general.MapShape;
 import uk.me.parabola.mkgmap.general.ZipCodeInfo;
 import uk.me.parabola.mkgmap.reader.MapperBasedMapDataSource;
 import uk.me.parabola.mkgmap.reader.osm.FakeIdGenerator;
+import uk.me.parabola.mkgmap.reader.osm.GType;
 import uk.me.parabola.mkgmap.reader.osm.GeneralRelation;
 import uk.me.parabola.mkgmap.reader.osm.MultiPolygonRelation;
 import uk.me.parabola.mkgmap.reader.osm.Way;
@@ -113,6 +116,10 @@
 
 	private boolean havePolygon4B;
 
+	/** if false, assume that lines with routable types are roads and create corresponding NET data */ 
+	private boolean routing;
+	private int roadIdGenerated;
+
 	// Use to decode labels if they are not in cp1252
 	private CharsetDecoder dec;
 
@@ -235,7 +242,7 @@
             section = S_RESTRICTION;
         }
 		else
-			System.out.println("Ignoring unrecognised section: " + name);
+			log.info("Ignoring unrecognised section: " + name);
 	}
 
 	/**
@@ -249,10 +256,15 @@
 			break;
 
 		case S_POINT:
-			if(extraAttributes != null && point.hasExtendedType())
-				point.setExtTypeAttributes(makeExtTypeAttributes());
-			mapper.addToBounds(point.getLocation());
-			mapper.addPoint(point);
+			if (point.getLocation() != null) {
+				if(extraAttributes != null && point.hasExtendedType())
+					point.setExtTypeAttributes(makeExtTypeAttributes());
+				mapper.addToBounds(point.getLocation());
+				mapper.addPoint(point);
+			} else {
+				log.error("skipping POI without coordinates near line " + lineNo );
+			}
+				
 			break;
 		case S_POLYLINE:
 			if (!lineStringMap.isEmpty()) {
@@ -263,9 +275,16 @@
 					setResolution(origPolyline, level);
 					for (List<Coord> points : entry.getValue()) {
 						polyline = origPolyline.copy();
+						if (!routing && GType.isRoutableLineType(polyline.getType())) {
+							roadHelper.setRoadId(++roadIdGenerated);
+						}
 						if (roadHelper.isRoad() && level == 0) {
 							polyline.setPoints(points);
-							mapper.addRoad(roadHelper.makeRoad(polyline));
+							MapRoad r = roadHelper.makeRoad(polyline);
+							if (!routing) {
+								r.skipAddToNOD(true);
+							}
+							mapper.addRoad(r);
 						}
 						else {
 							if(extraAttributes != null && polyline.hasExtendedType())
@@ -452,6 +471,8 @@
 				fixElevation();
 			}
 		} else if (name.equals("RoadID")) {
+			if (!routing && roadIdGenerated > 0)
+				throw new MapFailedException("found RoadID without Routing=Y in [IMG ID] section in line " + lineNo);
 			roadHelper.setRoadId(Integer.parseInt(value));
 		} else if (name.startsWith("Nod")) {
 			roadHelper.addNode(value);
@@ -822,13 +843,13 @@
 		} else if ("Numbering".equals(name)) {
 			// ignore
 		} else if ("Routing".equals(name)) {
-			// ignore
+			routing = true; // don't generate roadid
 		} else if ("CountryName".equalsIgnoreCase(name)) {
 			defaultCountry = value;
 		} else if ("RegionName".equalsIgnoreCase(name)) {
 			defaultRegion = value;
 		} else {
-			System.out.println("'IMG ID' section: ignoring " + name + " " + value);
+			log.info("'IMG ID' section: ignoring " + name + " " + value);
 		}
 		
 	}
Index: src/uk/me/parabola/mkgmap/reader/polish/RoadHelper.java
===================================================================
--- src/uk/me/parabola/mkgmap/reader/polish/RoadHelper.java	(revision 4287)
+++ src/uk/me/parabola/mkgmap/reader/polish/RoadHelper.java	(working copy)
@@ -25,7 +25,6 @@
 import uk.me.parabola.imgfmt.app.Coord;
 import uk.me.parabola.imgfmt.app.CoordNode;
 import uk.me.parabola.imgfmt.app.net.AccessTagsAndBits;
-import uk.me.parabola.imgfmt.app.net.NumberStyle;
 import uk.me.parabola.imgfmt.app.net.Numbers;
 import uk.me.parabola.log.Logger;
 import uk.me.parabola.mkgmap.general.MapLine;
@@ -135,8 +134,11 @@
 		road.setAccess(mkgmapAccess);
 
 		if (numbers != null && !numbers.isEmpty()) {
-			convertNodesForHouseNumbers(road);
-			road.setNumbers(numbers);
+			if (numbers.stream().anyMatch(n -> !n.isEmpty())) {
+				convertNodesForHouseNumbers(road);
+				road.setNumbers(numbers);
+			} else 
+				numbers = null;
 		}
 
 		List<Coord> points = road.getPoints();
@@ -173,6 +175,8 @@
 	 */
 	private void convertNodesForHouseNumbers(MapRoad road) {
 		int rNodNumber = 0;
+		road.getPoints().get(0).setNumberNode(true);
+		road.getPoints().get(road.getPoints().size() - 1).setNumberNode(true);
 		for (Numbers n : numbers) {
 			int node = n.getNodeNumber();
 			n.setIndex(rNodNumber++);
@@ -191,8 +195,7 @@
 	public void addNumbers(Numbers nums) {
 		if (numbers == null)
 			numbers = new ArrayList<>();
-		if (nums.getLeftNumberStyle() != NumberStyle.NONE || nums.getRightNumberStyle() != NumberStyle.NONE)
-			numbers.add(nums);
+		numbers.add(nums);
 	}
 
 	private static class NodeIndex {
