MobilityDB 1.3
Loading...
Searching...
No Matches
Macros | Functions
pose.c File Reference
#include <math.h>
#include <float.h>
#include <limits.h>
#include <postgres.h>
#include <common/hashfn.h>
#include <meos.h>
#include <meos_pose.h>
#include <meos_internal.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/tgeo_spatialfuncs.h"
#include "geo/tspatial.h"
#include "geo/tspatial_parser.h"
#include "pose/pose.h"

Macros

#define MAXPOSELEN   256
 Basic functions for static pose objects. More...
 

Functions

Datum datum_pose_distance (Datum pose1, Datum pose2)
 Return the distance between two circular buffers. More...
 
Datum datum_pose_point (Datum pose)
 Convert a pose into a geometry point. More...
 
Datum datum_pose_rotation (Datum pose)
 Convert a pose into a geometry point. More...
 
Datum datum_pose_round (Datum pose, Datum size)
 Return a pose with the precision of the values set to a number of decimal places. More...
 
double distance_pose_geo (const Pose *pose, const GSERIALIZED *gs)
 Return the distance between a pose and a geometry. More...
 
double distance_pose_pose (const Pose *pose1, const Pose *pose2)
 Return the distance between two poses. More...
 
double distance_pose_stbox (const Pose *pose, const STBox *box)
 Return the distance between a pose and a spatiotemporal box. More...
 
bool ensure_unit_norm (double W, double X, double Y, double Z)
 Ensure that a 3D orientation has a unit norm. More...
 
bool ensure_valid_pose_geo (const Pose *pose, const GSERIALIZED *gs)
 Ensure the validity of a pose and a geometry/geography. More...
 
bool ensure_valid_pose_pose (const Pose *pose1, const Pose *pose2)
 Ensure the validity of two circular poses. More...
 
bool ensure_valid_pose_stbox (const Pose *pose, const STBox *box)
 Ensure the validity of a pose and a spatiotemporal box. More...
 
bool ensure_valid_poseset_pose (const Set *s, const Pose *pose)
 Return true if a set and a pose are valid for set operations. More...
 
bool ensure_valid_rotation (double theta)
 Ensure that a 3D orientation has a unit norm. More...
 
void hashlittle2 (const void *key, size_t length, uint32_t *pc, uint32_t *pb)
 
char * pose_as_ewkt (const Pose *pose, int maxdd)
 Return the Extended Well-Known Text (EWKT) representation of a pose. More...
 
char * pose_as_hexwkb (const Pose *pose, uint8_t variant, size_t *size_out)
 Return the ASCII hex-encoded Well-Known Binary (HexWKB) representation of a pose. More...
 
char * pose_as_text (const Pose *pose, int maxdd)
 Return the Well-Known Text (WKT) representation of a pose. More...
 
uint8_t * pose_as_wkb (const Pose *pose, uint8_t variant, size_t *size_out)
 Return the Well-Known Binary (WKB) representation of a pose. More...
 
int pose_cmp (const Pose *pose1, const Pose *pose2)
 Return -1, 0, or 1 depending on whether the first pose is less than, equal to, or greater than the second one. More...
 
bool pose_collinear (const Pose *p1, const Pose *p2, const Pose *p3, double ratio)
 Return true if the three values are collinear. More...
 
Posepose_copy (const Pose *pose)
 Copy a pose value. More...
 
Datum pose_distance (Datum pose1, Datum pose2)
 Return the distance between the two poses. More...
 
bool pose_eq (const Pose *pose1, const Pose *pose2)
 Return true if the first pose is equal to the second one. More...
 
Posepose_from_hexwkb (const char *hexwkb)
 Return a pose from its ASCII hex-encoded Well-Known Binary (WKB) representation. More...
 
Posepose_from_wkb (const uint8_t *wkb, size_t size)
 Return a pose from its Well-Known Binary (WKB) representation. More...
 
