GRASS Programmer's Manual  6.5.svn(2014)-r66266
 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 
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 
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 }
char * G__unit_name(int unit, int plural)
Definition: proj2.c:20
int G__projection_units(int n)
Definition: proj2.c:4
tuple unit
return NULL
Definition: dbfopen.c:1394
char * G__projection_name(int n)
Definition: proj2.c:36
int n
Definition: dataquad.c:291