PostGIS 3.0.6dev-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 327 of file gserialized2.c.

328{
329 uint8_t *ptr = (uint8_t*)(g->data);
330 size_t bndims = G2FLAGS_NDIMS_BOX(g->gflags);
331
332 if (ndims)
333 *ndims = bndims;
334
335 /* Cannot do anything if there's no box */
336 if (!(g && gserialized_has_bbox(g)))
337 return NULL;
338
339 /* Advance past optional extended flags */
341 ptr += 8;
342
343 return (const float *)(ptr);
344}
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: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: