Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
4eff3dc4
Commit
4eff3dc4
authored
May 30, 2016
by
antirez
Browse files
Fix GEORADIUS wrong output with radius > Earth radius.
Close #3266
parent
bafed3dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
deps/geohash-int/geohash_helper.c
View file @
4eff3dc4
...
...
@@ -89,6 +89,8 @@ int geohashBoundingBox(double longitude, double latitude, double radius_meters,
lonr
=
deg_rad
(
longitude
);
latr
=
deg_rad
(
latitude
);
if
(
radius_meters
>
EARTH_RADIUS_IN_METERS
)
radius_meters
=
EARTH_RADIUS_IN_METERS
;
double
distance
=
radius_meters
/
EARTH_RADIUS_IN_METERS
;
double
min_latitude
=
latr
-
distance
;
double
max_latitude
=
latr
+
distance
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment