|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-f6f2c534ea
|

Go to the source code of this file.
Functions | |
| void | Rast3d_extract2d_region (RASTER3D_Region *region3d, struct Cell_head *region2d) |
| Returns in region2d the 2d portion of region3d. | |
| void | Rast3d_region_to_cell_head (RASTER3D_Region *region3d, struct Cell_head *region2d) |
| Returns in region2d the 2d portion of region3d. | |
| void | Rast3d_incorporate2d_region (struct Cell_head *region2d, RASTER3D_Region *region3d) |
| Replaces the 2d portion of region3d with the values stored in region2d. | |
| void | Rast3d_region_from_to_cell_head (struct Cell_head *region2d, RASTER3D_Region *region3d) |
| Replaces the 2d portion of region3d with the values stored in region2d. | |
| void | Rast3d_adjust_region (RASTER3D_Region *region) |
| Computes an adjusts the resolutions in the region structure from the region boundaries and number of cells per dimension. | |
| void | Rast3d_adjust_region_res (RASTER3D_Region *region) |
| Computes an adjusts the number of cells per dimension in the region structure from the region boundaries and resolutions. | |
| void | Rast3d_region_copy (RASTER3D_Region *regionDest, RASTER3D_Region *regionSrc) |
| Copies the values of regionSrc into regionDst. | |
| int | Rast3d_read_region_map (const char *name, const char *mapset, RASTER3D_Region *region) |
| int | Rast3d_is_valid_location (RASTER3D_Region *region, double north, double east, double top) |
| Returns 1 if region-coordinates (north, east, top) are inside the region of map. Returns 0 otherwise. | |
| void | Rast3d_location2coord (RASTER3D_Region *region, double north, double east, double top, int *x, int *y, int *z) |
| Converts region-coordinates (north, east, top) into cell-coordinates (x, y, z). | |
| void | Rast3d_location2coord_double (RASTER3D_Region *region, double north, double east, double top, double *x, double *y, double *z) |
| Converts region-coordinates (north, east, top) into cell-coordinates (x, y, z). | |
| void | Rast3d_location2coord2 (RASTER3D_Region *region, double north, double east, double top, int *x, int *y, int *z) |
| Converts region-coordinates (north, east, top) into cell-coordinates (x, y, z). This function calls Rast3d_fatal_error in case location is not in window. | |
| void | Rast3d_coord2location (RASTER3D_Region *region, double x, double y, double z, double *north, double *east, double *top) |
| Converts cell-coordinates (x, y, z) into region-coordinates (north, east, top). | |
| void Rast3d_adjust_region | ( | RASTER3D_Region * | region | ) |
Computes an adjusts the resolutions in the region structure from the region boundaries and number of cells per dimension.
| region |
Definition at line 144 of file region.c.
References RASTER3D_Region::bottom, RASTER3D_Region::depths, G_adjust_Cell_head3(), Rast3d_fatal_error(), Rast3d_region_from_to_cell_head(), Rast3d_region_to_cell_head(), RASTER3D_Region::tb_res, and RASTER3D_Region::top.
Referenced by Rast3d_fill_header(), Rast3d_open_cell_new(), Rast3d_open_cell_old(), Rast3d_set_window(), and Rast3d_set_window_map().
| void Rast3d_adjust_region_res | ( | RASTER3D_Region * | region | ) |
Computes an adjusts the number of cells per dimension in the region structure from the region boundaries and resolutions.
| region |
Definition at line 168 of file region.c.
References RASTER3D_Region::bottom, RASTER3D_Region::depths, G_adjust_Cell_head3(), Rast3d_fatal_error(), Rast3d_region_from_to_cell_head(), Rast3d_region_to_cell_head(), RASTER3D_Region::tb_res, and RASTER3D_Region::top.
| void Rast3d_coord2location | ( | RASTER3D_Region * | region, |
| double | x, | ||
| double | y, | ||
| double | z, | ||
| double * | north, | ||
| double * | east, | ||
| double * | top | ||
| ) |
Converts cell-coordinates (x, y, z) into region-coordinates (north, east, top).
| region | |
| x | |
| y | |
| z | |
| north | |
| east | |
| top |
Definition at line 374 of file region.c.
References COORD_TO_LOCATION, Cell_head::east, G_debug(), Cell_head::north, Cell_head::top, and x.
Referenced by Rast3d_nearest_neighbor().
| void Rast3d_extract2d_region | ( | RASTER3D_Region * | region3d, |
| struct Cell_head * | region2d | ||
| ) |
| void Rast3d_incorporate2d_region | ( | struct Cell_head * | region2d, |
| RASTER3D_Region * | region3d | ||
| ) |
| int Rast3d_is_valid_location | ( | RASTER3D_Region * | region, |
| double | north, | ||
| double | east, | ||
| double | top | ||
| ) |
Returns 1 if region-coordinates (north, east, top) are inside the region of map. Returns 0 otherwise.
| region | |
| north | |
| east | |
| top |
Definition at line 249 of file region.c.
References Cell_head::bottom, RASTER3D_Region::bottom, Cell_head::east, Cell_head::north, RASTER3D_Region::south, Cell_head::top, RASTER3D_Region::top, and RASTER3D_Region::west.
Referenced by Rast3d_location2coord2().
| void Rast3d_location2coord | ( | RASTER3D_Region * | region, |
| double | north, | ||
| double | east, | ||
| double | top, | ||
| int * | x, | ||
| int * | y, | ||
| int * | z | ||
| ) |
Converts region-coordinates (north, east, top) into cell-coordinates (x, y, z).
| region | |
| north | |
| east | |
| top | |
| x | |
| y | |
| z |
Definition at line 275 of file region.c.
References Cell_head::east, LOCATION_TO_COORD, Cell_head::north, Cell_head::top, and x.
Referenced by Rast3d_get_region_value(), Rast3d_get_window_value(), and Rast3d_nearest_neighbor().
| void Rast3d_location2coord2 | ( | RASTER3D_Region * | region, |
| double | north, | ||
| double | east, | ||
| double | top, | ||
| int * | x, | ||
| int * | y, | ||
| int * | z | ||
| ) |
Converts region-coordinates (north, east, top) into cell-coordinates (x, y, z). This function calls Rast3d_fatal_error in case location is not in window.
| region | |
| north | |
| east | |
| top | |
| x | |
| y | |
| z |
Definition at line 330 of file region.c.
References Cell_head::east, LOCATION_TO_COORD, Cell_head::north, Rast3d_fatal_error(), Rast3d_is_valid_location(), Cell_head::top, and x.
Referenced by Rast3d_get_volume_a().
| void Rast3d_location2coord_double | ( | RASTER3D_Region * | region, |
| double | north, | ||
| double | east, | ||
| double | top, | ||
| double * | x, | ||
| double * | y, | ||
| double * | z | ||
| ) |
Converts region-coordinates (north, east, top) into cell-coordinates (x, y, z).
Note: The results are double numbers. Casting them to int will give the column, row and depth number.
| region | |
| north | |
| east | |
| top | |
| x | |
| y | |
| z |
Definition at line 305 of file region.c.
References Cell_head::east, G_debug(), LOCATION_TO_COORD, Cell_head::north, Cell_head::top, and x.
Definition at line 219 of file region.c.
References G_find_raster3d(), G_name_is_fully_qualified(), GMAPSET_MAX, GNAME_MAX, GPATH_MAX, name, Rast3d_filename(), Rast3d_read_window(), and RASTER3D_HEADER_ELEMENT.
| void Rast3d_region_copy | ( | RASTER3D_Region * | regionDest, |
| RASTER3D_Region * | regionSrc | ||
| ) |
Copies the values of regionSrc into regionDst.
| regionDest | |
| regionSrc |
Definition at line 196 of file region.c.
Referenced by Rast3d_get_region_struct_map(), Rast3d_get_window(), Rast3d_getWindowStructMap(), Rast3d_open_cell_new(), Rast3d_open_cell_old(), Rast3d_set_window(), and Rast3d_set_window_map().
| void Rast3d_region_from_to_cell_head | ( | struct Cell_head * | region2d, |
| RASTER3D_Region * | region3d | ||
| ) |
Replaces the 2d portion of region3d with the values stored in region2d.
| region2d | |
| region3d |
Definition at line 111 of file region.c.
Referenced by Rast3d_adjust_region(), and Rast3d_adjust_region_res().
| void Rast3d_region_to_cell_head | ( | RASTER3D_Region * | region3d, |
| struct Cell_head * | region2d | ||
| ) |
Returns in region2d the 2d portion of region3d.
| region3d | |
| region2d |
Definition at line 45 of file region.c.
Referenced by N_init_geom_data_3d(), Rast3d_adjust_region(), and Rast3d_adjust_region_res().