[OSM-dev] Highway Statistics: counting the number of roads along a junction/roundabout

Shaun McDonald shaun at shaunmcdonald.me.uk
Mon Jan 28 13:25:16 GMT 2013


It's worth noting that many roundabouts have been split for bridges, tunnels or route relations, thus aren't closed ways.

Shaun

On 28 Jan 2013, at 12:08, Peter Wendorff <wendorff at uni-paderborn.de> wrote:

> Hi.
> I guess most of the roundabouts are not modeled as a relation, and I don't think that would be necessary.
> A roundabout should be a closed way tagged as highway=roundabout.
> => to get all roundabouts fetch all ways tagged as such.
> 
> To count all ingoing/outgoing streets for all roundabouts, I would
> - fetch all nodes of that roundabout
> - for each of these nodes fetch all ways connected to it
> - count them.
> 
> Additionally you should
> 1) look for oneway tags: only ingoing/outgoing
> 2) for dual carriage ways, especially trunk roads, but often in cities that applies to other road types as well, probably you want to find out if a pair should be counted as one street only: one ingoing oneway, one outgoing oneway, usually they are neighboured, roughly pointing to the same direction, and share the same name.
> 3) depending on your use case ignore footways as they are often sidewalks just crossing.
> 
> regards
> Peter
> 
> Am 28.01.2013 12:27, schrieb Martin Alegre:
>> Dear all,
>> 
>> I need to generate some statistics on highways. More precisely, given an OSM file of a city, I would like to find out which is the average number of roads along a junction/roundabout?
>> Does anybody has some experience doing that? Given the OSM documentation, it seems to be, that the only way to do that is by looking for <relation>'s, right? My intuition is that
>> if inside a given <relation> ... </relation>, a junction exists, then the rest of <way>'s inside that <relation> are the roads along that junction. Is this reasoning correct?
>> I'm thinking of using Osmium for that purposes.
>> 
>> Best
>> 
>> 
>> _______________________________________________
>> dev mailing list
>> dev at openstreetmap.org
>> http://lists.openstreetmap.org/listinfo/dev
> 
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20130128/d12a9c67/attachment.html>


More information about the dev mailing list