I've applied the patch, modified it to use a new SortedDuplicateEntityPipeValidator class, and checked it all in. I haven't tested it though ...
On Fri, Sep 3, 2010 at 10:20 PM, Brett Henderson <br...@bretth.com> wrote: > Hi Andrzej, > > > On Thu, Sep 2, 2010 at 12:45 PM, andrzej zaborowski <balr...@gmail.com>wrote: > >> Hi Brett, >> [I tried sending this yesterday with git-send-email but the list >> doesn't seem to accept, either way sorry if you get a duplicate] >> >> On 30 August 2010 13:15, Brett Henderson <br...@bretth.com> wrote: >> > I finally got around to checking out your patch. I've just checked it >> > in. >> > I changed the name of the task to --flatten or --f for short because I >> > don't >> > believe any other tasks have filter in the name. >> >> Thanks. I seem to remember there were some but I may be talking >> about a terribly old version. (tagfilter?) >> > > Yes, there is a --tag-filter task. So there is one other task with filter > in the name ... Oh well, there's less typing now :-) > > >> >> > >> > I notice that it assumes that data is sorted. Ideally it should utilise >> > something like the SortedEntityPipeValidator class to ensure that data >> is >> > sorted and to throw an error if it isn't. Do you have time to add that >> > in? >> >> The attached diff makes it use SortedEntityPipeValidator, however >> SortedEntityPipeValidator bails out immediately on multiple objects with >> the same id so it doesn't work. Possibly I need a new validator, is my >> thinking correct? I'm sending the patch anyway to see if you're >> ok with using the validator this way. >> > > Yes, it looks like it will need a new validator that allows two versions of > the same entity in a row. > > I don't mind how you use the validator. I'm not too fussy about the > internal implementation of tasks. Your usage is fine. For an example of > how I've used it in the past check out the > org.openstreetmap.osmosis.dataset.v0_6.impl.DatasetStore class. But yours > might be better actually. > > >> >> The reason I didn't add it in the first place was that I generally trust >> the data I throw at osmosis so don't want to use cycles for testing, I'm >> missing a way to globally turn off creation of the validators. Each of >> them adds at least a full function call per entity. >> > > I try to avoid adding options without good reason. If you can show that > the additional validation slows things down then we can look at ways of > disabling them, but I highly doubt that the performance impact will be > measurable. I think that one extra function call per entity will be lost in > the noise. > > Brett > >
_______________________________________________ osmosis-dev mailing list osmosis-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/osmosis-dev