PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ analyze_geometry_flags()

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

Definition at line 496 of file geobuf.c.

References geobuf_agg_context::dimensions, LWGEOM::flags, FLAGS_GET_M, FLAGS_GET_Z, FLAGS_GET_ZM, and geobuf_agg_context::has_dimensions.

Referenced by geobuf_agg_transfn().

498 {
499  if (!ctx->has_dimensions) {
500  if (FLAGS_GET_Z(lwgeom->flags) || FLAGS_GET_M(lwgeom->flags))
501  ctx->dimensions = 3;
502  else if (FLAGS_GET_ZM(lwgeom->flags))
503  ctx->dimensions = 4;
504  else
505  ctx->dimensions = 2;
506  ctx->has_dimensions = 1;
507  }
508 }
protobuf_c_boolean has_dimensions
Definition: geobuf.h:60
uint8_t flags
Definition: liblwgeom.h:397
#define FLAGS_GET_ZM(flags)
Definition: liblwgeom.h:153
uint32_t dimensions
Definition: geobuf.h:61
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
Definition: liblwgeom.h:140
#define FLAGS_GET_M(flags)
Definition: liblwgeom.h:141
Here is the caller graph for this function: