GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
|
Go to the source code of this file.
Data Structures | |
struct | _tgisMap |
struct | _tgisMapList |
List of tgisMap struct's. More... | |
struct | _tgisExtent |
struct | _tgisDatasetList |
List of tgisDatasets struct's. More... | |
struct | _tgisDataset |
Macros | |
#define | TGISDB_DEFAULT_DRIVER "sqlite" |
#define | TGISDB_DEFAULT_SQLITE_PATH "tgis/sqlite.db" |
#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 |
Typedefs | |
typedef struct _tgisMap | tgisMap |
typedef struct _tgisMapList | tgisMapList |
List of tgisMap struct's. More... | |
typedef struct _tgisExtent | tgisExtent |
typedef struct _tgisDatasetList | tgisDatasetList |
List of tgisDatasets struct's. More... | |
typedef struct _tgisDataset | tgisDataset |
Functions | |
int | tgis_set_connection (dbConnection *connection) |
Set Temporal GIS DB connection settings. More... | |
int | tgis_get_connection (dbConnection *connection) |
Get Temporal GIS DB connection settings. More... | |
const char * | tgis_get_default_driver_name (void) |
Get default TGIS driver name. More... | |
char * | tgis_get_default_database_name (void) |
Get default TGIS database name for the sqlite connection. More... | |
char * | tgis_get_driver_name (void) |
Get TGIS driver name. More... | |
char * | tgis_get_database_name (void) |
Get TGIS database name. More... | |
char * | tgis_get_mapset_driver_name (const char *) |
Get TGIS driver name from a specific mapset. More... | |
char * | tgis_get_mapset_database_name (const char *) |
Get TGIS database name. More... | |
int | tgis_set_default_connection (void) |
Sets up TGIS database connection settings using GRASS default. More... | |
void | tgis_init_map_list (tgisMapList *list) |
Init a tgisMapList and free allocated memory. More... | |
void | tgis_free_map_list (tgisMapList *list) |
Free allocated memory of an integer list. More... | |
tgisMapList * | tgis_new_map_list () |
Return a new integer list. More... | |
void | tgis_map_list_insert (tgisMapList *list, char *name, char *mapset, struct TimeStamp *ts) |
Insert map information into tgisMapList. More... | |
void | tgis_map_list_add (tgisMapList *list, tgisMap *map) |
Add a map to tgisMapList. More... | |
void | tgis_init_dataset_list (tgisDatasetList *list) |
void | tgis_free_dataset_list (tgisDatasetList *list) |
tgisDatasetList * | tgis_new_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) |
void | tgis_dataset_list_add (tgisDataset *dataset) |
int | tgis_build_topology (tgisDatasetList *A, char spatial) |
int | tgis_build_topology2 (tgisDatasetList *A, tgisDatasetList *B, char spatial) |
int | tgis_create_stds (char *stds_name, char stds_type, char temporal_type, char *title, char *description, char *semantic_type, char *aggregation_type) |
int | tgis_modify_stds (char *stds_name, char stds_type, char *title, char *description, char *semantic_type, char *aggregation_type) |
int | tgis_remove_stds (char *stds_name, char stds_type, char remove_maps) |
int | tgis_update_stds (char *stds_name, char stds_type) |
int | tgis_register_map (tgisMap *map, char map_type, char *stds_name) |
int | tgis_unregister_map (tgisMap *map, char map_type, char *stds_name) |
int | tgis_register_maps (tgisMapList *list, char map_type, char *stds_name) |
int | tgis_unregister_maps (tgisMapList *list, char map_type, char *stds_name) |
tgisDatasetList * | tgis_get_registered_maps (char *stds_name, char *mapset, char stds_type, char *order, char *where) |
tgisDatasetList * | tgis_get_registered_stds (char *stds_name, char *mapset, char stds_type, char temporal_type, char *order, char *where) |
tgisDataset * | tgis_get_stds_info (char *stds_name, char *mapset, char stds_type) |
#define TGIS_ABSOLUTE_TIME 0 |
Definition at line 41 of file temporal.h.
#define TGIS_RASTER3D_MAP 2 |
Definition at line 35 of file temporal.h.
#define TGIS_RASTER_MAP 1 |
Definition at line 34 of file temporal.h.
#define TGIS_RELATIVE_TIME 1 |
Definition at line 42 of file temporal.h.
#define TGIS_STR3DS 5 |
Definition at line 38 of file temporal.h.
#define TGIS_STRDS 4 |
Definition at line 37 of file temporal.h.
#define TGIS_STVDS 6 |
Definition at line 39 of file temporal.h.
#define TGIS_TYPE_MAP 0 |
Definition at line 31 of file temporal.h.
#define TGIS_TYPE_STDS 1 |
Definition at line 32 of file temporal.h.
#define TGIS_VECTOR_MAP 3 |
Definition at line 36 of file temporal.h.
#define TGISDB_DEFAULT_DRIVER "sqlite" |
Definition at line 9 of file temporal.h.
Referenced by tgis_get_default_driver_name().
#define TGISDB_DEFAULT_SQLITE_PATH "tgis/sqlite.db" |
Definition at line 11 of file temporal.h.
Referenced by tgis_get_default_database_name().
typedef struct _tgisDataset tgisDataset |
A dataset structure to organize time stamped maps and space time datasets and their spatio-temporal topological relations.
typedef struct _tgisDatasetList tgisDatasetList |
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 _tgisExtent tgisExtent |
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 _tgisMapList tgisMapList |
List of tgisMap struct's.
This structure is used to store lists of time stamped maps using the tgisMap structure internally.
int tgis_build_topology | ( | tgisDatasetList * | A, |
char | spatial | ||
) |
Build the temporal or spatio-temporal topology of the provided dataset list
int tgis_build_topology2 | ( | tgisDatasetList * | A, |
tgisDatasetList * | B, | ||
char | spatial | ||
) |
Build the temporal or spatio-temporal topology between the two dataset list
int tgis_create_stds | ( | char * | stds_name, |
char | stds_type, | ||
char | temporal_type, | ||
char * | title, | ||
char * | description, | ||
char * | semantic_type, | ||
char * | aggregation_type | ||
) |
Create the new space time dataset
void tgis_dataset_list_add | ( | tgisDataset * | dataset | ) |
Add 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 | ||
) |
Insert a new dataset to the dataset list
void tgis_free_dataset_list | ( | tgisDatasetList * | list | ) |
void tgis_free_map_list | ( | tgisMapList * | list | ) |
Free allocated memory of an integer list.
list | The pointer to an integer list |
Definition at line 28 of file map_list.c.
References G_free(), _tgisMap::mapset, _tgisMapList::n_values, _tgisMap::name, and _tgisMapList::values.
int tgis_get_connection | ( | dbConnection * | connection | ) |
Get Temporal GIS DB connection settings.
[out] | connection | pointer to dbConnection to be modified |
Definition at line 77 of file temporal/lib/connect.c.
References _db_connection::databaseName, DB_OK, _db_connection::driverName, G_getenv_nofatal2(), G_VAR_MAPSET, and G_zero().
char* tgis_get_database_name | ( | void | ) |
Get TGIS database name.
Definition at line 40 of file temporal/lib/connect.c.
References G_getenv_nofatal2(), G_store(), G_VAR_MAPSET, and NULL.
char* tgis_get_default_database_name | ( | void | ) |
Get default TGIS database name for the sqlite connection.
The default name is $GISDBASE/$LOCATION_NAME/$MAPSET/tgis/sqlite.db
Definition at line 39 of file temporal/lib/default_name.c.
References G_snprintf(), G_store(), and TGISDB_DEFAULT_SQLITE_PATH.
const char* tgis_get_default_driver_name | ( | void | ) |
Get default TGIS driver name.
Definition at line 27 of file temporal/lib/default_name.c.
References TGISDB_DEFAULT_DRIVER.
char* tgis_get_driver_name | ( | void | ) |
Get TGIS driver name.
Definition at line 24 of file temporal/lib/connect.c.
References G_getenv_nofatal2(), G_store(), G_VAR_MAPSET, and NULL.
char* tgis_get_mapset_database_name | ( | const char * | mapset | ) |
Get TGIS database name.
This function give a warning in case the mapset does not exists or it is not allowed to access the mapset. NULL is returned in this case..
mapset | The name of the mapset to receive the driver name from |
Definition at line 164 of file temporal/lib/connect.c.
char* tgis_get_mapset_driver_name | ( | const char * | mapset | ) |
Get TGIS driver name from a specific mapset.
This function give a warning in case the mapset does not exists or it is not allowed to access the mapset. NULL is returned in this case.
mapset | The name of the mapset to receive the driver name from |
Definition at line 148 of file temporal/lib/connect.c.
tgisDatasetList* tgis_get_registered_maps | ( | char * | stds_name, |
char * | mapset, | ||
char | stds_type, | ||
char * | order, | ||
char * | where | ||
) |
Get all maps that are registered in a space time dataset
tgisDatasetList* tgis_get_registered_stds | ( | char * | stds_name, |
char * | mapset, | ||
char | stds_type, | ||
char | temporal_type, | ||
char * | order, | ||
char * | where | ||
) |
Get all stds from the temporal database
tgisDataset* tgis_get_stds_info | ( | char * | stds_name, |
char * | mapset, | ||
char | stds_type | ||
) |
Get the information about a specific space time dataset from the temporal database
void tgis_init_dataset_list | ( | tgisDatasetList * | list | ) |
void tgis_init_map_list | ( | tgisMapList * | list | ) |
Init a tgisMapList and free allocated memory.
list | The pointer to a tgisMapList |
Definition at line 67 of file map_list.c.
References _tgisMapList::alloc_values, G_free(), _tgisMap::mapset, _tgisMapList::n_values, _tgisMap::name, NULL, and _tgisMapList::values.
Referenced by tgis_new_map_list().
void tgis_map_list_add | ( | tgisMapList * | list, |
tgisMap * | map | ||
) |
Add a map to tgisMapList.
Add a new map to the map list
This function adds a tgisMap to the list but does not check for duplicates. In case reallocation fails, G_fatal_error() will be invoked by the allocation function.
The content of the map will not be copied, the pointer to the map will be stored.
list | The tgisMapList pointer |
map | A pointer to a tgisMap struct that should be added |
Definition at line 100 of file map_list.c.
References _tgisMapList::alloc_values, G_realloc, _tgisMapList::n_values, and _tgisMapList::values.
void tgis_map_list_insert | ( | tgisMapList * | list, |
char * | name, | ||
char * | mapset, | ||
struct TimeStamp * | ts | ||
) |
Insert map information into tgisMapList.
Insert a new map to the map list
This function allocates a tgisMap, fills it with the provided information and adds it to the list. In case allocation fails, G_fatal_error() will be invoked by the allocation function.
All arguments are deep copied to the new allocated tgisMap struct.
list | The tgisMapList pointer |
name | The name of the map |
mapset | The name of the mapset |
ts | A pointer to the timestamp of the map |
Definition at line 130 of file map_list.c.
int tgis_modify_stds | ( | char * | stds_name, |
char | stds_type, | ||
char * | title, | ||
char * | description, | ||
char * | semantic_type, | ||
char * | aggregation_type | ||
) |
Modify the metadata of an existing space time dataset
tgisDatasetList* tgis_new_dataset_list | ( | ) |
tgisMapList* tgis_new_map_list | ( | ) |
Return a new integer list.
G_fatal_error() will be invoked by the allocation function.
Definition at line 53 of file map_list.c.
References G_malloc, list, NULL, tgis_init_map_list(), and _tgisMapList::values.
int tgis_register_map | ( | tgisMap * | map, |
char | map_type, | ||
char * | stds_name | ||
) |
Register a map in the temporal database and optionally in a space time dataset
int tgis_register_maps | ( | tgisMapList * | list, |
char | map_type, | ||
char * | stds_name | ||
) |
Register maps in the temporal database and optionally in a space time dataset
int tgis_remove_stds | ( | char * | stds_name, |
char | stds_type, | ||
char | remove_maps | ||
) |
Remove a space time dataset and optionally all of its maps
int tgis_set_connection | ( | dbConnection * | connection | ) |
Set Temporal GIS DB connection settings.
This function sets environmental variables as TGISDB_DRIVER, TGISDB_DATABASE.
connection | pointer to dbConnection with default settings |
Definition at line 59 of file temporal/lib/connect.c.
References _db_connection::databaseName, DB_OK, _db_connection::driverName, G_setenv2(), and G_VAR_MAPSET.
int tgis_set_default_connection | ( | void | ) |
Sets up TGIS database connection settings using GRASS default.
Definition at line 54 of file temporal/lib/default_name.c.
int tgis_unregister_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_maps | ( | tgisMapList * | list, |
char | map_type, | ||
char * | stds_name | ||
) |
Unregister maps from the temporal database or optionally from a space time dataset
int tgis_update_stds | ( | char * | stds_name, |
char | stds_type | ||
) |