GRASS GIS 7 Programmer's Manual  7.0.4(2016)-r00000
window_map.c
Go to the documentation of this file.
1 
14 #include <grass/gis.h>
15 
16 #include "G.h"
17 
32 double G_adjust_east_longitude(double east, double west)
33 {
34  while (east > west + 360.0)
35  east -= 360.0;
36  while (east <= west)
37  east += 360.0;
38 
39  return east;
40 }
41 
56 double G_adjust_easting(double east, const struct Cell_head *window)
57 {
58  if (window->proj == PROJECTION_LL) {
59  east = G_adjust_east_longitude(east, window->west);
60  if (east > window->east && east == window->west + 360)
61  east = window->west;
62  }
63 
64  return east;
65 }
66 
70 void G__init_window(void)
71 {
73  return;
74 
76 
78 }
79 
void G_get_window(struct Cell_head *window)
Get the current region.
Definition: get_window.c:47
double G_adjust_east_longitude(double east, double west)
Adjust east longitude.
Definition: window_map.c:32
int G_is_initialized(int *p)
Definition: counter.c:59
void G_initialize_done(int *p)
Definition: counter.c:76
struct Cell_head window
Definition: G.h:6
Definition: G.h:4
void G__init_window(void)
Initialize window (region).
Definition: window_map.c:70
int window_set
Definition: G.h:7
double G_adjust_easting(double east, const struct Cell_head *window)
Returns east larger than west.
Definition: window_map.c:56