GRASS 8 Programmer's Manual 8.6.0dev(2026)-c83afef6d3
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 SPDX-FileCopyrightText: 2001-2009, 2011 GRASS Development Team
9 SPDX-License-Identifier: GPL-2.0-or-later
10
11 \author Radim Blazek, Piero Cavalieri
12 */
13
14#include <grass/vector.h>
15#include <grass/glocale.h>
16
17#include <ogr_api.h>
18
19/*!
20 \brief Rewind vector map (OGR layer) to cause reads to start at
21 beginning (level 1)
22
23 \param Map pointer to Map_info structure
24
25 \return 0 on success
26 \return -1 on error
27 */
29{
30 G_debug(2, "V1_rewind_ogr(): name = %s", Map->name);
32
33 ogr_info = &(Map->fInfo.ogr);
34
35 ogr_info->cache.lines_num = 0;
36 ogr_info->cache.lines_next = 0;
37
39
40 return 0;
41}
42
43/*!
44 \brief Rewind vector map (OGR layer) to cause reads to start at
45 beginning on topological level (level 2)
46
47 \param Map pointer to Map_info structure
48
49 \return 0 on success
50 \return -1 on error
51 */
53{
54 G_debug(2, "V2_rewind_ogr(): name = %s", Map->name);
55 Map->next_line = 1;
56
58
59 return 0;
60}
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:28
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:52
Non-native format info (OGR)
Vector map info.