34#ifndef __TPOINT_TILE_H__
35#define __TPOINT_TILE_H__
92 double xsize,
double ysize,
double zsize,
int64 tunits,
bool hasx,
bool hasz,
95 const STBox *box,
double xsize,
double ysize,
double zsize,
102 double xsize,
double ysize,
double zsize,
const Interval *duration,
104 bool border_inc,
int *ntiles);
107 double xsize,
double ysize,
double zsize,
const Interval *duration,
External API of the Mobility Engine Open Source (MEOS) library.
int64 TimestampTz
Definition: postgres_ext_defs.in.h:22
signed int int32
Definition: postgres_ext_defs.in.h:11
long int int64
Definition: postgres_ext_defs.in.h:12
int ndims
Number of dimensions.
Definition: tgeo_tile.h:51
Structure for storing a bit matrix.
Definition: tgeo_tile.h:50
Definition: postgis_ext_defs.in.h:170
Definition: postgres_ext_defs.in.h:27
Definition: postgis_ext_defs.in.h:122
Structure to represent spatiotemporal boxes.
Definition: meos.h:134
bool hasx
True when tiles have X dimension.
Definition: tgeo_tile.h:63
double xsize
Size of the x dimension.
Definition: tgeo_tile.h:67
BitMatrix * bm
Optional bit matrix for speeding up the computation of the split functions.
Definition: tgeo_tile.h:73
int max_coords[MAXDIMS]
Maximum coordinates of the tiles.
Definition: tgeo_tile.h:80
int coords[MAXDIMS]
Coordinates of the current tile.
Definition: tgeo_tile.h:81
double y
Minimum y value of the current tile.
Definition: tgeo_tile.h:76
STBox box
Bounding box of the grid.
Definition: tgeo_tile.h:71
int64 tunits
Size of the time dimension, 0 for spatial only.
Definition: tgeo_tile.h:70
TimestampTz t
Minimum t value of the current tile, if any.
Definition: tgeo_tile.h:78
double x
Minimum x value of the current tile.
Definition: tgeo_tile.h:75
bool hast
True when tiles have T dimension.
Definition: tgeo_tile.h:65
bool done
True when all tiles have been processed.
Definition: tgeo_tile.h:62
int i
Number of current tile.
Definition: tgeo_tile.h:66
int ntiles
Total number of tiles.
Definition: tgeo_tile.h:79
const Temporal * temp
Optional temporal point to be split.
Definition: tgeo_tile.h:72
double ysize
Size of the y dimension.
Definition: tgeo_tile.h:68
double z
Minimum z value of the current tile, if any.
Definition: tgeo_tile.h:77
bool hasz
True when tiles have Z dimension.
Definition: tgeo_tile.h:64
double zsize
Size of the z dimension, 0 for 2D.
Definition: tgeo_tile.h:69
Struct for storing the state that persists across multiple calls generating a multidimensional grid.
Definition: tgeo_tile.h:61
Structure to represent the common structure of temporal values of any temporal subtype.
Definition: meos.h:173
BitMatrix * bitmatrix_make(int *count, int ndims)
Create a bit matrix.
Definition: tgeo_tile.c:63
bool stbox_tile_state_get(STboxGridState *state, STBox *box)
Get the current tile of the multidimensional grid.
Definition: tgeo_tile.c:637
#define MAXDIMS
Functions for spatiotemporal bounding boxes.
Definition: tgeo_tile.h:42
void stbox_tile_state_next(STboxGridState *state)
Increment the current state to the next tile of the multidimensional grid.
Definition: tgeo_tile.c:539
int tpoint_set_tiles(const Temporal *temp, const STboxGridState *state, BitMatrix *bm)
Set the bit corresponding to the tiles intersecting a temporal point.
Definition: tgeo_tile.c:1242
void stbox_tile_state_set(double x, double y, double z, TimestampTz t, double xsize, double ysize, double zsize, int64 tunits, bool hasx, bool hasz, bool hast, int32 srid, STBox *result)
Generate a tile from the current state of the multidimensional grid.
Definition: tgeo_tile.c:502
STboxGridState * tgeo_space_time_tile_init(const Temporal *temp, double xsize, double ysize, double zsize, const Interval *duration, const GSERIALIZED *sorigin, TimestampTz torigin, bool bitmatrix, bool border_inc, int *ntiles)
Set the state with a temporal point and a space and possibly time grid for splitting or obtaining a s...
Definition: tgeo_tile.c:1272
STBox * stbox_space_time_tile(const GSERIALIZED *point, TimestampTz t, double xsize, double ysize, double zsize, const Interval *duration, const GSERIALIZED *sorigin, TimestampTz torigin, bool hasx, bool hast)
Return a tile in the multidimensional grid of a spatiotemporal box.
Definition: tgeo_tile.c:821
Temporal * tpoint_at_tile(const Temporal *temp, const STBox *box)
Restrict a temporal point to a tile defined by a spatiotemporal box.
Definition: tile.c:26
STboxGridState * stbox_tile_state_make(const Temporal *temp, const STBox *box, double xsize, double ysize, double zsize, const Interval *duration, POINT3DZ sorigin, TimestampTz torigin, bool border_inc)
Create the initial state that persists across multiple calls of the function.
Definition: tgeo_tile.c:374