GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-36359e2344
|
Vector library - header manipulation (relevant for external formats) More...
Go to the source code of this file.
Functions | |
const char * | Vect_get_finfo_dsn_name (struct Map_info *Map) |
Get datasource name (relevant only for non-native formats) More... | |
char * | Vect_get_finfo_layer_name (struct Map_info *Map) |
Get layer name (relevant only for non-native formats) More... | |
const char * | Vect_get_finfo_format_info (struct Map_info *Map) |
Get format info as string (relevant only for non-native formats) More... | |
const char * | Vect_get_finfo_geometry_type (struct Map_info *Map) |
Get geometry type as string (relevant only for non-native formats) More... | |
const struct Format_info * | Vect_get_finfo (struct Map_info *Map) |
Get header info for non-native formats. More... | |
int | Vect_get_finfo_topology_info (struct Map_info *Map, char **toposchema, char **topogeom, int *topo_geo_only) |
Get topology type (relevant only for non-native formats) More... | |
Vector library - header manipulation (relevant for external formats)
Higher level functions for reading/writing/manipulating vectors.
(C) 2001-2013 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file header_finfo.c.
const struct Format_info* Vect_get_finfo | ( | struct Map_info * | Map | ) |
Get header info for non-native formats.
Map | pointer to Map_info structure |
Definition at line 224 of file header_finfo.c.
References Format_info_pg::conninfo, Format_info_ogr::driver_name, Map_info::fInfo, NULL, Format_info::ogr, and Format_info::pg.
const char* Vect_get_finfo_dsn_name | ( | struct Map_info * | Map | ) |
Get datasource name (relevant only for non-native formats)
Returns:
Map | pointer to Map_info structure |
Definition at line 37 of file header_finfo.c.
References _, Format_info_pg::db_name, Format_info_ogr::dsn, Map_info::fInfo, Map_info::format, G_debug(), G_warning(), GV_FORMAT_OGR, GV_FORMAT_OGR_DIRECT, GV_FORMAT_POSTGIS, NULL, Format_info::ogr, Format_info::pg, and Vect_get_full_name().
const char* Vect_get_finfo_format_info | ( | struct Map_info * | Map | ) |
Get format info as string (relevant only for non-native formats)
Map | pointer to Map_info structure |
Definition at line 108 of file header_finfo.c.
References _, Format_info_ogr::ds, Map_info::fInfo, Map_info::format, G_warning(), GV_FORMAT_OGR, GV_FORMAT_OGR_DIRECT, GV_FORMAT_POSTGIS, NULL, and Format_info::ogr.
Referenced by Vect_build_ogr(), and Vect_build_pg().
const char* Vect_get_finfo_geometry_type | ( | struct Map_info * | Map | ) |
Get geometry type as string (relevant only for non-native formats)
Note: All inner spaces are removed, function returns feature type in lowercase.
Map | pointer to Map_info structure |
Definition at line 143 of file header_finfo.c.
References _, Format_info_pg::conn, DB_SQL_MAX, Map_info::fInfo, Map_info::format, G_debug(), G_free(), G_malloc, G_store(), G_str_replace(), G_str_to_lower(), G_warning(), GV_FORMAT_OGR, GV_FORMAT_OGR_DIRECT, GV_FORMAT_POSTGIS, Format_info_ogr::layer, NULL, Format_info::ogr, Format_info::pg, Format_info_pg::res, Format_info_pg::schema_name, and Format_info_pg::table_name.
Referenced by Vect_build_ogr(), Vect_build_pg(), and Vect_fidx_dump().
char* Vect_get_finfo_layer_name | ( | struct Map_info * | Map | ) |
Get layer name (relevant only for non-native formats)
Returns:
Note: allocated string should be freed by G_free()
Map | pointer to Map_info structure |
Definition at line 73 of file header_finfo.c.
References _, Map_info::fInfo, Map_info::format, G_asprintf(), G_debug(), G_store(), G_warning(), GV_FORMAT_OGR, GV_FORMAT_OGR_DIRECT, GV_FORMAT_POSTGIS, Format_info_ogr::layer_name, name, NULL, Format_info::ogr, Format_info::pg, Format_info_pg::schema_name, Format_info_pg::table_name, and Vect_get_full_name().
int Vect_get_finfo_topology_info | ( | struct Map_info * | Map, |
char ** | toposchema, | ||
char ** | topogeom, | ||
int * | topo_geo_only | ||
) |
Get topology type (relevant only for non-native formats)
Map | pointer to Map_info structure | |
[out] | toposchema | Topology schema name or NULL |
[out] | topogeom | TopoGeometry column name or NULL |
[out] | topo_geo_only | TRUE for Topo-Geo data model or NULL |
Definition at line 247 of file header_finfo.c.
References _, Map_info::fInfo, Map_info::format, G_store(), G_warning(), GV_FORMAT_OGR, GV_FORMAT_OGR_DIRECT, GV_FORMAT_POSTGIS, GV_TOPO_NATIVE, GV_TOPO_POSTGIS, GV_TOPO_PSEUDO, Format_info::pg, Format_info_pg::topo_geo_only, Format_info_pg::topogeom_column, and Format_info_pg::toposchema_name.