|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-f6f2c534ea
|
Vector library - Open OGR layer as vector map layer. More...
#include <unistd.h>#include <string.h>#include <sys/types.h>#include <sys/stat.h>#include <grass/vector.h>#include <grass/dbmi.h>#include <grass/glocale.h>#include <ogr_api.h>
Go to the source code of this file.
Functions | |
| int | V1_open_old_ogr (struct Map_info *Map, int update) |
| Open existing OGR layer on non-topological level. | |
| int | V2_open_old_ogr (struct Map_info *Map) |
| Open existing OGR layer on topological level. | |
| int | V1_open_new_ogr (struct Map_info *Map, const char *name, int with_z) |
| Prepare OGR datasource for creating new OGR layer (level 1) | |
| int | Vect_open_fidx (struct Map_info *Map, struct Format_info_offset *offset) |
| Open feature index file. | |
Vector library - Open OGR layer as vector map layer.
Higher level functions for reading/writing/manipulating vectors.
(C) 2001-2010 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 open_ogr.c.
Prepare OGR datasource for creating new OGR layer (level 1)
New OGR layer is created when writing features by Vect_wrile_line().
| [out] | Map | pointer to Map_info structure |
| name | name of OGR layer to create | |
| with_z | WITH_Z for 3D vector data otherwise WITHOUT_Z |
Definition at line 169 of file open_ogr.c.
References _, G_debug(), G_fatal_error(), G_get_overwrite(), G_warning(), name, and NULL.
Open existing OGR layer on non-topological level.
Note: Map->name, Map->mapset, Map->fInfo.ogr.dsn and Map->fInfo.ogr.layer_name must be set before.
| [in,out] | Map | pointer to Map_info structure |
| update | TRUE for write mode, otherwise read-only |
Definition at line 41 of file open_ogr.c.
References _, FALSE, G_debug(), G_fatal_error(), G_warning(), Format_info_ogr::layer, NULL, WITH_Z, and WITHOUT_Z.
Open existing OGR layer on topological level.
This functions reads feature index (fidx) file required for pseudo-topology.
| [in,out] | Map | pointer to Map_info structure |
Definition at line 138 of file open_ogr.c.
References _, G_debug(), G_free(), G_warning(), G_zero(), AMI_STREAM< T >::name(), Vect_get_full_name(), and Vect_open_fidx().
Referenced by Vect__open_old().
| int Vect_open_fidx | ( | struct Map_info * | Map, |
| struct Format_info_offset * | offset | ||
| ) |
Open feature index file.
| [in,out] | Map | pointer to Map_info struct |
| [out] | offset | pointer to Format_info_offset (OGR or PG) |
Definition at line 238 of file open_ogr.c.
References _, Format_info_offset::array, Format_info_offset::array_alloc, Format_info_offset::array_num, Port_info::byte_order, dig__fread_port_C(), dig__fread_port_I(), dig__fread_port_L(), dig_file_init(), dig_init_portable(), dig_set_cur_port(), gvfile::file, G_debug(), G_fatal_error(), G_fopen_old(), G_free(), G_fseek(), G_malloc, G_warning(), GPATH_MAX, GV_DIRECTORY, GV_FIDX_ELEMENT, AMI_STREAM< T >::name(), NULL, and Vect_get_full_name().
Referenced by V2_open_old_ogr(), and V2_open_old_pg().