PostGIS  2.5.0dev-r@@SVN_REVISION@@
static void analyze_geometry_flags ( struct geobuf_agg_context ctx,
LWGEOM lwgeom 
)
static

Definition at line 495 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().

497 {
498  if (!ctx->has_dimensions) {
499  if (FLAGS_GET_Z(lwgeom->flags) || FLAGS_GET_M(lwgeom->flags))
500  ctx->dimensions = 3;
501  else if (FLAGS_GET_ZM(lwgeom->flags))
502  ctx->dimensions = 4;
503  else
504  ctx->dimensions = 2;
505  ctx->has_dimensions = 1;
506  }
507 }
protobuf_c_boolean has_dimensions
Definition: geobuf.h:60
uint8_t flags
Definition: liblwgeom.h:396
#define FLAGS_GET_ZM(flags)
Definition: liblwgeom.h:152
uint32_t dimensions
Definition: geobuf.h:61
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
Definition: liblwgeom.h:139
#define FLAGS_GET_M(flags)
Definition: liblwgeom.h:140

Here is the caller graph for this function: