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

◆ 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 295 of file gserialized2.c.

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

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: