[osmosis-dev] duplication of nodes on apply-change
Hi, I'm trying to figure out what is wrong with applying changes using osmosis (0.31.2). So for example I have such piece info in source OSM XML: The change file, that I apply (20091112-20091113.osc.gz) contains some mods for this node: But after I do: osmosis --read-xml-change file="data/updates/20091112-20091113.osc.gz" --read-xml file="data/rus.osm" --apply-change --write-xml file="data/rus-new.osm" I'm getting two versions of the same node in the output: Is this duplication erroneus or am I missing something obvious? Maxim ___ osmosis-dev mailing list osmosis-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/osmosis-dev
Re: [osmosis-dev] duplication of nodes on apply-change
just updated to today's tunk - still no luck. Any suggestions why it might be happening? MD> Hi, MD> I'm trying to figure out what is wrong with applying changes using MD> osmosis (0.31.2). MD> So for example I have such piece info in source OSM XML: MD> uid="69864" user="Ivan Komarov" changeset="585532" MD> lat="59.8522186" lon="30.3377485"/> MD> The change file, that I apply (20091112-20091113.osc.gz) contains MD> some mods for this node: MD> uid="143266" user="Sergey Astakhov" changeset="3101326" MD> lat="59.8522186" lon="30.3377485"> MD> MD> MD> But after I do: MD> osmosis --read-xml-change file="data/updates/20091112-20091113.osc.gz" MD> --read-xml file="data/rus.osm" --apply-change --write-xml file="data/rus-new.osm" MD> I'm getting two versions of the same node in the output: MD> uid="69864" user="Ivan Komarov" changeset="585532" MD> lat="59.8522186" lon="30.3377485"/> MD> uid="143266" user="Sergey Astakhov" changeset="3101326" MD> lat="59.8522186" lon="30.3377485"> MD> MD> MD> Is this duplication erroneus or am I missing something obvious? MD> Maxim ___ osmosis-dev mailing list osmosis-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/osmosis-dev
Re: [osmosis-dev] duplication of nodes on apply-change
Hi, Maxim Dubinin wrote: > MD> But after I do: > MD> osmosis --read-xml-change file="data/updates/20091112-20091113.osc.gz" > MD> --read-xml file="data/rus.osm" --apply-change --write-xml > file="data/rus-new.osm" > > MD> I'm getting two versions of the same node in the output: Is it possible that I am resposible for this because I recently changed the sorting function to treat something with version=x+1 as "larger than" something with version=x, instead of "equal"? (SVN r18230, change to EntityByTypeThenIdComparator...) Bye Frederik -- Frederik Ramm ## eMail frede...@remote.org ## N49°00'09" E008°23'33" ___ osmosis-dev mailing list osmosis-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/osmosis-dev
Re: [osmosis-dev] duplication of nodes on apply-change
Thanks for explanation, Frederik. I confirm that it was indeed the problem and rolling back to rev18121 fixed the issue. I also note that 0.31.3 still has this bug. Maxim Вы писали 16 ноября 2009 г., 15:11:06: FR> Hi, FR> Maxim Dubinin wrote: >> MD> But after I do: >> MD> osmosis --read-xml-change file="data/updates/20091112-20091113.osc.gz" >> MD> --read-xml file="data/rus.osm" --apply-change --write-xml >> file="data/rus-new.osm" >> >> MD> I'm getting two versions of the same node in the output: FR> Is it possible that I am resposible for this because I recently changed FR> the sorting function to treat something with version=x+1 as "larger FR> than" something with version=x, instead of "equal"? FR> (SVN r18230, change to EntityByTypeThenIdComparator...) FR> Bye FR> Frederik ___ osmosis-dev mailing list osmosis-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/osmosis-dev
Re: [osmosis-dev] duplication of nodes on apply-change
In an attempt to fix this I have done the following: * Rolled back EntityByTypeThenIdComparator to the previous behaviour of only checking type then id. * Created a new EntityByTypeThenIdThenVersion comparator which (obviously :-) includes version as part of the checking. * Updated ChangeMerger (--merge-change) to use the new version inclusive comparison. * Updated SortedChangePipeValidator used by ChangeMerger (--merge-change) and ChangeSimplifier (--simplify-change) to use the new version inclusive comparison. * Created a new --simplify-change task that reduces full history diffs to delta diffs to allow old tasks relying on single changes per entity to continue to work. At some point I need to go through all change processing tasks and check to see if they need updates to support full history diffs but I'm not sure when I'll get around to it. If anybody sees any problems with the changes I've made please let me know. Brett 2009/11/18 Maxim Dubinin > Thanks for explanation, Frederik. > I confirm that it was indeed the problem and rolling back to rev18121 > fixed the issue. I also note that 0.31.3 still has this bug. > > Maxim > > Вы писали 16 ноября 2009 г., 15:11:06: > > FR> Hi, > > FR> Maxim Dubinin wrote: > >> MD> But after I do: > >> MD> osmosis --read-xml-change > file="data/updates/20091112-20091113.osc.gz" > >> MD> --read-xml file="data/rus.osm" --apply-change --write-xml > file="data/rus-new.osm" > >> > >> MD> I'm getting two versions of the same node in the output: > > FR> Is it possible that I am resposible for this because I recently changed > FR> the sorting function to treat something with version=x+1 as "larger > FR> than" something with version=x, instead of "equal"? > > FR> (SVN r18230, change to EntityByTypeThenIdComparator...) > > FR> Bye > FR> Frederik > > > ___ > osmosis-dev mailing list > osmosis-dev@openstreetmap.org > http://lists.openstreetmap.org/listinfo/osmosis-dev > ___ osmosis-dev mailing list osmosis-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/osmosis-dev