[OSM-talk] JOSM incomplete ways debuggung (was: Unordered segments)

Frederik Ramm frederik at remote.org
Sat Apr 28 23:16:24 BST 2007


Hi,

Martijn van Oosterhout wrote:
>> In my opinion it's not the incomplete flag, but that JOSM cannot somehow
>> cope with ways that have been downloaded in several steps. Somehow it
>> just patches the new stuff on, instead of rebuilding the way from the
>> data now available.
> 
> The thing is, I've looked at the code and the problem that's occuring
> simply Shouldn't Happen (tm). The problem is basically that somehow
> multiple nodes with the same ID appear and some get attached to the
> right object and some don't.
> 
> I still don't understand the download merging process enough yet to
> really look into it, but I'm thinking of piling in the debug info and
> try to work out where it's going wrong...

I have followed the merging process in great detail and must agree with 
Martijn - there isn't an obvious mistake at least. If a way is 
downloaded which contains segments that are not present, "placeholder" 
objects (incomplete=1) are created; if new data arrives in later 
downloads, newly arrived segments with the same id as stored incomplete 
segments will overwrite the existing segment (more specifically, a 
"cloneFrom" method is called on the existing segment that copies all the 
new data into the old segment, unsetting the "incomplete" flag in the 
process).

It all *looks* right; the only thing I can think of is that somehow one 
of the incomplete segments remains, or is duplicated or so.

I've been trying to set up a very simple example:

lochewe% cat i1.osm
<osm version="0.3">
<node id="1" lat="1" lon="1" />
<node id="2" lat="2" lon="2" />
<segment id="11" from="1" to="2" />
<way id="21">
<seg id="11" />
<seg id="12" />
</way>
</osm>

lochewe% cat i2.osm
<osm version="0.3">
<node id="3" lat="3" lon="3" />
<segment id="12" from="2" to="3" />
</osm>

First file contains an incomplete way, second file contains the missing 
segment. But with this example, loading file 1 and then file 2 will make 
the way complete, exactly as it should.

Can anyone provide an example where this doesn't work and where you have 
to apply the "save the whole thing as .osm, then load it again" 
workaround to actually get a complete way? - Ideally in the form of two 
files, but two bounding boxes would also be perfect as long as it is 
repeatable...

It has happened to me a thousand times but now that I try to provoke it 
and write down (or save) the exact data, I can't seem to reproduce it.

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frederik at remote.org  ##  N49°00.09' E008°23.33'




More information about the talk mailing list