[josm-dev] Jumbo Patch v3 (or so)
Dave Hansen
dave at sr71.net
Mon Dec 17 08:15:01 GMT 2007
So, I actually implemented the read-only view of the Way.nodes list.
Works like a charm! (Instead of blathering about it in an email on
proper encapsulation :P)
http://dev.openstreetmap.org/~daveh/josm/003/
This removes a pretty serious chunk of the original diff. It shrunk by
at least 10k or so, and I can probably do even more pruning.
Gabriel, I also did some serious work to DuplicatedNodes. I took your
ideas to heart, and implemented something that actually creates a map
from LatLon->[Types]->[Nodes]. So, it's a hash of LatLons, which
indexes into a list of the types of nodes at that LatLon, then the
nodes.
I _think_ this is what you were going for before as far as looping
efficiently. I haven't tested this at *ALL*, though. I'll work it some
more when it isn't midnight my time. :)
I also implemented the Replace/RemoveNodeInWayCommand and
AddNodeToWayCommand instead of my crappy ReplaceSubObjectCommand.
Gabriel, I think you were the one who suggested that and you were really
right. It super-simplified my extra-craptastic Way.replace() function.
-- Dave
More information about the josm-dev
mailing list