MobilityDB  1.0
Functions
tpoint_tile.c File Reference

Functions for spatial and spatiotemporal tiles. More...

#include <postgres.h>
#include <assert.h>
#include <funcapi.h>
#include <access/htup_details.h>
#include <liblwgeom.h>
#include "point/tpoint_tile.h"
#include "general/period.h"
#include "general/timeops.h"
#include "general/temporaltypes.h"
#include "general/temporal_util.h"
#include "general/temporal_tile.h"
#include "point/tpoint.h"
#include "point/tpoint_spatialfuncs.h"
Include dependency graph for tpoint_tile.c:

Functions

BitMatrixbitmatrix_make (int *count, int numdims)
 Create a bit matrix. More...
 
bool bitmatrix_get (const BitMatrix *bm, int *coords)
 Get the value of the bit in the bit matrix. More...
 
void bitmatrix_set (BitMatrix *bm, int *coords, bool value)
 Set the value of the bit in the bit matrix. More...
 
static void bresenham_bm (BitMatrix *bm, int *coords1, int *coords2, int numdims)
 Set in the bit matrix the bits of the tiles connecting with a line the two input tiles. More...
 
static void stbox_tile_set (STBOX *result, double x, double y, double z, TimestampTz t, double size, int64 tunits, bool hasz, bool hast, int32 srid)
 Generate a tile from the current state of the multidimensional grid. More...
 
static STboxGridStatestbox_tile_state_make (Temporal *temp, STBOX *box, double size, int64 tunits, POINT3DZ sorigin, TimestampTz torigin)
 Create the initial state that persists across multiple calls of the function. More...
 
static void stbox_tile_state_next (STboxGridState *state)
 Increment the current state to the next tile of the multidimensional grid. More...
 
static bool stbox_tile_state_get (STBOX *box, STboxGridState *state)
 Get the current tile of the multidimensional grid. More...
 
Datum stbox_multidim_grid (PG_FUNCTION_ARGS)
 Generate a multidimensional grid for temporal points. More...
 
Datum stbox_multidim_tile (PG_FUNCTION_ARGS)
 Generate a tile in a multidimensional grid for temporal points. More...
 
void tile_get_coords (int *coords, double x, double y, double z, TimestampTz t, const STboxGridState *state)
 Transform the minimum values of a tile into matrix coordinates. More...
 
void tpointinst_get_coords (int *coords, const TInstant *inst, bool hasz, bool hast, const STboxGridState *state)
 Get the coordinates of the tile corresponding the temporal instant point. More...
 
void tpointinst_set_tiles (BitMatrix *bm, const TInstant *inst, bool hasz, bool hast, const STboxGridState *state)
 Set the bit corresponding to the tiles intersecting the temporal point. More...
 
void tpointinstset_set_tiles (BitMatrix *bm, const TInstantSet *ti, bool hasz, bool hast, const STboxGridState *state)
 Set the bit corresponding to the tiles intersecting the temporal point. More...
 
void tpointseq_set_tiles (BitMatrix *bm, const TSequence *seq, bool hasz, bool hast, const STboxGridState *state)
 Set the bit corresponding to the tiles intersecting the temporal point. More...
 
void tpointseqset_set_tiles (BitMatrix *bm, const TSequenceSet *ts, bool hasz, bool hast, const STboxGridState *state)
 Set the bit corresponding to the tiles intersecting the temporal point. More...
 
void tpoint_set_tiles (BitMatrix *bm, const Temporal *temp, const STboxGridState *state)
 Set the bit corresponding to the tiles intersecting the temporal point (dispatch function) More...
 
Datum tpoint_space_split (PG_FUNCTION_ARGS)
 Split a temporal point with respect to a spatial grid. More...
 
Datum tpoint_space_time_split (PG_FUNCTION_ARGS)
 Split a temporal point with respect to a spatiotemporal grid. More...
 

Detailed Description

Functions for spatial and spatiotemporal tiles.