/usr/lib/grass74/include/grass/temporal.h is in grass-dev 7.4.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 | #ifndef GRASS_TEMPORAL_H
#define GRASS_TEMPORAL_H
#include <grass/datetime.h>
#include <grass/gis.h>
#include <grass/dbmi.h>
#define TGISDB_DEFAULT_DRIVER "sqlite"
/* Default path in the current location */
#define TGISDB_DEFAULT_SQLITE_PATH "tgis/sqlite.db"
int tgis_set_connection(dbConnection * connection);
int tgis_get_connection(dbConnection * connection);
const char *tgis_get_default_driver_name(void);
char *tgis_get_default_database_name(void);
char *tgis_get_driver_name(void);
char *tgis_get_database_name(void);
char *tgis_get_mapset_driver_name(const char*);
char *tgis_get_mapset_database_name(const char*);
int tgis_set_default_connection(void);
/* ALL CODE BELOW THIS COMMENT
* IS A PROTOTYPICAL DEFINITION OF THE
* FUTURE TEMPORAL GIS C-LIBRARY INTERFACE
* AND NOT YET IMPLEMENTED
*/
#define TGIS_TYPE_MAP 0
#define TGIS_TYPE_STDS 1
#define TGIS_RASTER_MAP 1
#define TGIS_RASTER3D_MAP 2
#define TGIS_VECTOR_MAP 3
#define TGIS_STRDS 4
#define TGIS_STR3DS 5
#define TGIS_STVDS 6
#define TGIS_ABSOLUTE_TIME 0
#define TGIS_RELATIVE_TIME 1
/*! A simple structure to organize time stamped maps*/
typedef struct _tgisMap {
char *name;
char *mapset;
struct TimeStamp ts;
} tgisMap;
/*!
\brief List of tgisMap struct's
This structure is used to store lists of time stamped maps
using the tgisMap structure internally.
*/
typedef struct _tgisMapList
{
/*!
\brief Array of tgisMap struct's
*/
tgisMap **values;
/*!
\brief Number of tgisMap struct's in the list
*/
int n_values;
/*!
\brief Allocated space for tgisMap struct's
*/
int alloc_values;
} tgisMapList;
/* map_list.c */
void tgis_init_map_list(tgisMapList *list);
void tgis_free_map_list(tgisMapList *list);
tgisMapList * tgis_new_map_list();
/*! Insert a new map to the map list */
void tgis_map_list_insert(tgisMapList *list, char *name, char*mapset, struct TimeStamp *ts);
/*! Add a new map to the map list */
void tgis_map_list_add(tgisMapList *list, tgisMap *map);
/*!Spatio temporal extent as double values
The spatio temporal extent contains only double values.
The unit of start and end time is seconds in case the time is absolute.
Reference is Jan. 1. 1900 00:00:00 +00:00 UTC
If no end time is present, because its a time instance, then has_end must be 0.
*/
typedef struct _tgisExtent
{
double start; /*Start time as double value*/
double end; /*End time as double value*/
char has_end; /*Set to 1 if the end time exists, 0 otherwise*/
double north;
double south;
double east;
double west;
double top;
double bottom;
} tgisExtent;
/* Forward declaration */
struct _tgisDataset;
/*!
\brief List of tgisDatasets struct's
This structure is used to store lists of dataset (space time datasets or time stamped maps)
using the tgisDataset structure internally.
*/
typedef struct _tgisDatasetList
{
/*!
\brief Array of tgisDataset structs
*/
struct _tgisDataset **values;
/*!
\brief Number of tgisDataset structs in the list
*/
int n_values;
/*!
\brief Allocated space for tgisDataset structs
*/
int alloc_values;
} tgisDatasetList;
/*! A dataset structure to organize time stamped maps and space time datasets
and their spatio-temporal topological relations.
*/
typedef struct _tgisDataset {
char *name; /* The name of this dataset */
char *mapset; /* The mapset of this dataset */
char *creator; /* The creator of this dataset */
DateTime creation_time; /* The creation time of this dataset */
char temporal_type; /* The temporal type of this dataset: TGIS_ABSOLUTE_TIME,
TGIS_RELATIVE_TIME */
struct TimeStamp ts; /* The timestamp of this dataset */
tgisExtent extent; /* This is the spatio-temporal extent represented as double values */
void *metadata; /* A pointer to the dataset specific metadata (not used yet) */
char dataset_type; /* The type of the dataset: TGIS_RASTER_MAP, TGIS_RASTER3D_MAP,
TGIS_VECTOR_MAP, TGIS_STRDS, TGIS_STR3DS, TGIS_STVDS */
char is_stds; /* Represent this struct a space time dataset? 1 True, 0 False */
struct _tgisDataset *next;
struct _tgisDataset *prev;
/* Temporal topology relations */
tgisDatasetList equal;
tgisDatasetList follows;
tgisDatasetList precedes;
tgisDatasetList overlaps;
tgisDatasetList overlapped;
tgisDatasetList during;
tgisDatasetList contains;
tgisDatasetList starts;
tgisDatasetList started;
tgisDatasetList finishes;
tgisDatasetList finished;
/* Spatial topology relations */
tgisDatasetList equivalent;
tgisDatasetList cover;
tgisDatasetList covered;
tgisDatasetList overlap;
tgisDatasetList in;
tgisDatasetList contain;
tgisDatasetList meet;
} tgisDataset;
/* dataset_list.c */
void tgis_init_dataset_list(tgisDatasetList *list);
void tgis_free_dataset_list(tgisDatasetList *list);
tgisDatasetList * tgis_new_dataset_list();
/*! Insert a new dataset to the dataset list */
void tgis_dataset_list_insert(tgisDatasetList *list, char *name, char *mapset, char *creator,
DateTime *creation_time, char temporal_type,
struct TimeStamp *ts, tgisExtent *extent, void *metadata,
char dataset_type, char is_stds);
/*! Add a new dataset to the dataset list */
void tgis_dataset_list_add(tgisDataset *dataset);
/* topology.c */
/*! Build the temporal or spatio-temporal topology of the provided dataset list */
int tgis_build_topology(tgisDatasetList *A, char spatial);
/*! Build the temporal or spatio-temporal topology between the two dataset list */
int tgis_build_topology2(tgisDatasetList *A, tgisDatasetList *B, char spatial);
/*
* INTERFACE TO THE TEMPORAL PYTHON FRAMEWORK
*/
/* create.c */
/*! Create the new space time dataset */
int tgis_create_stds(char *stds_name, char stds_type, char temporal_type, char *title,
char *description, char *semantic_type, char *aggregation_type);
/*! Modify the metadata of an existing space time dataset */
int tgis_modify_stds(char *stds_name, char stds_type, char *title,
char *description, char *semantic_type, char *aggregation_type);
/* remove.c */
/*! Remove a space time dataset and optionally all of its maps */
int tgis_remove_stds(char *stds_name, char stds_type, char remove_maps);
/* update.c */
int tgis_update_stds(char *stds_name, char stds_type);
/* register.c */
/*! Register a map in the temporal database and optionally in a space time dataset */
int tgis_register_map(tgisMap *map, char map_type, char *stds_name);
/*! Unregister a map from the temporal database or optionally from a space time dataset */
int tgis_unregister_map(tgisMap *map, char map_type, char *stds_name);
/*! Register maps in the temporal database and optionally in a space time dataset */
int tgis_register_maps(tgisMapList *list, char map_type, char *stds_name);
/*! Unregister maps from the temporal database or optionally from a space time dataset */
int tgis_unregister_maps(tgisMapList *list, char map_type, char *stds_name);
/*! Get all maps that are registered in a space time dataset */
tgisDatasetList *tgis_get_registered_maps(char *stds_name, char *mapset,
char stds_type, char *order,
char *where);
/* stds.c */
/*! Get all stds from the temporal database */
tgisDatasetList *tgis_get_registered_stds(char *stds_name, char *mapset,
char stds_type, char temporal_type,
char *order, char *where);
/*! Get the information about a specific space time dataset from the temporal database */
tgisDataset *tgis_get_stds_info(char *stds_name, char *mapset, char stds_type);
#endif
|