Skip to content

Commit

Permalink
fix: solves bug where precision is allowed to be too high
Browse files Browse the repository at this point in the history
Limits the precision in containingGeohash function to 6 from 24
since the toGeohash function has been updated to only work for
highest precision 6.
  • Loading branch information
LinusWallin committed Mar 4, 2024
1 parent 2aa650f commit 279212f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/esri/core/geometry/Geohash.java
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public static String containingGeohash(Envelope2D envelope) {
double deltaLon = 360;
double deltaLat = 180;

while (xmin == xmax && ymin == ymax && chars < 25) {
while (xmin == xmax && ymin == ymax && chars < 7) {
if (chars % 2 == 0) {
deltaLon = deltaLon / 8;
deltaLat = deltaLat / 4;
Expand Down

0 comments on commit 279212f

Please sign in to comment.