From 037042f85bf5571287cf973fea66d313af471bc5 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sun, 20 Aug 2023 13:52:03 +0200 Subject: [PATCH] fix parameter use for ST_Project Before postgis 3.4 ST_Project required a geography as input and seemed to have implicitly converted to geography. Since 3.4 geometry input is supported but leads to a completely different result. --- lib-sql/functions/utils.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.45.1