Package ch.hsr.geohash

Examples of ch.hsr.geohash.WGS84Point


   * radius in meters.
   */
  public GeoHashCircleQuery(WGS84Point center, double radius) {
    this.radius = radius;
    this.center = center;
    WGS84Point northEast = VincentyGeodesy.moveInDirection(VincentyGeodesy.moveInDirection(center, 0, radius), 90,
        radius);
    WGS84Point southWest = VincentyGeodesy.moveInDirection(VincentyGeodesy.moveInDirection(center, 180, radius),
        270, radius);
    BoundingBox bbox = new BoundingBox(northEast, southWest);
    query = new GeoHashBoundingBoxQuery(bbox);
  }
View Full Code Here


  /* the combined bounding box of those hashes. */
  private BoundingBox boundingBox;

  public GeoHashBoundingBoxQuery(BoundingBox bbox) {
    int fittingBits = GeoHashSizeTable.numberOfBitsForOverlappingGeoHash(bbox);
    WGS84Point center = bbox.getCenterPoint();
    GeoHash centerHash = GeoHash.withBitPrecision(center.getLatitude(), center.getLongitude(), fittingBits);

    if (hashFits(centerHash, bbox)) {
      addSearchHash(centerHash);
    } else {
      expandSearch(centerHash, bbox);
View Full Code Here

    double newLon = point.getLongitude() + L / degToRad;
   
    newLon = (newLon >  180.0 ? 360.0 - newLon : newLon);
    newLon = (newLon < -180.0 ? 360.0 + newLon : newLon);
   
    return new WGS84Point(newLat, newLon);
  }
View Full Code Here

TOP

Related Classes of ch.hsr.geohash.WGS84Point

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.