GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
|
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 (const struct Map_info *Map) |
Get datasource name (relevant only for non-native formats) More... | |
char * | Vect_get_finfo_layer_name (const struct Map_info *Map) |
Get layer name (relevant only for non-native formats) More... | |
const char * | Vect_get_finfo_format_info (const struct Map_info *Map) |
Get format info as string (relevant only for non-native formats) More... | |
const char * | Vect_get_finfo_geometry_type (const struct Map_info *Map) |
Get geometry type as string (relevant only for non-native formats) More... | |
const struct Format_info * | Vect_get_finfo (const struct Map_info *Map) |
Get header info for non-native formats. More... | |
int | Vect_get_finfo_topology_info (const 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 | ( | const struct Map_info * | Map | ) |
Get header info for non-native formats.
Map | pointer to Map_info structure |
Definition at line 225 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 | ( | const struct Map_info * | Map | ) |
Get datasource name (relevant only for non-native formats)
Returns:
Map | pointer to Map_info structure |
Definition at line 36 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 | ( | const 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 | ( | const 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 144 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 | ( | const 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 72 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 | ( | const 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 248 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.