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
init_head.c
Go to the documentation of this file.
1
24
#include <string.h>
25
#include <grass/gis.h>
26
#include <grass/Vect.h>
27
35
int
Vect__init_head
(
struct
Map_info *Map)
36
{
37
char
buf[64];
38
39
Map->head.organization =
NULL
;
40
Vect_set_organization
(Map,
""
);
41
Map->head.date =
NULL
;
42
Vect_set_date
(Map,
""
);
43
Map->head.your_name =
NULL
;
44
sprintf(buf,
"%s"
,
G_whoami
());
45
Vect_set_person
(Map, buf);
46
Map->head.map_name =
NULL
;
47
Vect_set_map_name
(Map,
""
);
48
Map->head.source_date =
NULL
;
49
sprintf(buf,
"%s"
,
G_date
());
50
Vect_set_map_date
(Map, buf);
51
Map->head.line_3 =
NULL
;
52
Vect_set_comment
(Map,
""
);
53
54
Vect_set_scale
(Map, 1);
55
Vect_set_zone
(Map, 0);
56
Vect_set_thresh
(Map, 0.0);
57
58
Map->plus.Spidx_built = 0;
59
Map->plus.release_support = 0;
60
Map->plus.update_cidx = 0;
61
62
return
0;
63
}
64
73
int
Vect_copy_head_data
(
struct
Map_info *from,
struct
Map_info *to)
74
{
75
Vect_set_organization
(to,
Vect_get_organization
(from));
76
Vect_set_date
(to,
Vect_get_date
(from));
77
Vect_set_person
(to,
Vect_get_person
(from));
78
Vect_set_map_name
(to,
Vect_get_map_name
(from));
79
Vect_set_map_date
(to,
Vect_get_map_date
(from));
80
Vect_set_comment
(to,
Vect_get_comment
(from));
81
82
Vect_set_scale
(to,
Vect_get_scale
(from));
83
Vect_set_zone
(to,
Vect_get_zone
(from));
84
Vect_set_thresh
(to,
Vect_get_thresh
(from));
85
86
return
0;
87
}
lib
vector
Vlib
init_head.c
Generated on Sun Sep 9 2012 18:55:33 for GRASS Programmer's Manual by
1.8.1.2