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
proj2.c
Go to the documentation of this file.
1
#include <grass/gis.h>
2
#include <grass/glocale.h>
3
4
int
G__projection_units
(
int
n)
5
{
6
switch
(n) {
7
case
PROJECTION_XY:
8
return
0;
9
case
PROJECTION_UTM:
10
return
METERS;
11
case
PROJECTION_SP:
12
return
FEET;
13
case
PROJECTION_LL:
14
return
DEGREES;
15
default
:
16
return
-1;
17
}
18
}
19
20
char
*
G__unit_name
(
int
unit
,
int
plural)
21
{
22
switch
(unit) {
23
case
0:
24
return
plural ?
"units"
:
"unit"
;
25
case
METERS:
26
return
plural ?
"meters"
:
"meter"
;
27
case
FEET:
28
return
plural ?
"feet"
:
"foot"
;
29
case
DEGREES:
30
return
plural ?
"degrees"
:
"degree"
;
31
default
:
32
return
NULL
;
33
}
34
}
35
36
char
*
G__projection_name
(
int
n)
37
{
38
switch
(n) {
39
case
PROJECTION_XY:
40
return
"x,y"
;
41
case
PROJECTION_UTM:
42
return
"UTM"
;
43
case
PROJECTION_SP:
44
return
"State Plane"
;
45
case
PROJECTION_LL:
46
return
_(
"Latitude-Longitude"
);
47
case
PROJECTION_OTHER:
48
return
_(
"Other Projection"
);
49
default
:
50
return
NULL
;
51
}
52
}
lib
gis
proj2.c
Generated on Sun Mar 16 2014 05:07:47 for GRASS Programmer's Manual by
1.8.1.2