GRASS GIS 7 Programmer's Manual
7.8.4(2020)-exported
proj2.c
Go to the documentation of this file.
1
/*!
2
\file lib/gis/proj2.c
3
4
\brief GIS Library - Projection support (internal subroutines)
5
6
(C) 2001-2011 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
12
*/
13
14
#include <grass/gis.h>
15
#include <grass/glocale.h>
16
17
/*!
18
\brief Get projection units code (for internal use only)
19
20
\param n projection code
21
22
Supported units (see gis.h):
23
- U_UNKNOWN (XY)
24
- U_METERS (UTM)
25
- U_FEET (SP)
26
- U_USFEET (a few SP)
27
- U_DEGREES (LL)
28
29
\return units code (see gis.h)
30
\return U_UNDEFINED if not defined
31
*/
32
int
G_projection_units
(
int
n)
33
{
34
switch
(n) {
35
case
PROJECTION_XY:
36
return
U_UNKNOWN;
37
case
PROJECTION_UTM:
38
return
U_METERS;
39
case
PROJECTION_LL:
40
return
U_DEGREES;
41
default
:
42
return
U_UNDEFINED;
43
}
44
return
U_UNDEFINED;
45
}
46
47
/*!
48
\brief Get projection name
49
50
\param n projection code
51
52
\return projection name
53
\return NULL on error
54
*/
55
const
char
*
G_projection_name
(
int
n)
56
{
57
switch
(n) {
58
case
PROJECTION_XY:
59
return
"x,y"
;
60
case
PROJECTION_UTM:
61
return
"UTM"
;
62
case
PROJECTION_LL:
63
return
_(
"Latitude-Longitude"
);
64
case
PROJECTION_OTHER:
65
return
_(
"Other Projection"
);
66
default
:
67
return
NULL
;
68
}
69
}
NULL
#define NULL
Definition:
ccmath.h:32
G_projection_name
const char * G_projection_name(int n)
Get projection name.
Definition:
proj2.c:55
G_projection_units
int G_projection_units(int n)
Get projection units code (for internal use only)
Definition:
proj2.c:32
gis
proj2.c
Generated on Sun Dec 13 2020 08:41:19 for GRASS GIS 7 Programmer's Manual by
1.8.20