I have exported a map that represents part of city. I have measured road length with the measurement plugin in JOSM. I have realised that the map that appear in JOSM is bigger than the one I have exported as it seems to includes full length of ways of which I have only selected a part, one of them looks like the city limit. As result if I select everything, road length measured by the plugin is much bigger than the measurement obtained when I manually select just the area I have previously exported. I have also tried the osm-length-2.pl script, whose result is the same as when I consider the whole area that appears in JOSM. However, I have realised that when results are detailed, it exists one distance that is not assigned to any road type, is this distance the length of the extra roads that are considered despite not being selected? How can I make sure I get the length of the roads just in the area I choose and export? If possible, I would like to have different road type length detailed, as in osm-length-2.pl results. asked 13 Apr '16, 09:59 Fa__ |
JOSM is an editor not an analytical tool. In addition to using PostGIS as suggested by Frederik you can also import data into QGIS which allows the same operations (clipping, filtering & measurement) to be performed. answered 13 Apr '16, 13:03 SK53 ♦ |
Import your data set into PostGIS with osm2pgsql, then you have full control over what gets counted and how. You could for example take a clipping polygon e.g. the administrative boundary and have all roads clipped at that boundary, with a query similar to this:
Then you could count the total length in metres per highway type like this
answered 13 Apr '16, 12:15 Frederik Ramm ♦ |