PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ 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)
#define G1FLAGS_GET_BBOX(gflags)
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: