228 if (!mapset || !*mapset)
276 double top,
int *x,
int *y,
int *z)
278 double col, row, depth;
306 double east,
double top,
double *x,
double *y,
311 G_debug(4,
"Rast3d_location2coord_double x %f y %f z %f\n", *
x, *y, *z);
331 double top,
int *x,
int *y,
int *z)
336 double col, row, depth;
379 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)
double north
Extent coordinates (north)
double bottom
Extent coordinates (bottom) - 3D data.
double east
Extent coordinates (east)
double top
Extent coordinates (top) - 3D data.