[OSM-dev] Missing segments while downloading area in JOSM
frederik at remote.org
Wed May 9 20:42:23 BST 2007
> i have tried to download an area in JOSM, and the Mappaint plugin throw
> a null pointer exception. After analyzing the situation i see that in
> the downloaded .osm file are ways, with segment ids of segments which
> are not present in the osm file.
This was frequently the case with API 0.3 (segments outside of the bbox
were not loaded). It should not happen with API 0.4, except when
segments have been deleted and the way still refers to them.
> Now, since JOSM does not complain
JOSM will, in these cases, create "phantom" segment objects with from=0
and to=0 and incomplete=true.
> has the Mappaint plugin has to be
> fixed? I put the critical section into a try/catch block. Or is this an
> API isue?
You should really check for the "incomplete" flag before you do
something with the segment that relies on meaningful from/to values.
I have proposed to remove incomplete objects from JOSM altogether, by
rejecting the loading of incomplete ways or by removing the missing
segments from the way when it is loaded, but even if this idea is
accepted it will take a while.
Frederik Ramm ## eMail frederik at remote.org ## N49°00.09' E008°23.33'
More information about the dev