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

Gregory Williams gregory at gregorywilliams.me.uk
Mon Jan 28 12:12:48 GMT 2013


Just to point out that most junctions and roundabouts won't actually be
members on junction relations. The relations tend to only be used for
complex junctions.

 

I'd also point out that you'll need to keep in mind your handling of divided
highways, where you'll have at least two portions of highway with oneway in
differing directions. I'm sure that you'd want to count the various parts of
the divided highway as just one road though.

 

When I've done something similar in the past I've queried a copy of the data
stored in the usual Postgres schema output by osm2pgsql. I was able to for
points where the roads off of a roundabout intersected the roundabout. It
was hardly a terribly efficient way of going about it though.

 

Gregory

 

From: Martin Alegre [mailto:tin.alegre at gmail.com] 
Sent: 28 January 2013 11:27
To: dev at openstreetmap.org
Subject: [OSM-dev] Highway Statistics: counting the number of roads along a
junction/roundabout

 

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

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


More information about the dev mailing list