X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/1da2192fb09161f935277a05401d89958dbb8712..037042f85bf5571287cf973fea66d313af471bc5:/lib-sql/functions/utils.sql

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;
