Changeset 6171 in josm for trunk/src/org


Ignore:
Timestamp:
2013-08-21T13:38:23+02:00 (11 years ago)
Author:
Don-vip
Message:

fix #8986 - Data loading/bbox index counting optimization (patch by shinigami) + code cleanup in Quad* classes

Location:
trunk/src/org/openstreetmap/josm/data
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/coor/QuadTiling.java

    r4319 r6171  
    99    public static final int TILES_PER_LEVEL_SHIFT = 2; // Has to be 2. Other parts of QuadBuckets code rely on it
    1010    public static final int TILES_PER_LEVEL = 1<<TILES_PER_LEVEL_SHIFT;
    11     static public final int X_PARTS = 360;
    12     static public final int X_BIAS = -180;
     11    public static final int X_PARTS = 360;
     12    public static final int X_BIAS = -180;
    1313
    14     static public final int Y_PARTS = 180;
    15     static public final int Y_BIAS = -90;
     14    public static final int Y_PARTS = 180;
     15    public static final int Y_BIAS = -90;
    1616
    17     public static LatLon tile2LatLon(long quad)
    18     {
     17    public static LatLon tile2LatLon(long quad) {
    1918        // The world is divided up into X_PARTS,Y_PARTS.
    2019        // The question is how far we move for each bit
     
    4443        return new LatLon(y, x);
    4544    }
    46     static long xy2tile(long x, long y)
    47     {
     45   
     46    static long xy2tile(long x, long y) {
    4847        long tile = 0;
    4948        int i;
     
    5857        return tile;
    5958    }
    60     static long coorToTile(LatLon coor)
    61     {
     59   
     60    static long coorToTile(LatLon coor) {
    6261        return quadTile(coor);
    6362    }
    64     static long lon2x(double lon)
    65     {
     63   
     64    static long lon2x(double lon) {
    6665        //return Math.round((lon + 180.0) * QuadBuckets.WORLD_PARTS / 360.0)-1;
    6766        long ret = (long)((lon + 180.0) * WORLD_PARTS / 360.0);
     
    7170        return ret;
    7271    }
    73     static long lat2y(double lat)
    74     {
     72   
     73    static long lat2y(double lat) {
    7574        //return Math.round((lat + 90.0) * QuadBuckets.WORLD_PARTS / 180.0)-1;
    7675        long ret = (long)((lat + 90.0) * WORLD_PARTS / 180.0);
     
    8079        return ret;
    8180    }
    82     static public long quadTile(LatLon coor)
    83     {
    84         return xy2tile(lon2x(coor.lon()),
    85                 lat2y(coor.lat()));
     81   
     82    public static long quadTile(LatLon coor) {
     83        return xy2tile(lon2x(coor.lon()), lat2y(coor.lat()));
    8684    }
    87     static public int index(int level, long quad)
    88     {
     85   
     86    public static int index(int level, long quad) {
    8987        long mask = 0x00000003;
    9088        int total_shift = TILES_PER_LEVEL_SHIFT*(NR_LEVELS-level-1);
    9189        return (int)(mask & (quad >> total_shift));
    9290    }
    93     static public int index(LatLon coor, int level) {
    94         // The nodes that don't return coordinates will all get
    95         // stuck in a single tile.  Hopefully there are not too
    96         // many of them
     91   
     92    /**
     93     * Returns quad tiling index for given coordinates and level.
     94     *
     95     * @param coor coordinates
     96     * @param level level
     97     *
     98     * @return quad tiling index for given coordinates and level.
     99     * @since 2263
     100     */
     101    public static int index(LatLon coor, int level) {
     102        // The nodes that don't return coordinates will all get stuck in a single tile.
     103        // Hopefully there are not too many of them
    97104        if (coor == null)
    98105            return 0;
    99106
    100         long x = lon2x(coor.lon());
    101         long y = lat2y(coor.lat());
     107        return index(coor.lat(), coor.lon(), level);
     108    }
     109
     110    /**
     111     * Returns quad tiling index for given coordinates and level.
     112     *
     113     * @param lat latitude
     114     * @param lon longitude
     115     * @param level level
     116     *
     117     * @return quad tiling index for given coordinates and level.
     118     * @since 6171
     119     */
     120    public static int index(final double lat, final double lon, final int level) {
     121        long x = lon2x(lon);
     122        long y = lat2y(lat);
    102123        int shift = NR_LEVELS-level-1;
    103124        return (int)((x >> shift & 1) * 2 + (y >> shift & 1));
  • trunk/src/org/openstreetmap/josm/data/osm/BBox.java

    r6069 r6171  
    88import org.openstreetmap.josm.data.Bounds;
    99import org.openstreetmap.josm.data.coor.LatLon;
     10import org.openstreetmap.josm.data.coor.QuadTiling;
    1011import org.openstreetmap.josm.tools.Utils;
    1112
     
    152153    }
    153154
    154     /**
    155      * Returns a list of all 4 corners of the bbox rectangle.
    156      */
    157     public List<LatLon> points()  {
    158         LatLon p1 = new LatLon(ymin, xmin);
    159         LatLon p2 = new LatLon(ymin, xmax);
    160         LatLon p3 = new LatLon(ymax, xmin);
    161         LatLon p4 = new LatLon(ymax, xmax);
    162         List<LatLon> ret = new ArrayList<LatLon>(4);
    163         ret.add(p1);
    164         ret.add(p2);
    165         ret.add(p3);
    166         ret.add(p4);
    167         return ret;
    168     }
    169 
    170155    public LatLon getTopLeft() {
    171156        return new LatLon(ymax, xmin);
     
    178163    public LatLon getCenter() {
    179164        return new LatLon(ymin + (ymax-ymin)/2.0, xmin + (xmax-xmin)/2.0);
     165    }
     166
     167    int getIndex(final int level) {
     168
     169        int idx1 = QuadTiling.index(ymin, xmin, level);
     170
     171        final int idx2 = QuadTiling.index(ymin, xmax, level);
     172        if (idx1 == -1) idx1 = idx2;
     173        else if (idx1 != idx2) return -1;
     174
     175        final int idx3 = QuadTiling.index(ymax, xmin, level);
     176        if (idx1 == -1) idx1 = idx3;
     177        else if (idx1 != idx3) return -1;
     178
     179        final int idx4 = QuadTiling.index(ymax, xmax, level);
     180        if (idx1 == -1) idx1 = idx4;
     181        else if (idx1 != idx4) return -1;
     182
     183        return idx1;
    180184    }
    181185
  • trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java

    r6113 r6171  
    99import java.util.List;
    1010
     11import org.openstreetmap.josm.Main;
    1112import org.openstreetmap.josm.data.coor.LatLon;
    1213import org.openstreetmap.josm.data.coor.QuadTiling;
     
    2122public class QuadBuckets<T extends OsmPrimitive> implements Collection<T>
    2223{
    23     //private static boolean debug = false;
    2424    private static final boolean consistency_testing = false;
    2525    private static final int NW_INDEX = 1;
     
    2828    private static final int SW_INDEX = 0;
    2929
    30     static void abort(String s)
    31     {
     30    static void abort(String s) {
    3231        throw new AssertionError(s);
    3332    }
    34     static void out(String s)
    35     {
    36         System.out.println(s);
    37     }
    38     // periodic output
    39     long last_out = -1;
    40     void pout(String s)
    41     {
    42         long now = System.currentTimeMillis();
    43         if (now - last_out < 300)
    44             return;
    45         last_out = now;
    46         System.out.print(s + "\r");
    47     }
    48     void pout(String s, int i, int total)
    49     {
    50         long now = System.currentTimeMillis();
    51         if ((now - last_out < 300) &&
    52                 ((i+1) < total))
    53             return;
    54         last_out = now;
    55         // cast to float to keep the output size down
    56         System.out.print(s + " " + (float)((i+1)*100.0/total) + "% done    \r");
    57     }
    5833
    5934    public static final int MAX_OBJECTS_PER_LEVEL = 16;
     35   
    6036    class QBLevel
    6137    {
     
    11591            return super.toString()+ "["+level+"]: " + bbox();
    11692        }
     93       
    11794        /**
    11895         * Constructor for root node
     
    130107            int shift = (QuadTiling.NR_LEVELS - level) * 2;
    131108            long mult = 1;
    132             // Java blows the big one.  It seems to wrap when
    133             // you shift by > 31
     109            // Java blows the big one. It seems to wrap when you shift by > 31
    134110            if (shift >= 30) {
    135111                shift -= 30;
     
    139115            this.quad = parent.quad | this_quadpart;
    140116            this.bbox = calculateBBox(); // calculateBBox reference quad
    141             /*if (debug) {
    142                 out("new level["+this.level+"] bbox["+parent_index+"]: " + this.bbox()
    143                         + " coor: " + this.coor()
    144                         + " quadpart: " + Long.toHexString(this_quadpart)
    145                         + " quad: " + Long.toHexString(this.quad));
    146             }*/
    147117        }
    148118
     
    159129                return this;
    160130            else {
    161                 int index = get_index(bbox, level);
     131                int index = bbox.getIndex(level);
    162132                if (index == -1)
    163133                    return this;
     
    166136        }
    167137
    168         boolean remove_content(T o)
    169         {
     138        boolean remove_content(T o) {
    170139            // If two threads try to remove item at the same time from different buckets of this QBLevel,
    171140            // it might happen that one thread removes bucket but don't remove parent because it still sees
     
    184153            return ret;
    185154        }
    186         // Get the correct index for the given primitive
    187         // at the given level.  If the primitive can not
    188         // fit into a single quad at this level, return -1
    189         int get_index(BBox bbox, int level) {
    190             int index = -1;
    191             for (LatLon c : bbox.points()) {
    192                 /*if (debug) {
    193                     out("getting index for point: " + c);
    194                 }*/
    195                 if (index == -1) {
    196                     index = QuadTiling.index(c, level);
    197                     /*if (debug) {
    198                         out("set initial index to: " + index);
    199                     }*/
    200                     continue;
    201                 }
    202                 int another_index = QuadTiling.index(c, level);
    203                 /*if (debug) {
    204                     out("other point index: " + another_index);
    205                 }*/
    206                 if (another_index != index)
    207                     return -1;
    208             }
    209             return index;
    210         }
     155
    211156        /*
    212157         * There is a race between this and qb.nextContentNode().
     
    216161         */
    217162        void __split() {
    218             /*if (debug) {
    219                 out("splitting "+this.bbox()+" level "+level+" with "
    220                         + content.size() + " entries (my dimensions: "
    221                         + this.bbox().width()+", "+this.bbox().height()+")");
    222             }*/
    223163            List<T> tmpcontent = content;
    224164            content = null;
    225165
    226166            for (T o: tmpcontent) {
    227                 int index = get_index(o.getBBox(), level);
     167                int index = o.getBBox().getIndex(level);
    228168                if (index == -1) {
    229169                    __add_content(o);
     
    235175        }
    236176
    237         boolean __add_content(T o)
    238         {
     177        boolean __add_content(T o) {
    239178            boolean ret = false;
    240             // The split_lock will keep two concurrent
    241             // calls from overwriting content
     179            // The split_lock will keep two concurrent calls from overwriting content
    242180            if (content == null) {
    243181                content = new ArrayList<T>();
    244182            }
    245183            ret = content.add(o);
    246             /*if (debug && !this.isLeaf()) {
    247                 pout("added "+o.getClass().getName()+" to non-leaf with size: " + content.size());
    248             }*/
    249184            return ret;
    250185        }
    251         boolean matches(T o, BBox search_bbox)
    252         {
     186       
     187        boolean matches(T o, BBox search_bbox) {
    253188            // This can be optimized when o is a node
    254             //return search_bbox.bounds(coor));
    255189            return o.getBBox().intersects(search_bbox);
    256190        }
    257         private void search_contents(BBox search_bbox, List<T> result)
    258         {
    259             /*if (debug) {
    260                 out("searching contents (size: " + content == null?"<null>":content.size() + ") for " + search_bbox);
    261             }*/
     191       
     192        private void search_contents(BBox search_bbox, List<T> result) {
    262193            /*
    263194             * It is possible that this was created in a split
     
    272203                }
    273204            }
    274             /*if (debug) {
    275                 out("done searching quad " + Long.toHexString(this.quad));
    276             }*/
    277         }
     205        }
     206       
    278207        /*
    279          * This is stupid.  I tried to have a QBLeaf and QBBranch
    280          * class decending from a QBLevel.  It's more than twice
    281          * as slow.  So, this throws OO out the window, but it
    282          * is fast.  Runtime type determination must be slow.
     208         * This is stupid. I tried to have a QBLeaf and QBBranch
     209         * class decending from a QBLevel. It's more than twice
     210         * as slow. So, this throws OO out the window, but it
     211         * is fast. Runtime type determination must be slow.
    283212         */
    284213        boolean isLeaf() {
    285214            return isLeaf;
    286215        }
     216       
    287217        boolean hasChildren() {
    288218            return nw != null || ne != null || sw != null || se != null;
    289219        }
    290220
    291         QBLevel next_sibling()
    292         {
     221        QBLevel next_sibling() {
    293222            boolean found_me = false;
    294223            if (parent == null)
    295224                return null;
    296             int __nr = 0;
    297225            for (QBLevel sibling : parent.getChildren()) {
    298                 __nr++;
    299                 int nr = __nr-1;
    300226                if (sibling == null) {
    301                     /*if (debug) {
    302                         out("[" + this.level + "] null child nr: " + nr);
    303                     }*/
    304227                    continue;
    305228                }
    306                 // We're looking for the *next* child
    307                 // after us.
     229                // We're looking for the *next* child after us.
    308230                if (sibling == this) {
    309                     /*if (debug) {
    310                         out("[" + this.level + "] I was child nr: " + nr);
    311                     }*/
    312231                    found_me = true;
    313232                    continue;
    314233                }
    315234                if (found_me)
    316                     /*if (debug) {
    317                         out("[" + this.level + "] next sibling was child nr: " + nr);
    318                     }*/
    319235                    return sibling;
    320236            }
    321237            return null;
    322238        }
    323         boolean hasContent()
    324         {
     239       
     240        boolean hasContent() {
    325241            return content != null;
    326242        }
    327         QBLevel nextSibling()
    328         {
     243       
     244        QBLevel nextSibling() {
    329245            QBLevel next = this;
    330246            QBLevel sibling = next.next_sibling();
     
    333249            // a leaf or branch.
    334250            while (sibling == null) {
    335                 /*if (debug) {
    336                     out("no siblings at level["+next.level+"], moving to parent");
    337                 }*/
    338251                next = next.parent;
    339252                if (next == null) {
     
    345258            return next;
    346259        }
    347         QBLevel firstChild()
    348         {
     260       
     261        QBLevel firstChild() {
    349262            QBLevel ret = null;
    350263            for (QBLevel child : getChildren()) {
     
    357270            return ret;
    358271        }
    359         QBLevel nextNode()
    360         {
     272       
     273        QBLevel nextNode() {
    361274            if (!this.hasChildren())
    362275                return this.nextSibling();
    363276            return this.firstChild();
    364277        }
    365         QBLevel nextContentNode()
    366         {
     278       
     279        QBLevel nextContentNode() {
    367280            QBLevel next = this.nextNode();
    368281            if (next == null)
     
    376289            if (consistency_testing) {
    377290                if (!matches(o, this.bbox())) {
    378                     /*out("-----------------------------");
    379                     debug = true;*/
    380                     get_index(o.getBBox(), level);
    381                     get_index(o.getBBox(), level-1);
     291                    o.getBBox().getIndex(level);
     292                    o.getBBox().getIndex(level-1);
    382293                    int nr = 0;
    383                     /*for (QBLevel sibling : parent.getChildren()) {
    384                         out("sibling["+ (nr++) +"]: " + sibling.bbox() + " this: " + (this==sibling));
    385                     }*/
    386294                    abort("\nobject " + o + " does not belong in node at level: " + level + " bbox: " + this.bbox());
    387295                }
     
    397305        }
    398306
    399         private void search(BBox search_bbox, List<T> result)
    400         {
    401             /*if (debug) {
    402                 System.out.print("[" + level + "] qb bbox: " + this.bbox() + " ");
    403             }*/
     307        private void search(BBox search_bbox, List<T> result) {
    404308            if (!this.bbox().intersects(search_bbox))
    405                 /*if (debug) {
    406                     out("miss " + Long.toHexString(this.quad));
    407                     //QuadTiling.tile2xy(this.quad);
    408                 }*/
    409309                return;
    410310            else if (bbox().bounds(search_bbox)) {
     
    416316            }
    417317
    418             /*if (debug) {
    419                 out("hit " + this.quads());
    420                 out("[" + level + "] not leaf, moving down");
    421             }*/
    422 
    423318            //TODO Coincidence vector should be calculated here and only buckets that match search_bbox should be checked
    424319
     
    436331            }
    437332        }
    438         public String quads()
    439         {
     333       
     334        public String quads() {
    440335            return Long.toHexString(quad);
    441336        }
    442         int index_of(QBLevel find_this)
    443         {
     337       
     338        int index_of(QBLevel find_this) {
    444339            QBLevel[] children = getChildren();
    445340            for (int i = 0; i < QuadTiling.TILES_PER_LEVEL; i++) {
     
    449344            return -1;
    450345        }
     346       
    451347        double width() {
    452348            return bbox.width();
     
    460356            return bbox;
    461357        }
     358       
    462359        /*
    463360         * This gives the coordinate of the bottom-left
    464361         * corner of the box
    465362         */
    466         LatLon coor()
    467         {
     363        LatLon coor() {
    468364            return QuadTiling.tile2LatLon(this.quad);
    469365        }
    470         void remove_from_parent()
    471         {
     366       
     367        void remove_from_parent() {
    472368            if (parent == null)
    473369                return;
     
    491387            }
    492388        }
    493         boolean canRemove()
    494         {
     389       
     390        boolean canRemove() {
    495391            if (content != null && !content.isEmpty())
    496392                return false;
     
    505401    private int size;
    506402
    507     public QuadBuckets()
    508     {
     403    /**
     404     * Constructs a new {@code QuadBuckets}.
     405     */
     406    public QuadBuckets() {
    509407        clear();
    510408    }
     409   
    511410    @Override
    512411    public void clear()  {
     
    514413        search_cache = null;
    515414        size = 0;
    516         /*if (debug) {
    517             out("QuadBuckets() cleared: " + this);
    518             out("root: " + root + " level: " + root.level + " bbox: " + root.bbox());
    519         }*/
    520     }
     415    }
     416   
    521417    @Override
    522418    public boolean add(T n) {
     
    527423
    528424    @Override
    529     public boolean retainAll(Collection<?> objects)
    530     {
     425    public boolean retainAll(Collection<?> objects) {
    531426        for (T o : this) {
    532427            if (objects.contains(o)) {
     
    538433        return true;
    539434    }
    540     @Override
    541     public boolean removeAll(Collection<?> objects)
    542     {
     435   
     436    @Override
     437    public boolean removeAll(Collection<?> objects) {
    543438        boolean changed = false;
    544439        for (Object o : objects) {
     
    547442        return changed;
    548443    }
    549     @Override
    550     public boolean addAll(Collection<? extends T> objects)
    551     {
     444   
     445    @Override
     446    public boolean addAll(Collection<? extends T> objects) {
    552447        boolean changed = false;
    553448        for (T o : objects) {
     
    556451        return changed;
    557452    }
    558     @Override
    559     public boolean containsAll(Collection<?> objects)
    560     {
     453   
     454    @Override
     455    public boolean containsAll(Collection<?> objects) {
    561456        for (Object o : objects) {
    562457            if (!this.contains(o))
     
    565460        return true;
    566461    }
     462   
    567463    @Override
    568464    public boolean remove(Object o) {
     
    576472            return false;
    577473    }
     474   
    578475    @Override
    579476    public boolean contains(Object o) {
     
    583480    }
    584481
    585     public ArrayList<T> toArrayList()
    586     {
     482    public ArrayList<T> toArrayList() {
    587483        ArrayList<T> a = new ArrayList<T>();
    588484        for (T n : this) {
    589485            a.add(n);
    590486        }
    591         /*if (debug) {
    592             out("returning array list with size: " + a.size());
    593         }*/
    594487        return a;
    595488    }
    596     @Override
    597     public Object[] toArray()
    598     {
     489   
     490    @Override
     491    public Object[] toArray() {
    599492        return this.toArrayList().toArray();
    600493    }
    601     @Override
    602     public <A> A[] toArray(A[] template)
    603     {
     494   
     495    @Override
     496    public <A> A[] toArray(A[] template) {
    604497        return this.toArrayList().toArray(template);
    605498    }
     499   
    606500    class QuadBucketIterator implements Iterator<T>
    607501    {
     
    609503        int content_index;
    610504        int iterated_over;
    611         QBLevel next_content_node(QBLevel q)
    612         {
     505        QBLevel next_content_node(QBLevel q) {
    613506            if (q == null)
    614507                return null;
     
    622515            return next;
    623516        }
    624         public QuadBucketIterator(QuadBuckets<T> qb)
    625         {
    626             /*if (debug) {
    627                 out(this + " is a new iterator qb: " + qb + " size: " + qb.size());
    628             }*/
     517       
     518        public QuadBucketIterator(QuadBuckets<T> qb) {
    629519            if (!qb.root.hasChildren() || qb.root.hasContent()) {
    630520                current_node = qb.root;
     
    632522                current_node = next_content_node(qb.root);
    633523            }
    634             /*if (debug) {
    635                 out("\titerator first leaf: " + current_node);
    636             }*/
    637524            iterated_over = 0;
    638525        }
     526       
    639527        @Override
    640         public boolean hasNext()
    641         {
     528        public boolean hasNext() {
    642529            if (this.peek() == null)
    643                 /*if (debug) {
    644                     out(this + " no hasNext(), but iterated over so far: " + iterated_over);
    645                 }*/
    646530                return false;
    647531            return true;
    648532        }
    649         T peek()
    650         {
     533       
     534        T peek() {
    651535            if (current_node == null)
    652                 /*if (debug) {
    653                     out("null current leaf, nowhere to go");
    654                 }*/
    655536                return null;
    656537            while((current_node.content == null) ||
    657538                    (content_index >= current_node.content.size())) {
    658                 /*if (debug) {
    659                     out("moving to next leaf");
    660                 }*/
    661539                content_index = 0;
    662540                current_node = next_content_node(current_node);
     
    666544            }
    667545            if (current_node == null || current_node.content == null)
    668                 /*if (debug) {
    669                     out("late nowhere to go " + current_node);
    670                 }*/
    671546                return null;
    672547            return current_node.content.get(content_index);
    673548        }
     549       
    674550        @Override
    675         public T next()
    676         {
     551        public T next() {
    677552            T ret = peek();
    678553            content_index++;
    679             /*if (debug) {
    680                 out("iteration["+iterated_over+"] " + content_index + " leaf: " + current_node);
    681             }*/
    682554            iterated_over++;
    683             if (ret == null) {
    684                 /*if (debug) {
    685                     out(this + " no next node, but iterated over so far: " + iterated_over);
    686                 }*/
    687             }
    688555            return ret;
    689556        }
     557       
    690558        @Override
    691         public void remove()
    692         {
     559        public void remove() {
    693560            // two uses
    694561            // 1. Back up to the thing we just returned
     
    700567        }
    701568    }
    702     @Override
    703     public Iterator<T> iterator()
    704     {
     569   
     570    @Override
     571    public Iterator<T> iterator() {
    705572        return new QuadBucketIterator(this);
    706573    }
     574
    707575    @Override
    708576    public int size() {
     
    711579
    712580    @Override
    713     public boolean isEmpty()
    714     {
     581    public boolean isEmpty() {
    715582        if (this.size() == 0)
    716583            return true;
    717584        return false;
    718585    }
     586   
    719587    public List<T> search(BBox search_bbox) {
    720         /*if (debug) {
    721             out("qb root search at " + search_bbox);
    722             out("root bbox: " + root.bbox());
    723         }*/
    724588        List<T> ret = new ArrayList<T>();
    725         // Doing this cuts down search cost on a real-life data
    726         // set by about 25%
     589        // Doing this cuts down search cost on a real-life data set by about 25%
    727590        boolean cache_searches = true;
    728591        if (cache_searches) {
     
    730593                search_cache = root;
    731594            }
    732             // Walk back up the tree when the last
    733             // search spot can not cover the current
    734             // search
     595            // Walk back up the tree when the last search spot can not cover the current search
    735596            while (search_cache != null && !search_cache.bbox().bounds(search_bbox)) {
    736                 /*if (debug) {
    737                     out("bbox: " + search_bbox);
    738                     out("search_cache: " + search_cache + " level: " + search_cache.level);
    739                     out("search_cache.bbox(): " + search_cache.bbox());
    740                 }*/
    741597                search_cache = search_cache.parent;
    742                 /*if (debug) {
    743                     out("new search_cache: " + search_cache);
    744                 }*/
    745598            }
    746599
    747600            if (search_cache == null) {
    748601                search_cache = root;
    749                 out("bbox: " + search_bbox + " is out of the world");
     602                Main.info("bbox: " + search_bbox + " is out of the world");
    750603            }
    751604        } else {
     
    764617            tmp = tmp.parent;
    765618        }
    766         /*if (debug) {
    767             out("search of QuadBuckets for " + search_bbox + " ret len: " + ret.size());
    768         }*/
    769619        return ret;
    770620    }
Note: See TracChangeset for help on using the changeset viewer.