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
get_projinfo.c
Go to the documentation of this file.
1
14
#include <unistd.h>
15
#include <grass/gis.h>
16
#include <grass/glocale.h>
17
18
#define PERMANENT "PERMANENT"
19
25
struct
Key_Value *
G_get_projunits
(
void
)
26
{
27
int
stat;
28
struct
Key_Value *in_units_keys;
29
char
path[GPATH_MAX];
30
31
G__file_name
(path,
""
, UNIT_FILE,
PERMANENT
);
32
if
(access(path, 0) != 0) {
33
G_warning
(_(
"<%s> file not found for location <%s>"
),
34
UNIT_FILE,
G_location
());
35
return
NULL
;
36
}
37
in_units_keys =
G_read_key_value_file
(path, &stat);
38
if
(stat != 0) {
39
G_warning
(_(
"ERROR in reading <%s> file for location <%s>"
),
40
UNIT_FILE,
G_location
());
41
return
NULL
;
42
}
43
44
return
in_units_keys;
45
}
46
52
struct
Key_Value *
G_get_projinfo
(
void
)
53
{
54
int
stat;
55
struct
Key_Value *in_proj_keys;
56
char
path[GPATH_MAX];
57
58
G__file_name
(path,
""
, PROJECTION_FILE,
PERMANENT
);
59
if
(access(path, 0) != 0) {
60
G_warning
(_(
"<%s> file not found for location <%s>"
),
61
PROJECTION_FILE,
G_location
());
62
return
NULL
;
63
}
64
in_proj_keys =
G_read_key_value_file
(path, &stat);
65
if
(stat != 0) {
66
G_warning
(_(
"ERROR in reading <%s> file for location <%s>"
),
67
PROJECTION_FILE,
G_location
());
68
return
NULL
;
69
}
70
return
in_proj_keys;
71
}
lib
gis
get_projinfo.c
Generated on Sun Sep 9 2012 18:55:31 for GRASS Programmer's Manual by
1.8.1.2