PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ gserialized2_get_lwflags()

lwflags_t gserialized2_get_lwflags ( const GSERIALIZED g)

Read the flags from a GSERIALIZED and return a standard lwflag integer.

Definition at line 57 of file gserialized2.c.

58 {
59  lwflags_t lwflags = 0;
60  uint8_t gflags = g->gflags;
65  if (G2FLAGS_GET_EXTENDED(gflags))
66  {
67  uint64_t xflags = 0;
68  memcpy(&xflags, g->data, sizeof(uint64_t));
70  }
71  return lwflags;
72 }
#define G2FLAGS_GET_BBOX(gflags)
Definition: gserialized2.h:24
#define G2FLAG_X_SOLID
Macros for the extended 'flags' uint64_t.
Definition: gserialized2.h:16
#define G2FLAGS_GET_GEODETIC(gflags)
Definition: gserialized2.h:25
#define G2FLAGS_GET_Z(gflags)
Definition: gserialized2.h:22
#define G2FLAGS_GET_EXTENDED(gflags)
Definition: gserialized2.h:26
#define G2FLAGS_GET_M(gflags)
Definition: gserialized2.h:23
uint16_t lwflags_t
Definition: liblwgeom.h:313
#define FLAGS_SET_BBOX(flags, value)
Definition: liblwgeom.h:188
#define FLAGS_SET_GEODETIC(flags, value)
Definition: liblwgeom.h:189
lwflags_t lwflags(int hasz, int hasm, int geodetic)
Construct a new flags bitmask.
Definition: lwutil.c:471
#define FLAGS_SET_M(flags, value)
Definition: liblwgeom.h:187
#define FLAGS_SET_Z(flags, value)
Definition: liblwgeom.h:186
#define FLAGS_SET_SOLID(flags, value)
Definition: liblwgeom.h:191
uint8_t data[1]
Definition: liblwgeom.h:433
uint8_t gflags
Definition: liblwgeom.h:432

References GSERIALIZED::data, FLAGS_SET_BBOX, FLAGS_SET_GEODETIC, FLAGS_SET_M, FLAGS_SET_SOLID, FLAGS_SET_Z, G2FLAG_X_SOLID, G2FLAGS_GET_BBOX, G2FLAGS_GET_EXTENDED, G2FLAGS_GET_GEODETIC, G2FLAGS_GET_M, G2FLAGS_GET_Z, GSERIALIZED::gflags, and lwflags().

Referenced by gserialized2_peek_gbox_p(), gserialized2_read_gbox_p(), gserialized_get_lwflags(), and lwgeom_from_gserialized2().

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