57 region2d->
top = region3d->
top;
126 region3d->
top = region2d->
top;
216 regionDest->
top = regionSrc->
top;
240 if (!mapset || !*mapset)
265 return ((north >= region->
south) && (north <= region->north) &&
266 (east >= region->
west) && (east <= region->east) &&
267 (((top >= region->
bottom) && (top <= region->top)) ||
268 ((top <= region->
bottom) && (top >= region->
top))));
291 int *
x,
int *y,
int *z)
293 double col, row, depth;
296 *x = (int)floor(col);
297 *y = (int)floor(row);
298 *z = (int)floor(depth);
322 double *
x,
double *y,
double *z)
326 G_debug(4,
"Rast3d_location2coord_double x %f y %f z %f\n", *x, *y, *z);
348 int *
x,
int *y,
int *z)
353 double col, row, depth;
356 *x = (int)floor(col);
357 *y = (int)floor(row);
358 *z = (int)floor(depth);
396 G_debug(4,
"Rast3d_coord2location north %g east %g top %g\n", *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 ...
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_incorporate2d_region(struct Cell_head *region2d, RASTER3D_Region *region3d)
Replaces the 2d portion of region3d with the values stored in region2d.
2D/3D raster map header (used also for region)
void Rast3d_adjust_region_res(RASTER3D_Region *region)
Computes an adjusts the number of cells per dimension in the region structure from the region boundar...
double west
Extent coordinates (west)
#define COORD_TO_LOCATION(region, x, y, z, north, east, 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).
void Rast3d_extract2d_region(RASTER3D_Region *region3d, struct Cell_head *region2d)
Returns in region2d the 2d portion of region3d.
void Rast3d_filename(char *, const char *, const char *, const char *)
const char * G_find_raster3d(const char *, const char *)
Search for a 3D raster map in current search path or in a specified mapset.
void Rast3d_fatal_error(const char *,...) __attribute__((format(printf
int cols3
Number of columns for 3D data.
double top
Extent coordinates (top) - 3D data.
int Rast3d_read_region_map(const char *name, const char *mapset, RASTER3D_Region *region)
double north
Extent coordinates (north)
double ns_res3
Resolution - north to south cell size for 3D data.
int rows3
Number of rows for 3D data.
double south
Extent coordinates (south)
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 R...
int zone
Projection zone (UTM)
int Rast3d_read_window(RASTER3D_Region *, const char *)
Reads window from the file specified by windowName. The name is converted by the rules defined in win...
double bottom
Extent coordinates (bottom) - 3D data.
void Rast3d_region_to_cell_head(RASTER3D_Region *region3d, struct Cell_head *region2d)
Returns in region2d the 2d portion of region3d.
int depths
number of depths for 3D data
int cols
Number of columns for 2D data.
double ns_res
Resolution - north to south cell size for 2D data.
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...
double east
Extent coordinates (east)
void G_adjust_Cell_head3(struct Cell_head *, int, int, int)
Adjust cell header for 3D values.
#define LOCATION_TO_COORD(region, north, east, top, x, y, z)
double ew_res
Resolution - east to west cell size for 2D data.
double tb_res
Resolution - top to bottom cell size for 3D data.
#define RASTER3D_HEADER_ELEMENT
int G_name_is_fully_qualified(const char *, char *, char *)
Check if map name is fully qualified (map @ mapset)
int rows
Number of rows for 2D data.
int G_debug(int, const char *,...) __attribute__((format(printf
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).
double ew_res3
Resolution - east to west cell size for 3D data.
void Rast3d_region_copy(RASTER3D_Region *regionDest, RASTER3D_Region *regionSrc)
Copies the values of regionSrc into regionDst.
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.