[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0rc1-468-g86bbb10
git at osgeo.org
git at osgeo.org
Tue Aug 31 15:48:31 PDT 2021
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".
The branch, master has been updated
via 86bbb10fe1bc294d65991755c0bde9aa43c39fe3 (commit)
from 8dae80e404a9c63e6e79e707d8e1f568f49fe077 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 86bbb10fe1bc294d65991755c0bde9aa43c39fe3
Author: Darafei Praliaskouski <me at komzpa.net>
Date: Wed Sep 1 01:48:19 2021 +0300
ST_ClusterKMeans: try to unpack double like in DBSCAN to make bessie happy
diff --git a/postgis/lwgeom_window.c b/postgis/lwgeom_window.c
index a605bc1..dd1bfb1 100644
--- a/postgis/lwgeom_window.c
+++ b/postgis/lwgeom_window.c
@@ -188,9 +188,11 @@ Datum ST_ClusterKMeans(PG_FUNCTION_ARGS)
double max_radius = 0.0;
LWGEOM **geoms;
int *r;
+ Datum argdatum;
/* What is K? If it's NULL or invalid, we can't procede */
- k = DatumGetInt32(WinGetFuncArgCurrent(winobj, 1, &isnull));
+ argdatum = WinGetFuncArgCurrent(winobj, 1, &isnull);
+ k = DatumGetInt32(argdatum);
if (isnull || k <= 0)
{
context->isdone = true;
@@ -208,7 +210,8 @@ Datum ST_ClusterKMeans(PG_FUNCTION_ARGS)
}
/* Maximum cluster radius. 0 if not set*/
- max_radius = DatumGetFloat8(WinGetFuncArgCurrent(winobj, 2, &isnull));
+ argdatum = WinGetFuncArgCurrent(winobj, 2, &isnull);
+ max_radius = DatumGetFloat8(argdatum);
if (isnull || max_radius <= 0)
max_radius = 0.0;
-----------------------------------------------------------------------
Summary of changes:
postgis/lwgeom_window.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list