PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ gserialized2_get_float_box_p()

const float* gserialized2_get_float_box_p ( const GSERIALIZED g,
size_t *  ndims 
)

Point into the float box area of the serialization.

Definition at line 294 of file gserialized2.c.

295 {
296  uint8_t *ptr = (uint8_t*)(g->data);
297  size_t bndims = G2FLAGS_NDIMS_BOX(g->gflags);
298 
299  if (ndims)
300  *ndims = bndims;
301 
302  /* Cannot do anything if there's no box */
303  if (!(g && gserialized_has_bbox(g)))
304  return NULL;
305 
306  /* Advance past optional extended flags */
308  ptr += 8;
309 
310  return (const float *)(ptr);
311 }
int gserialized2_has_extended(const GSERIALIZED *g)
Check if a GSERIALIZED has an extended flags section.
Definition: gserialized2.c:151
#define G2FLAGS_NDIMS_BOX(gflags)
Definition: gserialized2.h:38
int gserialized_has_bbox(const GSERIALIZED *g)
Check if a GSERIALIZED has a bounding box without deserializing first.
Definition: gserialized.c:163
uint8_t data[1]
Definition: liblwgeom.h:433
uint8_t gflags
Definition: liblwgeom.h:432

References GSERIALIZED::data, G2FLAGS_NDIMS_BOX, GSERIALIZED::gflags, gserialized2_has_extended(), and gserialized_has_bbox().

Referenced by gserialized2_read_gbox_p(), and gserialized_get_float_box_p().

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