bool pose_ge (const Pose *pose1, const Pose *pose2)
 Return true if the first pose is greater than or equal to the second one. More...
 
bool pose_gt (const Pose *pose1, const Pose *pose2)
 Return true if the first pose is greater than the second one. More...
 
uint32 pose_hash (const Pose *pose)
 Return the 32-bit hash value of a pose. More...
 
uint64 pose_hash_extended (const Pose *pose, uint64 seed)
 Return the 64-bit hash value of a pose using a seed. More...
 
Posepose_in (const char *str)
 Return a pose from its string representation. More...
 
bool pose_le (const Pose *pose1, const Pose *pose2)
 Return true if the first pose is less than or equal to the second one. More...
 
bool pose_lt (const Pose *pose1, const Pose *pose2)
 Return true if the first pose is less than the second one. More...
 
Posepose_make_2d (double x, double y, double theta, int32_t srid)
 Construct a 2D pose value from the arguments. More...
 
Posepose_make_3d (double x, double y, double z, double W, double X, double Y, double Z, int32_t srid)
 Construct a 3D pose value from the arguments. More...
 
Posepose_make_point2d (const GSERIALIZED *gs, double theta)
 Construct a 2D pose value from a 2D point and a rotation angle. More...
 
Posepose_make_point3d (const GSERIALIZED *gs, double W, double X, double Y, double Z)
 Construct a 3D pose value from the arguments. More...
 
bool pose_ne (const Pose *pose1, const Pose *pose2)
 Return true if the first pose is not equal to the second one. More...
 
bool pose_nsame (const Pose *pose1, const Pose *pose2)
 Return true if the first pose is not equal to the second one. More...
 
double * pose_orientation (const Pose *pose)
 Return the orientation of a 3D pose. More...
 
char * pose_out (const Pose *pose, int maxdd)
 Return the string representation of a pose. More...
 
Posepose_parse (const char **str, bool end)
 Parse a pose value from the buffer. More...
 
double pose_rotation (const Pose *pose)
 Return the rotation of a 2D pose. More...
 
Posepose_round (const Pose *pose, int maxdd)
 Return a pose with the precision of the values set to a number of decimal places. More...
 
bool pose_same (const Pose *pose1, const Pose *pose2)
 Return true if the first pose is equal to the second one. More...
 
void pose_set_srid (Pose *pose, int32_t srid)
 Set the SRID. More...
 
int32_t pose_srid (const Pose *pose)
 Return the SRID. More...
 
GSERIALIZEDpose_to_point (const Pose *pose)
 Convert a pose into a geometry point. More...
 
Posepose_transf_pj (const Pose *pose, int32_t srid_to, const LWPROJ *pj)
 Return a pose transformed to another SRID using a pipeline. More...
 
Posepose_transform (const Pose *pose, int32_t srid_to)
 Return a pose transformed to another SRID. More...
 
Posepose_transform_pipeline (const Pose *pose, const char *pipeline, int32_t srid_to, bool is_forward)
 Return a pose transformed to another SRID using a pipeline. More...
 
char * pose_wkt_out (const Pose *pose, bool extended, int maxdd)
 Output a pose in the Well-Known Text (WKT) representation. More...
 
GSERIALIZEDposearr_points (Pose **posearr, int count)
 Return a geometry multipoint converted from an array of poses. More...
 
Pose ** posearr_round (const Pose **posearr, int count, int maxdd)
 Return an array of poses with the precision of the vales set to a number of decimal places. More...
 
Poseposesegm_interpolate (const Pose *start, const Pose *end, double ratio)
 Return the pose value interpolated from the two poses and a ratio. More...
 
long double posesegm_locate (const Pose *start, const Pose *end, const Pose *value)
 Return a float in (0,1) if a network point segment intersects a network point, return -1.0 if the network point is not located in the segment or if it is approximately equal to the start or the end valuess. More...