PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ read_lwgeom_from_partition()

static LWGEOM* read_lwgeom_from_partition ( WindowObject  win_obj,
uint32_t  i,
bool *  is_null 
)
static

Definition at line 65 of file lwgeom_window.c.

References lwgeom_from_gserialized(), lwpoint_as_lwgeom(), lwpoint_construct_empty(), PG_FUNCTION_INFO_V1(), and ST_ClusterDBSCAN().

Referenced by ST_ClusterDBSCAN().

66 {
67  GSERIALIZED* g;
68  Datum arg = WinGetFuncArgInPartition(win_obj, 0, i, WINDOW_SEEK_HEAD, false, is_null, NULL);
69 
70  if (*is_null) {
71  /* So that the indexes in our clustering input array can match our partition positions,
72  * toss an empty point into the clustering inputs, as a pass-through.
73  * NOTE: this will cause gaps in the output cluster id sequence.
74  * */
76  }
77 
78  g = (GSERIALIZED*) PG_DETOAST_DATUM_COPY(arg);
79  return lwgeom_from_gserialized(g);
80 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
LWPOINT * lwpoint_construct_empty(int srid, char hasz, char hasm)
Definition: lwpoint.c:151
LWGEOM * lwpoint_as_lwgeom(const LWPOINT *obj)
Definition: lwgeom.c:303
Here is the call graph for this function:
Here is the caller graph for this function: