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
int G_get_default_window (struct Cell_head *window)
 read the default region
char * G__get_window (struct Cell_head *window, char *element, char *name, char *mapset)


Function Documentation

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

Definition at line 130 of file get_window.c.

References G__read_Cell_head(), G_fopen_old(), G_free(), G_store(), G_zero(), and NULL.

Referenced by G_get_default_window(), and G_get_window().

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 118 of file get_window.c.

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

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 files should not use this routine since its use implies that the active module region will not be used. Programs that read or write raster file 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 G__get_window(), G__read_Cell_head_array(), G_copy(), G_fatal_error(), G_free(), G_free_tokens(), G_mapset(), G_tokenize(), and getenv().

Referenced by G__init_window().


Generated on Sun Apr 6 17:32:20 2008 for GRASS by  doxygen 1.5.5