18 #include <grass/N_pde.h>
82 G_debug(2,
"N_init_geom_data_3d: initializing the geometry structure");
129 G_debug(2,
"N_init_geom_data_2d: initializing the geometry structure");
152 geom->
Az = geom->
dy * geom->
dx;
161 G_debug(2,
"N_init_geom_data_2d: calculating the areas for non "
162 "parametric projection");
171 for (i = 0; i < geom->
rows; i++) {
199 G_debug(6,
"N_get_geom_data_area_of_cell: %g", geom->
Az);
203 G_debug(6,
"N_get_geom_data_area_of_cell: %g", geom->
area[row]);
204 return geom->
area[row];
void G_free(void *)
Free allocated memory.
double G_area_of_cell_at_row(int)
Cell area in specified row.
int G_begin_cell_area_calculations(void)
Begin cell area calculations.
double G_database_units_to_meters_factor(void)
Conversion to meters.
void G_get_set_window(struct Cell_head *)
Get the current working window (region)
int G_debug(int, const char *,...) __attribute__((format(printf
void Rast3d_region_to_cell_head(RASTER3D_Region *, struct Cell_head *)
Returns in region2d the 2d portion of region3d.
void Rast_set_window(struct Cell_head *)
Establishes 'window' as the current working window.
double N_get_geom_data_area_of_cell(N_geom_data *geom, int row)
Get the areay size in square meter of one cell (x*y) at row.
N_geom_data * N_init_geom_data_2d(struct Cell_head *region, N_geom_data *geodata)
Initiate a pde geometry data structure with a 2d region.
N_geom_data * N_init_geom_data_3d(RASTER3D_Region *region3d, N_geom_data *geodata)
Initiate a pde geometry data structure with a 3d region.
N_geom_data * N_alloc_geom_data(void)
Allocate the pde geometry data structure and return a pointer to the new allocated structure.
void N_free_geom_data(N_geom_data *geom)
Release memory of a pde geometry data structure.
2D/3D raster map header (used also for region)
double ew_res
Resolution - east to west cell size for 2D data.
double ns_res
Resolution - north to south cell size for 2D data.
int rows
Number of rows for 2D data.
int cols
Number of columns for 2D data.
Geometric information about the structured grid.