Package ch.hsr.geohash.queries

Examples of ch.hsr.geohash.queries.GeoHashQuery


    checkSearchYieldsCorrectHashes(47.447907, 47.300200, 8.760941, 8.471276, "u0qj");
    checkSearchYieldsCorrectHashes(47.157502, 47.329727, 8.562244, 8.859215, "u0qj", "u0qm", "u0qh", "u0qk");
  }

  private void checkSearchYieldsCorrectNumberOfHashes(double minLat, double maxLat, double minLon, double maxLon) {
    GeoHashQuery search = new GeoHashBoundingBoxQuery(new BoundingBox(minLat, maxLat, minLon, maxLon));
    assertRightNumberOfSearchHashes(search);
  }
View Full Code Here


    assertRightNumberOfSearchHashes(search);
  }

  private void checkSearchYieldsCorrectHashes(double minLat, double maxLat, double minLon, double maxLon,
      String... hashes) {
    GeoHashQuery search = new GeoHashBoundingBoxQuery(new BoundingBox(minLat, maxLat, minLon, maxLon));
    assertEquals(hashes.length, search.getSearchHashes().size());
    for (String expectedHash : hashes) {
      assertTrue("search hashes should contain " + expectedHash + " is: " + search, search.getSearchHashes()
          .contains(
              GeoHash.fromGeohashString(expectedHash)));
    }
  }
View Full Code Here

TOP

Related Classes of ch.hsr.geohash.queries.GeoHashQuery

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.