X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/b8a73192128b162ea32bf2f622875a543a39d955..bc1009f8c200ad5468bef54f4b4de6220a20a57b:/lib-sql/functions/utils.sql?ds=inline

diff --git a/lib-sql/functions/utils.sql b/lib-sql/functions/utils.sql
index f5be7b61..b2771ba1 100644
--- a/lib-sql/functions/utils.sql
+++ b/lib-sql/functions/utils.sql
@@ -273,8 +273,8 @@ BEGIN
   END IF;
 
   RETURN ST_Envelope(ST_Collect(
-                     ST_Project(geom, radius, 0.785398)::geometry,
-                     ST_Project(geom, radius, 3.9269908)::geometry));
+                     ST_Project(geom::geography, radius, 0.785398)::geometry,
+                     ST_Project(geom::geography, radius, 3.9269908)::geometry));
 END;
 $$
 LANGUAGE plpgsql IMMUTABLE;
