PostGIS  2.5.1dev-r@@SVN_REVISION@@

◆ pgis_geometry_polygonize_finalfn()

Datum pgis_geometry_polygonize_finalfn ( PG_FUNCTION_ARGS  )

Definition at line 282 of file lwgeom_accum.c.

References PG_FUNCTION_INFO_V1(), pgis_accum_finalfn(), pgis_geometry_makeline_finalfn(), PGISDirectFunctionCall1(), and polygonize_garray().

Referenced by pgis_geometry_collect_finalfn().

283 {
284  pgis_abs *p;
285  Datum result = 0;
286  Datum geometry_array = 0;
287 
288  if (PG_ARGISNULL(0))
289  PG_RETURN_NULL(); /* returns null iff no input values */
290 
291  p = (pgis_abs*) PG_GETARG_POINTER(0);
292 
293  geometry_array = pgis_accum_finalfn(p, CurrentMemoryContext, fcinfo);
294  result = PGISDirectFunctionCall1( polygonize_garray, geometry_array );
295  if (!result)
296  PG_RETURN_NULL();
297 
298  PG_RETURN_DATUM(result);
299 }
Datum pgis_accum_finalfn(pgis_abs *p, MemoryContext mctx, FunctionCallInfo fcinfo)
Datum PGISDirectFunctionCall1(PGFunction func, Datum arg1)
A modified version of PostgreSQL's DirectFunctionCall1 which allows NULL results; this is required fo...
Definition: lwgeom_accum.c:386
To pass the internal ArrayBuildState pointer between the transfn and finalfn we need to wrap it into ...
Definition: lwgeom_accum.c:107
Datum polygonize_garray(PG_FUNCTION_ARGS)
Here is the call graph for this function:
Here is the caller graph for this function: