[Talk-ca] Question about NIDs

Steve Singer ssinger_pg at sympatico.ca
Thu Jan 22 03:18:47 GMT 2009


On Wed, 21 Jan 2009, Richard Degelder wrote:

> The other option is to take the longer ways and have a relationship
> attributed to the appropriate section which will have the NID.  This
> would likely not be frequently disturbed by new editors to the map, but
> the need for making this automatic in some way will make the script a
> lot more complex.  And we are going to have to find a way to combine the
> short ways generated by Steve's scripts into a longer way and that
> represent the entire roadway.

The relationship between OSM ways and GeoBase segments is a many to many 
relationship.

The methods that I've come across for representing this in the OSM data model 
are

1) Split the OSM ways to the smallest common components (This is how we 
imported Fort McMurray, and seems to be the generally accepted solution to 
dealing with this type of thing in OSM today).

2) See http://wiki.openstreetmap.org/wiki/Relations/Proposed/Segmented_Tag
    This proposed scheme would allow a relation to point to the start/end of
    the portion way a osm way that the geobase uuid applies to.

3) Create a second ways that don't get rendered but shares the same nodes. 
You would then need to  associate these child ways to the parent through 
some method.  (I'm not a big fan of this)


> The script could be as simple as looking for intersections and dividing
> ways whenever it encounters one.  The end result would be a tremendous
> number of ways within Canada, I would be curious as to how many
> roadsegments are within GeoBase, and it would have to be rerun prior to
> any updates from GeoBase being applied to OSM to catch new user entered
> data, but it would match what GeoBase looks like.  Then running
> RoadMatcher against the results and have the pertinent data from GeoBase
> imported to the new OSM ways.

Ontario, BC, Alberta and The Yukon combined have about 1.1 million road 
segments in the NRN (those are the only datasets I have loaded).

> effected by it as opposed to a long way, or a section of it.  The other
> alternative is to get a better understanding of how to generate a script
> that will create relationships within longer ways and retain the long
> ways but still include the GeoBase NIDs for the appropriate sections

Modifying geobase2osm.py to merge adjoining ways if they share the same 
name, (and maybe # of lanes) would not be hard.  It could create the 
relation for Segmented ways as well.  However I wouldn't want to start bulk 
importing data that uses a tagging scheme that hasn't been approved where 
there is already a generally accepted method of doing this (splitting the 
ways)


> Richard Degelder
>
>




More information about the Talk-ca mailing list