PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ gserialized1_get_type()

uint32_t gserialized1_get_type ( const GSERIALIZED g)

Extract the geometry type from the serialized form (it hides in the anonymous data area, so this is a handy function).

Definition at line 132 of file gserialized1.c.

133 {
134  uint32_t *ptr;
135  ptr = (uint32_t*)(g->data);
136  if ( G1FLAGS_GET_BBOX(g->gflags) )
137  {
138  ptr += (gserialized1_box_size(g) / sizeof(uint32_t));
139  }
140  return *ptr;
141 }
static size_t gserialized1_box_size(const GSERIALIZED *g)
Definition: gserialized1.c:65
#define G1FLAGS_GET_BBOX(gflags)
Definition: gserialized1.h:18
uint8_t data[1]
Definition: liblwgeom.h:447
uint8_t gflags
Definition: liblwgeom.h:446

References GSERIALIZED::data, G1FLAGS_GET_BBOX, GSERIALIZED::gflags, and gserialized1_box_size().

Referenced by gserialized1_peek_gbox_p(), gserialized_error_if_srid_mismatch(), gserialized_error_if_srid_mismatch_reference(), gserialized_get_type(), and lwgeom_from_gserialized1().

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