[josm-dev] [PATCH 2/2] use QuadBuckets as node storage
Dave Hansen
dave at sr71.net
Sat Sep 12 17:09:09 BST 2009
QuadBuckets also happen to implement Collection<Node>. 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 src/org/openstreetmap/josm/data/osm/DataSet.java~QuadBuckets-as-node-storage src/org/openstreetmap/josm/data/osm/DataSet.java
--- core/src/org/openstreetmap/josm/data/osm/DataSet.java~QuadBuckets-as-node-storage 2009-09-12 08:42:07.000000000 -0700
+++ core-dave/src/org/openstreetmap/josm/data/osm/DataSet.java 2009-09-12 08:42:07.000000000 -0700
@@ -16,6 +16,7 @@ import java.util.List;
import java.util.Set;
import org.openstreetmap.josm.data.SelectionChangedListener;
+import org.openstreetmap.josm.data.osm.QuadBuckets;
/**
* DataSet is the data behind the application. It can consists of only a few points up to the whole
@@ -37,7 +38,7 @@ public class DataSet implements Cloneabl
* All nodes goes here, even when included in other data (ways etc). This enables the instant
* conversion of the whole DataSet by iterating over this data structure.
*/
- public Collection<Node> nodes = new LinkedList<Node>();
+ public Collection<Node> nodes = new QuadBuckets();
/**
* All ways (Streets etc.) in the DataSet.
_
More information about the josm-dev
mailing list