PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ analyze_geometry_flags()

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

Definition at line 511 of file geobuf.c.

513 {
514  if (!ctx->has_dimensions)
515  {
516  if (lwgeom_has_z(lwgeom) && lwgeom_has_m(lwgeom))
517  ctx->dimensions = 4;
518  else if (lwgeom_has_z(lwgeom) || lwgeom_has_m(lwgeom))
519  ctx->dimensions = 3;
520  else
521  ctx->dimensions = 2;
522  ctx->has_dimensions = 1;
523  }
524 }
int lwgeom_has_z(const LWGEOM *geom)
Return LW_TRUE if geometry has Z ordinates.
Definition: lwgeom.c:934
int lwgeom_has_m(const LWGEOM *geom)
Return LW_TRUE if geometry has M ordinates.
Definition: lwgeom.c:941
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: