diff --git a/geohash.py b/geohash.py index 72b0366..6dbd713 100644 --- a/geohash.py +++ b/geohash.py @@ -75,7 +75,7 @@ def _encode_i2c(lat,lon,lat_length,lon_length): return ret[::-1] def encode(latitude, longitude, precision=12): - if latitude >= 90.0 or latitude < -90.0: + if latitude > 90.0 or latitude < -90.0: raise Exception("invalid latitude.") while longitude < -180.0: longitude += 360.0