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

Go to the source code of this file.

Functions

static int gserialized1_read_gbox_p (const GSERIALIZED *g, GBOX *gbox)
 
lwflags_t gserialized1_get_lwflags (const GSERIALIZED *g)
 Read the flags from a GSERIALIZED and return a standard lwflag integer. More...
 
uint8_t lwflags_get_g1flags (lwflags_t lwflags)
 
static size_t gserialized1_box_size (const GSERIALIZED *g)
 
static uint32_t gserialized1_get_uint32_t (const uint8_t *loc)
 
uint8_t g1flags (int has_z, int has_m, int is_geodetic)
 
int gserialized1_has_bbox (const GSERIALIZED *gser)
 Check if a GSERIALIZED has a bounding box without deserializing first. More...
 
int gserialized1_has_z (const GSERIALIZED *gser)
 Check if a GSERIALIZED has a Z ordinate. More...
 
int gserialized1_has_m (const GSERIALIZED *gser)
 Check if a GSERIALIZED has an M ordinate. More...
 
int gserialized1_ndims (const GSERIALIZED *gser)
 Return the number of dimensions (2, 3, 4) in a geometry. More...
 
int gserialized1_is_geodetic (const GSERIALIZED *gser)
 Check if a GSERIALIZED is a geography. More...
 
uint32_t gserialized1_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...
 
static uint32_t gserialized1_header_size (const GSERIALIZED *gser)
 
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). More...
 
int32_t gserialized1_get_srid (const GSERIALIZED *s)
 Extract the SRID from the serialized form (it is packed into three bytes so this is a handy function). More...
 
void gserialized1_set_srid (GSERIALIZED *s, 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 gserialized1_is_empty_recurse (const uint8_t *p, int *isempty)
 
int gserialized1_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 gserialized1_hash (const GSERIALIZED *g1)
 Returns a hash code for the srid/type/geometry information in the GSERIALIZED. More...
 
int gserialized1_peek_gbox_p (const GSERIALIZED *g, GBOX *gbox)
 
static void gserialized1_copy_point (double *dptr, lwflags_t flags, POINT4D *out_point)
 
int gserialized1_peek_first_point (const GSERIALIZED *g, POINT4D *out_point)
 
int gserialized1_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 gserialized1_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 gserialized1_from_any_size (const LWGEOM *geom)
 
static size_t gserialized1_from_lwpoint_size (const LWPOINT *point)
 
static size_t gserialized1_from_lwline_size (const LWLINE *line)
 
static size_t gserialized1_from_lwtriangle_size (const LWTRIANGLE *triangle)
 
static size_t gserialized1_from_lwpoly_size (const LWPOLY *poly)
 
static size_t gserialized1_from_lwcircstring_size (const LWCIRCSTRING *curve)
 
static size_t gserialized1_from_lwcollection_size (const LWCOLLECTION *col)
 
size_t gserialized1_from_lwgeom_size (const LWGEOM *geom)
 Return the memory size a GSERIALIZED will occupy for a given LWGEOM. More...
 
static size_t gserialized1_from_lwgeom_any (const LWGEOM *geom, uint8_t *buf)
 
static size_t gserialized1_from_lwpoint (const LWPOINT *point, uint8_t *buf)
 
static size_t gserialized1_from_lwline (const LWLINE *line, uint8_t *buf)
 
static size_t gserialized1_from_lwpoly (const LWPOLY *poly, uint8_t *buf)
 
static size_t gserialized1_from_lwtriangle (const LWTRIANGLE *triangle, uint8_t *buf)
 
static size_t gserialized1_from_lwcircstring (const LWCIRCSTRING *curve, uint8_t *buf)
 
static size_t gserialized1_from_lwcollection (const LWCOLLECTION *coll, uint8_t *buf)
 
static size_t gserialized1_from_gbox (const GBOX *gbox, uint8_t *buf)
 
GSERIALIZEDgserialized1_from_lwgeom (LWGEOM *geom, size_t *size)
 Allocate a new GSERIALIZED from an LWGEOM. More...
 
static LWGEOMlwgeom_from_gserialized1_buffer (uint8_t *data_ptr, lwflags_t lwflags, size_t *size)
 
static LWPOINTlwpoint_from_gserialized1_buffer (uint8_t *data_ptr, lwflags_t lwflags, size_t *size)
 
static LWLINElwline_from_gserialized1_buffer (uint8_t *data_ptr, lwflags_t lwflags, size_t *size)
 
static LWPOLYlwpoly_from_gserialized1_buffer (uint8_t *data_ptr, lwflags_t lwflags, size_t *size)
 
static LWTRIANGLElwtriangle_from_gserialized1_buffer (uint8_t *data_ptr, lwflags_t lwflags, size_t *size)
 
static LWCIRCSTRINGlwcircstring_from_gserialized1_buffer (uint8_t *data_ptr, lwflags_t lwflags, size_t *size)
 
static LWCOLLECTIONlwcollection_from_gserialized1_buffer (uint8_t *data_ptr, lwflags_t lwflags, size_t *size)
 
LWGEOMlwgeom_from_gserialized1 (const GSERIALIZED *g)
 Allocate a new LWGEOM from a GSERIALIZED. More...
 
const float * gserialized1_get_float_box_p (const GSERIALIZED *g, size_t *ndims)
 Point into the float box area of the serialization. More...
 
GSERIALIZEDgserialized1_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...
 
GSERIALIZEDgserialized1_drop_gbox (GSERIALIZED *g)
 Remove the bounding box from a GSERIALIZED. More...