57 region2d->
top = region3d->
top;
125 region3d->
top = region2d->
top;
212 regionDest->
top = regionSrc->
top;
235 if (!mapset || !*mapset)
285 double top,
int *
x,
int *y,
int *z)
287 double col, row, depth;
291 *
x = (int)floor(col);
292 *y = (int)floor(row);
293 *z = (int)floor(depth);
316 double east,
double top,
double *
x,
double *y,
321 G_debug(4,
"Rast3d_location2coord_double x %f y %f z %f\n", *
x, *y, *z);
342 double top,
int *
x,
int *y,
int *z)
347 double col, row, depth;
351 *
x = (int)floor(col);
352 *y = (int)floor(row);
353 *z = (int)floor(depth);
391 G_debug(4,
"Rast3d_coord2location north %g east %g top %g\n", *
north, *
east,
int G_name_is_fully_qualified(const char *, char *, char *)
Check if map name is fully qualified (map @ mapset)
const char * G_find_raster3d(const char *, const char *)
Search for a 3D raster map in current search path or in a specified mapset.
int G_debug(int, const char *,...) __attribute__((format(printf
void G_adjust_Cell_head3(struct Cell_head *, int, int, int)
Adjust cell header for 3D values.
void Rast3d_filename(char *, const char *, const char *, const char *)
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...
void Rast3d_fatal_error(const char *,...) __attribute__((format(printf
#define RASTER3D_HEADER_ELEMENT
#define LOCATION_TO_COORD(region, north, east, top, x, y, z)
#define COORD_TO_LOCATION(region, x, y, z, north, east, top)
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_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_extract2d_region(RASTER3D_Region *region3d, struct Cell_head *region2d)
Returns in region2d the 2d portion of region3d.
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...
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_region_copy(RASTER3D_Region *regionDest, RASTER3D_Region *regionSrc)
Copies the values of regionSrc into regionDst.
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_incorporate2d_region(struct Cell_head *region2d, RASTER3D_Region *region3d)
Replaces the 2d portion of region3d with the values stored in region2d.
void Rast3d_region_to_cell_head(RASTER3D_Region *region3d, struct Cell_head *region2d)
Returns in region2d the 2d portion of region3d.
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.
int Rast3d_read_region_map(const char *name, const char *mapset, RASTER3D_Region *region)
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_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...
2D/3D raster map header (used also for region)
int cols3
Number of columns for 3D data.
double ew_res
Resolution - east to west cell size for 2D data.
double north
Extent coordinates (north)
double bottom
Extent coordinates (bottom) - 3D data.
int zone
Projection zone (UTM)
int depths
number of depths for 3D data
double east
Extent coordinates (east)
double ew_res3
Resolution - east to west cell size for 3D data.
double ns_res
Resolution - north to south cell size for 2D data.
double ns_res3
Resolution - north to south cell size for 3D data.
double top
Extent coordinates (top) - 3D data.
int rows3
Number of rows for 3D data.
int rows
Number of rows for 2D data.
int cols
Number of columns for 2D data.
double south
Extent coordinates (south)
double tb_res
Resolution - top to bottom cell size for 3D data.
double west
Extent coordinates (west)