GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-36359e2344
|
GIS Library - Get window (i.e. GRASS region) More...
#include <stdlib.h>
#include <grass/gis.h>
#include <grass/glocale.h>
#include "G.h"
#include "gis_local_proto.h"
Go to the source code of this file.
Functions | |
void | G_get_window (struct Cell_head *window) |
Get the current region. More... | |
void | G_get_default_window (struct Cell_head *window) |
Get the default region. More... | |
void | G_get_element_window (struct Cell_head *window, const char *element, const char *name, const char *mapset) |
Get region for selected element (raster, vector, window, etc.) More... | |
void | G_unset_window (void) |
Unset current region. More... | |
GIS Library - Get window (i.e. GRASS region)
(C) 2001-2009, 2011 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file get_window.c.
void G_get_default_window | ( | struct Cell_head * | window | ) |
Get 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.
[out] | window | pointer to Cell_head |
Definition at line 95 of file get_window.c.
Referenced by G_make_mapset().
void G_get_element_window | ( | struct Cell_head * | window, |
const char * | element, | ||
const char * | name, | ||
const char * | mapset | ||
) |
Get region for selected element (raster, vector, window, etc.)
G_fatal_error() is called on error
[out] | window | pointer to Cell_head |
element | element type | |
name | element name | |
mapset | mapset name |
Definition at line 110 of file get_window.c.
void G_get_window | ( | struct Cell_head * | window | ) |
Get the current region.
Reads the 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 Rast_window_rows() and Rast_window_cols().
[out] | window | pointer to Cell_head |
Definition at line 47 of file get_window.c.
Referenced by G__init_window(), and P_set_dim().
void G_unset_window | ( | void | ) |
Unset current region.
Definition at line 135 of file get_window.c.
References st, and G__::window_set.