[OSM-dev] Script to merge ways with identical tags

Josh Doe josh at joshdoe.com
Tue Dec 6 13:45:21 GMT 2011


2011/12/5 Josh Doe <josh at joshdoe.com>:
> On Dec 5, 2011 8:29 PM, "Iván Sánchez Ortega" <ivan at sanchezortega.es> wrote:
>>
>> On Martes, 6 de Diciembre de 2011 02:21:13 Ian Dees escribió:
>> > I have some code in shp-to-osm that does "glomming", but it's really not
>> > any smarter than storing all node locations in memory and check for
>> > overlaps. I think ogr2osm does something similar.
>>
>> Yeah, ogr2osm splits linestrings into tagged segments, then loops through
>> segment endpoints, checking if any segments have the same tags, etc etc
>> etc.
>
> ogr2osm is what I'm using, however it doesn't seem to be doing this for the
> files I've used. Does it only work in certain conditions? I'll take a look
> at the implementation later.

It appears ogr2osm does not combine ways that have identical tags (so
called glomming), but rather simply combines two-node segments if they
are part of the same linestring. I don't think it would be hard to add
glomming to the script, but I have code from Mike that's working for
me right now.

-Josh



More information about the dev mailing list