GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
level.c
Go to the documentation of this file.
1
/*!
2
\file lib/vector/Vlib/level.c
3
4
\brief Vector library - level info
5
6
(C) 2001-2009 by the GRASS Development Team
7
8
This program is free software under the GNU General Public License
9
(>=v2). Read the file COPYING that comes with GRASS for details.
10
11
\author Original author CERL, probably Dave Gerdes or Mike Higgins.
12
\author Update to GRASS 5.7 Radim Blazek and David D. Gray.
13
*/
14
15
#include <
grass/vector.h
>
16
#include <
grass/glocale.h
>
17
18
/*!
19
\brief Returns level that Map is opened at
20
21
- 1: no topology
22
- 2: topology support
23
24
\param Map vector map
25
26
\return open level
27
\return -1 on error
28
*/
29
int
Vect_level
(
const
struct
Map_info
*Map)
30
{
31
if
(Map->
open
!=
VECT_OPEN_CODE
) {
32
if
(Map->
open
!=
VECT_CLOSED_CODE
)
33
G_warning
(
"Vect_level(): %s"
,
34
_
(
"Map structure was never initialized"
));
35
else
36
G_warning
(
"Vect_level(): %s"
,
_
(
"Map structure has been closed"
));
37
return
(-1);
38
}
39
return
(Map->
level
);
40
}
glocale.h
Map_info::open
int open
Open indicator.
Definition:
dig_structs.h:1296
Map_info::level
int level
Topology level.
Definition:
dig_structs.h:1313
Vect_level
int Vect_level(const struct Map_info *Map)
Returns level that Map is opened at.
Definition:
level.c:29
VECT_CLOSED_CODE
#define VECT_CLOSED_CODE
Vector map close code.
Definition:
dig_defines.h:113
Map_info
Vector map info.
Definition:
dig_structs.h:1259
vector.h
G_warning
void G_warning(const char *,...) __attribute__((format(printf
_
#define _(str)
Definition:
glocale.h:10
VECT_OPEN_CODE
#define VECT_OPEN_CODE
Vector map open code.
Definition:
dig_defines.h:111
lib
vector
Vlib
level.c
Generated on Mon May 31 2021 05:21:30 for GRASS GIS 7 Programmer's Manual by
1.8.13