List of usage examples for com.google.common.geometry S2CellId begin
public static S2CellId begin(int level)
From source file:com.amazonaws.geo.s2.internal.S2Manager.java
public static S2CellUnion findCellIds(S2LatLngRect latLngRect) { ConcurrentLinkedQueue<S2CellId> queue = new ConcurrentLinkedQueue<S2CellId>(); ArrayList<S2CellId> cellIds = new ArrayList<S2CellId>(); for (S2CellId c = S2CellId.begin(0); !c.equals(S2CellId.end(0)); c = c.next()) { if (containsGeodataToFind(c, latLngRect)) { queue.add(c);//from w w w.j av a 2s. c o m } } processQueue(queue, cellIds, latLngRect); assert queue.size() == 0; queue = null; if (cellIds.size() > 0) { S2CellUnion cellUnion = new S2CellUnion(); cellUnion.initFromCellIds(cellIds); // This normalize the cells. // cellUnion.initRawCellIds(cellIds); // This does not normalize the cells. cellIds = null; return cellUnion; } return null; }