[josm-dev] [PATCH 1/2] QuadBuckets (using quad tiling) for node storage in JOSM

2009-09-12 Thread Dave Hansen
I've been hacking on the JOSM validator plugin for a while. One of the repeating hard problems that comes up are doing the UnconnectedWays tests. You need to do searches for every segment in a way to see if there are any nearby nodes. This generally means that you do a number of searches on the

[josm-dev] [PATCH 2/2] use QuadBuckets as node storage

2009-09-12 Thread Dave Hansen
QuadBuckets also happen to implement CollectionNode. So, we can just plug it in for Collection like in the DataSet class. --- core-dave/src/org/openstreetmap/josm/data/osm/DataSet.java |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN

Re: [josm-dev] [PATCH 1/2] QuadBuckets (using quad tiling) for node storage in JOSM

2009-09-12 Thread Russ Nelson
Dave Hansen writes: So, I went and implemented it. I call it QuadBuckets, and it's basically an unbalanced 4-way radix tree structure. Well done, Dave! -- --my blog is athttp://blog.russnelson.com Crynwr supports open source software 521 Pleasant Valley Rd. | +1 315-323-1241

Re: [josm-dev] [PATCH 1/2] QuadBuckets (using quad tiling) for node storage in JOSM

2009-09-12 Thread Robert Scott
On Saturday 12 September 2009, Dave Hansen wrote: I've been hacking on the JOSM validator plugin for a while. One of the repeating hard problems that comes up are doing the UnconnectedWays tests. You need to do searches for every segment in a way to see if there are any nearby nodes. This

Re: [josm-dev] [PATCH 1/2] QuadBuckets (using quad tiling) for node storage in JOSM

2009-09-12 Thread Dave Hansen
On Sat, 2009-09-12 at 17:58 +0100, Robert Scott wrote: On Saturday 12 September 2009, Dave Hansen wrote: I've been hacking on the JOSM validator plugin for a while. One of the repeating hard problems that comes up are doing the UnconnectedWays tests. You need to do searches for every

Re: [josm-dev] [PATCH 1/2] QuadBuckets (using quad tiling) for node storage in JOSM

2009-09-12 Thread Ævar Arnfjörð Bjarmason
On Sat, Sep 12, 2009 at 5:11 PM, Dave Hansen d...@sr71.net wrote: If someone knows of any existing Java kd-tree implementations, I'd be happy to look into it and see if it could be applied here.  I love nothing more than to throw my own code away.  Seriously. ;) Google turned this up for

Re: [josm-dev] [PATCH 1/2] QuadBuckets (using quad tiling) for node storage in JOSM

2009-09-12 Thread Dave Hansen
On Sat, 2009-09-12 at 17:25 +, Ævar Arnfjörð Bjarmason wrote: On Sat, Sep 12, 2009 at 5:11 PM, Dave Hansen d...@sr71.net wrote: If someone knows of any existing Java kd-tree implementations, I'd be happy to look into it and see if it could be applied here. I love nothing more than to

Re: [josm-dev] [PATCH 1/2] QuadBuckets (using quad tiling) for node storage in JOSM

2009-09-12 Thread Ævar Arnfjörð Bjarmason
On Sat, Sep 12, 2009 at 5:31 PM, Dave Hansen d...@sr71.net wrote: On Sat, 2009-09-12 at 17:25 +, Ęvar Arnfjörš Bjarmason wrote: On Sat, Sep 12, 2009 at 5:11 PM, Dave Hansen d...@sr71.net wrote: If someone knows of any existing Java kd-tree implementations, I'd be happy to look into it

Re: [josm-dev] [PATCH 1/2] QuadBuckets (using quad tiling) for node storage in JOSM

2009-09-12 Thread Dave Hansen
On Sat, 2009-09-12 at 21:04 +0200, Petr Nejedlý wrote: Dave Hansen napsal(a): Ooh, I forgot about josm-ng. That one looks very usable. If mine doesn't pan out, I'll certainly look at that one. Well, the QTree in josm-ng is similar to yours in the way it distributes the content,

Re: [josm-dev] [PATCH 1/2] QuadBuckets (using quad tiling) for node storage in JOSM

2009-09-12 Thread Karl Guggisberg
Just recently, Node/Way/Relation require access to be via accessor functions. That should help out quite a bit. The one thing that we do need is for a list of PrimitiveChangeListeners or something to call when primitives do change. This is the very motivation Jiri and myself have been working

Re: [josm-dev] QuadBuckets (using quad tiling) for node storage in JOSM

2009-09-12 Thread Dirk Stöcker
On Sat, 12 Sep 2009, Karl Guggisberg wrote: Just recently, Node/Way/Relation require access to be via accessor functions. That should help out quite a bit. The one thing that we do need is for a list of PrimitiveChangeListeners or something to call when primitives do change. This is the

Re: [josm-dev] [PATCH 1/2] QuadBuckets (using quad tiling) for node storage in JOSM

2009-09-12 Thread Dave Hansen
On Sat, 2009-09-12 at 21:36 +0200, Karl Guggisberg wrote: Just recently, Node/Way/Relation require access to be via accessor functions. That should help out quite a bit. The one thing that we do need is for a list of PrimitiveChangeListeners or something to call when primitives do change.