3 I am developing a sampling technique to do quality assurance checks. One of the things I need for the technique is to find the amount of dead end roads in a certain area. How can this be achieved? I have looked at using JOSM and Overpass-Turbo but I haven't been successful so far. Any help would be appreciated. asked 14 Jul '15, 10:45 BmanS 56●4●4●7 accept rate: 0%

 2 When you load data into GraphHopper you can use the following Java snippet to calculate all coordinates of dead ends in the whole area and do further analysis: `````` CmdArgs args = CmdArgs.read(strs); GraphHopper hopper = new GraphHopper().init(args); hopper.importOrLoad(); Graph graph = hopper.getGraph(); NodeAccess nodeAccess = graph.getNodeAccess(); AllEdgesIterator iter = graph.getAllEdges(); EdgeExplorer explorer = graph.createEdgeExplorer(); List deadEndPoints = new ArrayList<>(); while (iter.next()) { int node = iter.getAdjNode(); // an edge is a connection from junction to junction // so if you count all edges from a certain junction // and it is exactly 1 you have found a dead end if (GHUtility.count(explorer.setBaseNode(node)) == 1) { deadEndPoints.add(new GHPoint(nodeAccess.getLat(node), nodeAccess.getLon(node))); } node = iter.getBaseNode(); if (GHUtility.count(explorer.setBaseNode(node)) == 1) { deadEndPoints.add(new GHPoint(nodeAccess.getLat(node), nodeAccess.getLon(node))); } } System.out.println(deadEndPoints); hopper.close(); `````` answered 23 Jul '15, 10:21 peatar 351●2●3●12 accept rate: 8%
 2 You could load the road network data into QGIS and then find dangles answered 14 Jul '15, 15:18 joost schouppe 3.4k●23●48●87 accept rate: 12% Would also be possible, in QGIS, to find roads that intersect but have no node meaning there is no junction between the roads? and to find all the unnamed roads? (14 Jul '15, 20:53) BmanS Unnamed roads would be straightforward: you could open the attribute table and select roads with an empty name column. Or you can do the same with a simple query. It would require converting your osm data to a format with a limited number of attributes (like for example a shapefile). I'm not sure on the details of finding the missing nodes, but it will probably not be that hard with the "intersect" tool. If you get that far, ask at e.g. gis.stackexchange.com (15 Jul '15, 07:13) joost schouppe
 0 The pgsnapshot schema from osmosis should be able to help here. You get a SQL version of the OSM data model, and can write SQL queries to find nodes that are only at the start or end of an OSM way with the tags that you want. answered 14 Jul '15, 11:15 rorym 5.3k●14●48●99 accept rate: 11%
 toggle preview community wiki:

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported

Question tags:

×594
×22
×18
×11

question asked: 14 Jul '15, 10:45

question was seen: 9,992 times

last updated: 23 Jul '15, 10:21