PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ analyze_geometry_flags()

static void analyze_geometry_flags ( struct geobuf_agg_context ctx,
LWGEOM lwgeom 
)
static

Definition at line 512 of file geobuf.c.

514 {
515  if (!ctx->has_dimensions)
516  {
517  if (lwgeom_has_z(lwgeom) && lwgeom_has_m(lwgeom))
518  ctx->dimensions = 4;
519  else if (lwgeom_has_z(lwgeom) || lwgeom_has_m(lwgeom))
520  ctx->dimensions = 3;
521  else
522  ctx->dimensions = 2;
523  ctx->has_dimensions = 1;
524  }
525 }
int lwgeom_has_z(const LWGEOM *geom)
Return LW_TRUE if geometry has Z ordinates.
Definition: lwgeom.c:916
int lwgeom_has_m(const LWGEOM *geom)
Return LW_TRUE if geometry has M ordinates.
Definition: lwgeom.c:923
protobuf_c_boolean has_dimensions
Definition: geobuf.h:60
uint32_t dimensions
Definition: geobuf.h:61

References geobuf_agg_context::dimensions, geobuf_agg_context::has_dimensions, lwgeom_has_m(), and lwgeom_has_z().

Referenced by geobuf_agg_transfn().

Here is the call graph for this function:
Here is the caller graph for this function: