diff --git a/src/main/java/ch/hsr/geohash/BoundingBox.java b/src/main/java/ch/hsr/geohash/BoundingBox.java index 31aac29..7455565 100644 --- a/src/main/java/ch/hsr/geohash/BoundingBox.java +++ b/src/main/java/ch/hsr/geohash/BoundingBox.java @@ -274,14 +274,14 @@ public void expandToInclude(BoundingBox other) { } private boolean containsLatitude(double latitude) { - return latitude >= southLatitude && latitude <= northLatitude; + return latitude > southLatitude && latitude < northLatitude; } private boolean containsLongitude(double longitude) { if (intersects180Meridian) { - return longitude <= eastLongitude || longitude >= westLongitude; + return longitude < eastLongitude || longitude > westLongitude; } else { - return longitude >= westLongitude && longitude <= eastLongitude; + return longitude > westLongitude && longitude < eastLongitude; } }