Hi Andrew,

The SortedHistoryChangePipeValidator is also used by the --merge-change
task so can't be changed without breaking the assumptions that that task
makes.

Can I ask how you've ended up with two changes with the same version number
yet different timestamps and changeset numbers?  This data shouldn't be
possible to create using normal OSM tools and processes.  The various
validators in Osmosis act as protection against this type of unexpected
data and I'm very hesitant to relax those validations.

Brett

On 8 January 2012 12:15, Andrew Harvey <andrew.harv...@gmail.com> wrote:

> I tried editing
>
> osmosis-0.40.1/core/src/main/java/org/openstreetmap/osmosis/core/sort/v0_6/SortedHistoryChangePipeValidator.java
> at line 49 to be > rather than >=, altering the validation hence
> removing the error message. This seems to remove one of the duplicated
> <way items (which is what I want for --simplify-change), in my case it
> removed the first one.
>
> On Sun, Jan 8, 2012 at 9:38 AM, Andrew Harvey <andrew.harv...@gmail.com>
> wrote:
> > I have the following .osc file. The important part is it has two ways
> > with both the same id and version, except different dates and
> > changesets.
> >
> > <?xml version='1.0' encoding='UTF-8'?>
> > <osmChange version="0.6" generator="Osmosis 0.40.1">
> >  <modify>
> >    <way id="1" version="1" timestamp="2011-06-25T18:39:36Z" uid="1"
> > user="user" changeset="1">
> >      <nd ref="1"/>
> >      <nd ref="1"/>
> >      <tag k="foo" v="bar"/>
> >    </way>
> >  </modify>
> >  <modify>
> >    <way id="1" version="1" timestamp="2011-06-25T19:39:36Z" uid="1"
> > user="user" changeset="2">
> >      <nd ref="1"/>
> >      <nd ref="1"/>
> >      <tag k="foo" v="bar_bar"/>
> >    </way>
> >  </modify>
> > </osmChange>
> >
> > Running it through osmosis with,
> >
> > osmosis --read-xml-change in.osc --sort-change --simplify-change
> > --write-xml-change out.osc
> >
> > fails.
> >
> > Can it be expected that --simplify-change be able to handle this and
> > offer a conflictResolutionMethod argument like --merge? Or is there
> > some other way to handle this case?
>
> _______________________________________________
> 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

Reply via email to