[Dev] [spatial4j/spatial4j] d2368e: # Encode Geo-hashes with Precision

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Dev] [spatial4j/spatial4j] d2368e: # Encode Geo-hashes with Precision

GitHub
  Branch: refs/heads/chilling-precision
  Home:   https://github.com/spatial4j/spatial4j
  Commit: d2368ec29c5df6cfdf8c5ee7cec30b54bb69eb65
      https://github.com/spatial4j/spatial4j/commit/d2368ec29c5df6cfdf8c5ee7cec30b54bb69eb65
  Author: Florian Schilling <[hidden email]>
  Date:   2013-04-04 (Thu, 04 Apr 2013)

  Changed paths:
    M src/main/java/com/spatial4j/core/io/GeohashUtils.java
    M src/test/java/com/spatial4j/core/io/TestGeohashUtils.java

  Log Message:
  -----------
  # Encode Geo-hashes with Precision

By looking at the Earth shape, one recognizes the size of geohash cells shrinks by moving away from the equator along an arbitrary latitude. In other words the radius depends on the latitudinal value. To let a user define a precision the `GeohashUtils.encodeLatLon()` method has been modified regarding this fact. The old parameter `precision` which were used to set the precision by the geohash length was changed to a cell size that should not be exceeded. This parameter is defined as fraction of the circumference of the geoid. The tree levels parameter is still provided and allows to set a maximum length of the generated hash.

Closes #37


  Commit: b175f89e78e7051ffd4ce7375dcf5020d33a4766
      https://github.com/spatial4j/spatial4j/commit/b175f89e78e7051ffd4ce7375dcf5020d33a4766
  Author: David Smiley <[hidden email]>
  Date:   2013-04-09 (Tue, 09 Apr 2013)

  Changed paths:
    M src/main/java/com/spatial4j/core/io/GeohashUtils.java
    M src/test/java/com/spatial4j/core/io/TestGeohashUtils.java

  Log Message:
  -----------
  Changed precision prameter to degrees based, and made various small code improvements.


Compare: https://github.com/spatial4j/spatial4j/compare/d2368ec29c5d^...b175f89e78e7

_______________________________________________
dev mailing list
[hidden email]
http://lists.spatial4j.com/listinfo.cgi/dev-spatial4j.com