GRASS Programmer's Manual
6.4.2(2012)
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
close_nat.c
Go to the documentation of this file.
1
2
/****************************************************************************
3
*
4
* MODULE: Vector library
5
*
6
* AUTHOR(S): Original author CERL, probably Dave Gerdes or Mike Higgins.
7
* Update to GRASS 5.7 Radim Blazek and David D. Gray.
8
*
9
* PURPOSE: Higher level functions for reading/writing/manipulating vectors.
10
*
11
* COPYRIGHT: (C) 2001 by the GRASS Development Team
12
*
13
* This program is free software under the GNU General Public
14
* License (>=v2). Read the file COPYING that comes with GRASS
15
* for details.
16
*
17
*****************************************************************************/
18
#include <grass/Vect.h>
19
#include <stdlib.h>
20
21
/*
22
** return 0 on success
23
** non-zero on error
24
*/
25
int
V1_close_nat
(
struct
Map_info *Map)
26
{
27
struct
Coor_info CInfo;
28
29
G_debug
(1,
"V1_close_nat(): name = %s mapset= %s"
, Map->name,
30
Map->mapset);
31
if
(!VECT_OPEN(Map))
32
return
1;
33
34
if
(Map->mode == GV_MODE_WRITE || Map->mode == GV_MODE_RW) {
35
Vect_coor_info
(Map, &CInfo);
36
Map->head.size = CInfo.size;
37
dig__write_head
(Map);
38
39
Vect__write_head
(Map);
40
Vect_write_dblinks
(Map);
41
}
42
43
/* close coor file */
44
fclose(Map->dig_fp.file);
45
dig_file_free
(&(Map->dig_fp));
46
47
return
0;
48
}
lib
vector
Vlib
close_nat.c
Generated on Sun Mar 16 2014 05:07:43 for GRASS Programmer's Manual by
1.8.1.2