[josm-dev] QuadBuckets in Dataset
Jiri Klement
jiri.klement at gmail.com
Sat Oct 31 17:26:26 GMT 2009
> One suggestion was to use the UndoRedoHandler code to catch
> modifications and reindex the primitives. How about something like
> this?
....
I'm not sure if the code will work for one moved node. You first call
reIndexPrimitives(modified) that might move node to different bucket
and then try to get ways, that still think the node is in the old
buckets. Anyway after some modifications it should work, at least as a
temporary solution.
So I will replace direct access to QuadBuckets with getNodes() method
returning read-only collection and add search method. Internally
Dataset will use both QuadBuckets for fast access by coordinates and
Storage for fast access using id and iterations. Because dataset
modifications will be possible only through Dataset methods, it
shouldn't be problem to keep the two lists synchronized.
--
Jiri
More information about the josm-dev
mailing list