![]() |
MobilityDB 1.3
|
Functions for the static circular buffer type. More...
#include "cbuffer/cbuffer.h"
#include <assert.h>
#include <float.h>
#include <limits.h>
#include <postgres.h>
#include <common/hashfn.h>
#include <liblwgeom.h>
#include <meos.h>
#include <meos_internal_geo.h>
#include "temporal/postgres_types.h"
#include "temporal/set.h"
#include "temporal/tsequence.h"
#include "temporal/type_inout.h"
#include "temporal/type_parser.h"
#include "temporal/type_util.h"
#include "geo/meos_transform.h"
#include "geo/postgis_funcs.h"
#include "geo/tgeo.h"
#include "geo/tgeo_spatialfuncs.h"
#include "geo/tspatial.h"
#include "geo/tspatial_parser.h"
Functions | |
char * | cbuffer_as_ewkt (const Cbuffer *cb, int maxdd) |
Return the Extended Well-Known Text (EWKT) representation of a circular buffer. More... | |
char * | cbuffer_as_hexwkb (const Cbuffer *cb, uint8_t variant, size_t *size_out) |
Return the ASCII hex-encoded Well-Known Binary (HexWKB) representation of a circular buffer. More... | |
char * | cbuffer_as_text (const Cbuffer *cb, int maxdd) |
Return the Well-Known Text (WKT) representation of a circular buffer. More... | |
uint8_t * | cbuffer_as_wkb (const Cbuffer *cb, uint8_t variant, size_t *size_out) |
Return the Well-Known Binary (WKB) representation of a circular buffer. More... | |
int | cbuffer_cmp (const Cbuffer *cb1, const Cbuffer *cb2) |
Return -1, 0, or 1 depending on whether the first buffer is less than, equal to, or greater than the second one. More... | |
bool | cbuffer_collinear (const Cbuffer *cb1, const Cbuffer *cb2, const Cbuffer *cb3, double ratio) |
Return true if the three values are collinear. More... | |
int | cbuffer_contains (const Cbuffer *cb1, const Cbuffer *cb2) |
Return true if the first circular buffer contains the second one. More... | |
Cbuffer * | cbuffer_copy (const Cbuffer *cb) |
Return a copy of a circular buffer. More... | |
int | cbuffer_covers (const Cbuffer *cb1, const Cbuffer *cb2) |
Return true if the first circular buffer covers the second one. More... | |
int | cbuffer_disjoint (const Cbuffer *cb1, const Cbuffer *cb2) |
Return true if two circular buffers are disjoint in 2D. More... | |
double | cbuffer_distance (const Cbuffer *cb1, const Cbuffer *cb2) |
Return the distance between two circular buffers. More... | |
int | cbuffer_dwithin (const Cbuffer *cb1, const Cbuffer *cb2, double dist) |
Return true if two 2D circular buffers are within a distance. More... | |
bool | cbuffer_eq (const Cbuffer *cb1, const Cbuffer *cb2) |
Return true if the first buffer is equal to the second one. More... | |
Cbuffer * | cbuffer_from_hexwkb (const char *hexwkb) |
Return a circular buffer from its ASCII hex-encoded Well-Known Binary (WKB) representation. More... | |
Cbuffer * | cbuffer_from_wkb (const uint8_t *wkb, size_t size) |
Return a circular buffer from its Well-Known Binary (WKB) representation. More... | |
bool | cbuffer_ge (const Cbuffer *cb1, const Cbuffer *cb2) |
Return true if the first buffer is greater than or equal to the second one. More... | |
bool | cbuffer_gt (const Cbuffer *cb1, const Cbuffer *cb2) |
Return true if the first buffer is greater than the second one. More... | |
uint32 | cbuffer_hash (const Cbuffer *cb) |
Return the 32-bit hash value of a circular buffer. More... | |
uint64 | cbuffer_hash_extended (const Cbuffer *cb, uint64 seed) |
Return the 64-bit hash value of a circular buffer using a seed. More... | |
Cbuffer * | cbuffer_in (const char *str) |
Return a circular buffer from its string representation. More... | |
int | cbuffer_intersects (const Cbuffer *cb1, const Cbuffer *cb2) |
Return true if two circular buffers intersect in 2D. More... | |
bool | cbuffer_le (const Cbuffer *cb1, const Cbuffer *cb2) |
Return true if the first buffer is less than or equal to the second one. More... | |
bool | cbuffer_lt (const Cbuffer *cb1, const Cbuffer *cb2) |
Return true if the first buffer is less than the second one. More... | |
Cbuffer * | cbuffer_make (const GSERIALIZED *point, double radius) |
Construct a circular buffer from a point and a radius. More... | |
bool | cbuffer_ne (const Cbuffer *cb1, const Cbuffer *cb2) |
Return true if the first buffer is not equal to the second one. More... | |
bool | cbuffer_nsame (const Cbuffer *cb1, const Cbuffer *cb2) |
Return true if two circular buffers are approximately equal with respect to an epsilon value. More... | |
char * | cbuffer_out (const Cbuffer *cb, int maxdd) |
Return the string representation of a circular buffer. More... | |
Cbuffer * | cbuffer_parse (const char **str, bool end) |
Parse a circular buffer from its string representation. More... | |
GSERIALIZED * | cbuffer_point (const Cbuffer *cb) |
Return a copy of the point of a circular buffer. More... | |
const GSERIALIZED * | cbuffer_point_p (const Cbuffer *cb) |
Return a pointer to the point of a circular buffer. More... | |
double | cbuffer_radius (const Cbuffer *cb) |
Return the radius of a circular buffer. More... | |
Cbuffer * | cbuffer_round (const Cbuffer *cb, int maxdd) |
Return a circular buffer with the precision of the values set to a number of decimal places. More... | |
bool | cbuffer_same (const Cbuffer *cb1, const Cbuffer *cb2) |
Return true if two circular buffers are approximately equal with respect to an epsilon value. More... | |
void | cbuffer_set_srid (Cbuffer *cb, int32_t srid) |
Set the coordinates of a circular buffer to an SRID. More... | |
bool | cbuffer_set_stbox (const Cbuffer *cb, STBox *box) |
Return in the last argument the spatiotemporal box of a circular buffer. More... | |
int32_t | cbuffer_srid (const Cbuffer *cb) |
Return the SRID of a circular buffer. More... | |
GSERIALIZED * | cbuffer_to_geom (const Cbuffer *cb) |
Convert a circular buffer into a geometry. More... | |
Set * | cbuffer_to_set (const Cbuffer *cb) |
Convert a circular buffer into a circular buffer set. More... | |
STBox * | cbuffer_to_stbox (const Cbuffer *cb) |
Convert a circular buffer into a spatiotemporal box. More... | |
int | cbuffer_touches (const Cbuffer *cb1, const Cbuffer *cb2) |
Return true if the first circular buffer touches the second one. More... | |
Cbuffer * | cbuffer_transf_pj (const Cbuffer *cb, int32_t srid_to, const LWPROJ *pj) |
Return a circular buffer transformed to another SRID using a pipeline. More... | |
Cbuffer * | cbuffer_transform (const Cbuffer *cb, int32_t srid_to) |
Return a circular buffer transformed to another SRID. More... | |
Cbuffer * | cbuffer_transform_pipeline (const Cbuffer *cb, const char *pipeline, int32_t srid_to, bool is_forward) |
Return a circular buffer transformed to another SRID using a pipeline. More... | |
char * | cbuffer_wkt_out (Datum value, int maxdd, bool extended) |
Return the Well-Known Text (WKT) representation of a circular buffer. More... | |
Cbuffer ** | cbufferarr_round (const Cbuffer **cbarr, int count, int maxdd) |
Return an array of circular buffers with the precision of the values set to a number of decimal places. More... | |
void | cbufferarr_set_stbox (const Datum *values, int count, STBox *box) |
Return in the last argument a spatiotemporal box contructed from an array of circular buffers. More... | |
GSERIALIZED * | cbufferarr_to_geom (const Cbuffer **cbarr, int count) |
Return a geometry converted from an array of circular buffers. More... | |
Cbuffer * | cbuffersegm_interpolate (const Cbuffer *start, const Cbuffer *end, long double ratio) |
Return a circular buffer interpolated from a circular buffer segment with respect to a fraction of its total length. More... | |
long double | cbuffersegm_locate (const Cbuffer *start, const Cbuffer *end, const Cbuffer *value) |
Return a float in [0,1] representing the location of the closest location on the circular buffer segment to the given circular buffer, as a fraction of the segment length. More... | |
int | contains_cbuffer_cbuffer (const Cbuffer *cb1, const Cbuffer *cb2) |
Return true if the first circular buffer contains the second one. More... | |
int | covers_cbuffer_cbuffer (const Cbuffer *cb1, const Cbuffer *cb2) |
Return true if the first circular buffer covers the second one. More... | |
Datum | datum_cbuffer_contains (Datum cb1, Datum cb2) |
Return a Datum true if the first circular buffer contains the second one. More... | |
Datum | datum_cbuffer_covers (Datum cb1, Datum cb2) |
Return a Datum true if the first circular buffer covers the second one. More... | |
Datum | datum_cbuffer_disjoint (Datum cb1, Datum cb2) |
Return a Datum true if two circular buffers are disjoint in 2D. More... | |
Datum | datum_cbuffer_distance (Datum cb1, Datum cb2) |
Return the distance between two circular buffers. More... | |
Datum | datum_cbuffer_dwithin (Datum cb1, Datum cb2, Datum dist) |
Return a Datum true if two 2D circular buffers are within a distance. More... | |
Datum | datum_cbuffer_intersects (Datum cb1, Datum cb2) |
Return a Datum true if two circular buffers intersect in 2D. More... | |
Datum | datum_cbuffer_round (Datum cbuffer, Datum size) |
Return a circular buffer with the precision of the values set to a number of decimal places. More... | |
Datum | datum_cbuffer_touches (Datum cb1, Datum cb2) |
Return a Datum true if the first circular buffer touches the second one. More... | |
int | disjoint_cbuffer_cbuffer (const Cbuffer *cb1, const Cbuffer *cb2) |
Return true if two circular buffers are disjoint in 2D. More... | |
double | distance_cbuffer_cbuffer (const Cbuffer *cb1, const Cbuffer *cb2) |
Return the distance between two circular buffers. More... | |
double | distance_cbuffer_geo (const Cbuffer *cb, const GSERIALIZED *gs) |
Return the distance between a circular buffer and a geometry. More... | |
double | distance_cbuffer_stbox (const Cbuffer *cb, const STBox *box) |
Return the distance between a circular buffer and a spatiotemporal box. More... | |
int | dwithin_cbuffer_cbuffer (const Cbuffer *cb1, const Cbuffer *cb2, double dist) |
Return true if two 2D circular buffers are within a distance. More... | |
bool | ensure_valid_cbuffer_cbuffer (const Cbuffer *cb1, const Cbuffer *cb2) |
Ensure the validity of two circular buffers. More... | |
bool | ensure_valid_cbuffer_geo (const Cbuffer *cb, const GSERIALIZED *gs) |
Ensure the validity of a circular buffer and geometry. More... | |
bool | ensure_valid_cbuffer_stbox (const Cbuffer *cb, const STBox *box) |
Ensure the validity of a circular buffer and spatiotemporal box. More... | |
bool | ensure_valid_cbufferset_cbuffer (const Set *s, const Cbuffer *cb) |
Return true if a set and a circular buffer are valid for set operations. More... | |
Cbuffer * | geom_to_cbuffer (const GSERIALIZED *gs) |
Convert a geometry into a circular buffer. More... | |
int | intersects_cbuffer_cbuffer (const Cbuffer *cb1, const Cbuffer *cb2) |
Return true if two circular buffers intersect in 2D. More... | |
bool | point_in_circle (const POINT2D *center, double radius, double x, double y) |
Return 1 if a point is inside a circle or in the border, 0 otherwise. More... | |
bool | point_inside_circle (const POINT2D *center, double radius, double x, double y) |
Return 1 if a point is inside a circle, 0 otherwise. More... | |
int | spatialrel_cbuffer (const Cbuffer *cb1, const Cbuffer *cb2, int(*func)(const Cbuffer *, const Cbuffer *)) |
Return true if two circular buffers satisfy a spatial relationship. More... | |
int | touches_cbuffer_cbuffer (const Cbuffer *cb1, const Cbuffer *cb2) |
Return true if the first circular buffer touches the second one. More... | |
Functions for the static circular buffer type.