PostGIS  3.0.6dev-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 131 of file gserialized1.c.

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

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: