PostGIS  3.0.6dev-r@@SVN_REVISION@@
gserialized2.c File Reference
#include "liblwgeom_internal.h"
#include "lwgeom_log.h"
#include "lwgeodetic.h"
#include "gserialized2.h"
Include dependency graph for gserialized2.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

static int gserialized2_read_gbox_p (const GSERIALIZED *g, GBOX *gbox)
 
lwflags_t gserialized2_get_lwflags (const GSERIALIZED *g)
 Read the flags from a GSERIALIZED and return a standard lwflag integer. More...
 
static int lwflags_uses_extended_flags (lwflags_t lwflags)
 
static size_t gserialized2_box_size (const GSERIALIZED *g)
 
static size_t gserialized2_header_size (const GSERIALIZED *g)
 
static uint8_t * gserialized2_get_geometry_p (const GSERIALIZED *g)
 
uint8_t lwflags_get_g2flags (lwflags_t lwflags)
 
static uint32_t gserialized2_get_uint32_t (const uint8_t *loc)
 
uint8_t g2flags (int has_z, int has_m, int is_geodetic)
 
int gserialized2_has_bbox (const GSERIALIZED *g)
 Check if a GSERIALIZED has a bounding box without deserializing first. More...
 
int gserialized2_has_extended (const GSERIALIZED *g)
 Check if a GSERIALIZED has an extended flags section. More...
 
int gserialized2_has_z (const GSERIALIZED *g)
 Check if a GSERIALIZED has a Z ordinate. More...
 
int gserialized2_has_m (const GSERIALIZED *g)
 Check if a GSERIALIZED has an M ordinate. More...
 
int gserialized2_ndims (const GSERIALIZED *g)
 Return the number of dimensions (2, 3, 4) in a geometry. More...
 
int gserialized2_is_geodetic (const GSERIALIZED *g)
 Check if a GSERIALIZED is a geography. More...
 
uint32_t gserialized2_max_header_size (void)
 Returns the size in bytes to read from toast to get the basic information from a geometry: GSERIALIZED struct, bbox and type. More...
 
uint32_t gserialized2_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). More...
 
int32_t gserialized2_get_srid (const GSERIALIZED *g)
 Extract the SRID from the serialized form (it is packed into three bytes so this is a handy function). More...
 
void gserialized2_set_srid (GSERIALIZED *g, int32_t srid)
 Write the SRID into the serialized form (it is packed into three bytes so this is a handy function). More...
 
static size_t gserialized2_is_empty_recurse (const uint8_t *p, int *isempty)
 
int gserialized2_is_empty (const GSERIALIZED *g)
 Check if a GSERIALIZED is empty without deserializing first. More...
 
void hashlittle2 (const void *key, size_t length, uint32_t *pc, uint32_t *pb)
 
int32_t gserialized2_hash (const GSERIALIZED *g1)
 Returns a hash code for the srid/type/geometry information in the GSERIALIZED. More...
 
const float * gserialized2_get_float_box_p (const GSERIALIZED *g, size_t *ndims)
 Point into the float box area of the serialization. More...
 
int gserialized2_peek_gbox_p (const GSERIALIZED *g, GBOX *gbox)
 
static void gserialized2_copy_point (double *dptr, lwflags_t flags, POINT4D *out_point)
 
int gserialized2_peek_first_point (const GSERIALIZED *g, POINT4D *out_point)
 
int gserialized2_get_gbox_p (const GSERIALIZED *g, GBOX *box)
 Read the bounding box off a serialization and calculate one if it is not already there. More...
 
int gserialized2_fast_gbox_p (const GSERIALIZED *g, GBOX *box)
 Read the bounding box off a serialization and fail if it is not already there. More...
 
static size_t gserialized2_from_any_size (const LWGEOM *geom)
 
static size_t gserialized2_from_lwpoint_size (const LWPOINT *point)
 
static size_t gserialized2_from_lwline_size (const LWLINE *line)
 
static size_t gserialized2_from_lwtriangle_size (const LWTRIANGLE *triangle)
 
static size_t gserialized2_from_lwpoly_size (const LWPOLY *poly)
 
static size_t gserialized2_from_lwcircstring_size (const LWCIRCSTRING *curve)
 
static size_t gserialized2_from_lwcollection_size (const LWCOLLECTION *col)
 
size_t gserialized2_from_lwgeom_size (const LWGEOM *geom)
 Return the memory size a GSERIALIZED will occupy for a given LWGEOM. More...
 
static size_t gserialized2_from_lwgeom_any (const LWGEOM *geom, uint8_t *buf)
 
static size_t gserialized2_from_lwpoint (const LWPOINT *point, uint8_t *buf)
 
static size_t gserialized2_from_lwline (const LWLINE *line, uint8_t *buf)
 
static size_t gserialized2_from_lwpoly (const LWPOLY *poly, uint8_t *buf)
 
static size_t gserialized2_from_lwtriangle (const LWTRIANGLE *triangle, uint8_t *buf)
 
static size_t gserialized2_from_lwcircstring (const LWCIRCSTRING *curve, uint8_t *buf)
 
static size_t gserialized2_from_lwcollection (const LWCOLLECTION *coll, uint8_t *buf)
 
static size_t gserialized2_from_extended_flags (lwflags_t lwflags, uint8_t *buf)
 
static size_t gserialized2_from_gbox (const GBOX *gbox, uint8_t *buf)
 
GSERIALIZEDgserialized2_from_lwgeom (LWGEOM *geom, size_t *size)
 Allocate a new GSERIALIZED from an LWGEOM. More...
 
static LWGEOMlwgeom_from_gserialized2_buffer (uint8_t *data_ptr, lwflags_t lwflags, size_t *size)
 
static LWPOINTlwpoint_from_gserialized2_buffer (uint8_t *data_ptr, lwflags_t lwflags, size_t *size)
 
static LWLINElwline_from_gserialized2_buffer (uint8_t *data_ptr, lwflags_t lwflags, size_t *size)
 
static LWPOLYlwpoly_from_gserialized2_buffer (uint8_t *data_ptr, lwflags_t lwflags, size_t *size)
 
static LWTRIANGLElwtriangle_from_gserialized2_buffer (uint8_t *data_ptr, lwflags_t lwflags, size_t *size)
 
static LWCIRCSTRINGlwcircstring_from_gserialized2_buffer (uint8_t *data_ptr, lwflags_t lwflags, size_t *size)
 
static LWCOLLECTIONlwcollection_from_gserialized2_buffer (uint8_t *data_ptr, lwflags_t lwflags, size_t *size)
 
LWGEOMlwgeom_from_gserialized2 (const GSERIALIZED *g)
 Allocate a new LWGEOM from a GSERIALIZED. More...
 
GSERIALIZEDgserialized2_set_gbox (GSERIALIZED *g, GBOX *gbox)
 Update the bounding box of a GSERIALIZED, allocating a fresh one if there is not enough space to just write the new box in. More...
 
GSERIALIZEDgserialized2_drop_gbox (GSERIALIZED *g)
 Remove the bounding box from a GSERIALIZED. More...