Ticket #3532: QuadBuckets-as-node-storage.patch

File QuadBuckets-as-node-storage.patch, 1.3 KB (added by hansendc, 15 years ago)
  • (a) core/src/org/openstreetmap/josm/data/osm/DataSet.java~QuadBuckets-as-node-storage vs. (b) core-dave/src/org/openstreetmap/josm/data/osm/DataSet.java

    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
    a b import java.util.List;  
    1616import java.util.Set;
    1717
    1818import org.openstreetmap.josm.data.SelectionChangedListener;
     19import org.openstreetmap.josm.data.osm.QuadBuckets;
    1920
    2021/**
    2122 * DataSet is the data behind the application. It can consists of only a few points up to the whole
    public class DataSet implements Cloneabl  
    3738     * All nodes goes here, even when included in other data (ways etc). This enables the instant
    3839     * conversion of the whole DataSet by iterating over this data structure.
    3940     */
    40     public Collection<Node> nodes = new LinkedList<Node>();
     41    public Collection<Node> nodes = new QuadBuckets();
    4142
    4243    /**
    4344     * All ways (Streets etc.) in the DataSet.