Package com.google.common.geometry

Examples of com.google.common.geometry.S2CellUnion


   * @return Result of rectangle query request.
   */
  public QueryRectangleResult queryRectangle(QueryRectangleRequest queryRectangleRequest) {
    S2LatLngRect latLngRect = S2Util.getBoundingLatLngRect(queryRectangleRequest);

    S2CellUnion cellUnion = S2Manager.findCellIds(latLngRect);

    List<GeohashRange> ranges = mergeCells(cellUnion);
    cellUnion = null;

    return new QueryRectangleResult(dispatchQueries(ranges, queryRectangleRequest));
View Full Code Here


   * @return Result of radius query request.
   * */
  public QueryRadiusResult queryRadius(QueryRadiusRequest queryRadiusRequest) {
    S2LatLngRect latLngRect = S2Util.getBoundingLatLngRect(queryRadiusRequest);

    S2CellUnion cellUnion = S2Manager.findCellIds(latLngRect);

    List<GeohashRange> ranges = mergeCells(cellUnion);
    cellUnion = null;

    return new QueryRadiusResult(dispatchQueries(ranges, queryRadiusRequest));
View Full Code Here

    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;
    }
View Full Code Here

TOP

Related Classes of com.google.common.geometry.S2CellUnion

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.