GRASS 8 Programmer's Manual 8.6.0dev(2026)-ddeab64dbf
Loading...
Searching...
No Matches
rewind_ogr.c
Go to the documentation of this file.
1/*!
2 \file lib/vector/Vlib/rewind_ogr.c
3
4 \brief Vector library - rewind data (OGR)
5
6 Higher level functions for reading/writing/manipulating vectors.
7
8 (C) 2001-2009, 2011 by the GRASS Development Team
9
10 This program is free software under the GNU General Public License
11 (>=v2). Read the file COPYING that comes with GRASS for details.
12
13 \author Radim Blazek, Piero Cavalieri
14 */
15
16#include <grass/vector.h>
17#include <grass/glocale.h>
18
19#include <ogr_api.h>
20
21/*!
22 \brief Rewind vector map (OGR layer) to cause reads to start at
23 beginning (level 1)
24
25 \param Map pointer to Map_info structure
26
27 \return 0 on success
28 \return -1 on error
29 */
31{
32 G_debug(2, "V1_rewind_ogr(): name = %s", Map->name);
34
35 ogr_info = &(Map->fInfo.ogr);
36
37 ogr_info->cache.lines_num = 0;
38 ogr_info->cache.lines_next = 0;
39
41
42 return 0;
43}
44
45/*!
46 \brief Rewind vector map (OGR layer) to cause reads to start at
47 beginning on topological level (level 2)
48
49 \param Map pointer to Map_info structure
50
51 \return 0 on success
52 \return -1 on error
53 */
55{
56 G_debug(2, "V2_rewind_ogr(): name = %s", Map->name);
57 Map->next_line = 1;
58
60
61 return 0;
62}
AMI_err name(char **stream_name)
Definition ami_stream.h:426
int G_debug(int, const char *,...) __attribute__((format(printf
int V1_rewind_ogr(struct Map_info *Map)
Rewind vector map (OGR layer) to cause reads to start at beginning (level 1)
Definition rewind_ogr.c:30
int V2_rewind_ogr(struct Map_info *Map)
Rewind vector map (OGR layer) to cause reads to start at beginning on topological level (level 2)
Definition rewind_ogr.c:54
Non-native format info (OGR)
Vector map info.