PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ pgis_geometry_clusterwithin_finalfn()

Datum pgis_geometry_clusterwithin_finalfn ( PG_FUNCTION_ARGS  )

Definition at line 299 of file lwgeom_accum.c.

300 {
302  Datum result = 0;
303  Datum geometry_array = 0;
304 
305  if (PG_ARGISNULL(0))
306  PG_RETURN_NULL();
307 
308  p = (CollectionBuildState*) PG_GETARG_POINTER(0);
309 
310  if (!p->data[0])
311  {
312  elog(ERROR, "Tolerance not defined");
313  PG_RETURN_NULL();
314  }
315 
316  geometry_array = pgis_accum_finalfn(p, CurrentMemoryContext, fcinfo);
317  result = PGISDirectFunctionCall2( cluster_within_distance_garray, geometry_array, p->data[0]);
318  if (!result)
319  PG_RETURN_NULL();
320 
321  PG_RETURN_DATUM(result);
322 }
Datum cluster_within_distance_garray(PG_FUNCTION_ARGS)
Datum pgis_accum_finalfn(CollectionBuildState *state, MemoryContext mctx, FunctionCallInfo fcinfo)
Datum PGISDirectFunctionCall2(PGFunction func, Datum arg1, Datum arg2)
A modified version of PostgreSQL's DirectFunctionCall2 which allows NULL results; this is required fo...
Definition: lwgeom_accum.c:373
Datum data[CollectionBuildStateDataSize]
Definition: lwgeom_accum.h:39

References cluster_within_distance_garray(), CollectionBuildState::data, pgis_accum_finalfn(), and PGISDirectFunctionCall2().

Here is the call graph for this function: