diff --git a/src/main/java/de/anxietyprime/swajodel/Routes.java b/src/main/java/de/anxietyprime/swajodel/Routes.java index ce3a854..cac953d 100644 --- a/src/main/java/de/anxietyprime/swajodel/Routes.java +++ b/src/main/java/de/anxietyprime/swajodel/Routes.java @@ -51,7 +51,10 @@ public class Routes { posts WHERE deleted IS NULL - AND sqrt(power(postlocation[0] - (?), 2) + power(postlocation[1] - (?), 2)) <= 10 + AND AND earth_distance( + ll_to_earth(posts.postlocation[0], posts.postlocation[1]), + ll_to_earth((?), (?)) + ) <= 10000 AND posts.id NOT IN (SELECT child FROM comments) UNION SELECT