GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
get_window.c File Reference
#include <stdlib.h>
#include "G.h"
#include <grass/gis.h>
#include <grass/glocale.h>
Include dependency graph for get_window.c:

Go to the source code of this file.

Functions

int G_get_window (struct Cell_head *window)
 read the database region More...
 
int G_get_default_window (struct Cell_head *window)
 read the default region More...
 
char * G__get_window (struct Cell_head *window, const char *element, const char *name, const char *mapset)
 

Function Documentation

char* G__get_window ( struct Cell_head *  window,
const char *  element,
const char *  name,
const char *  mapset 
)
int G_get_default_window ( struct Cell_head *  window)

read the default region

Reads the default region for the location into region. 3D values are set to defaults if not available in WIND file. An error message is printed and exit( ) is called if there is a problem reading the default region.

Parameters
region
Returns
int

Definition at line 115 of file get_window.c.

References err, G__get_window(), G_fatal_error(), and G_free().

Referenced by E_edit_cellhd(), G__make_mapset(), main(), and make_mapset().

int G_get_window ( struct Cell_head *  window)

read the database region

Reads the database region as stored in the WIND file in the user's current mapset into region. 3D values are set to defaults if not available in WIND file. An error message is printed and exit( ) is called if there is a problem reading the region. Note. GRASS applications that read or write raster maps should not use this routine since its use implies that the active module region will not be used. Programs that read or write raster map data (or vector data) can query the active module region using G_window_rows and G_window_cols..

Parameters
region
Returns
int

Definition at line 47 of file get_window.c.

References err, first, G__get_window(), G__read_Cell_head_array(), G_copy(), G_fatal_error(), G_free(), G_free_tokens(), G_mapset(), G_tokenize(), getenv(), G__::window, and G__::window_set.

Referenced by G3d_readWindow(), G__calloc(), G__init_window(), G__malloc(), G__realloc(), and G_point_in_region().