25static double scancatlabel(
const char *);
48 struct Categories *cats,
double north,
double east,
66 G_fatal_error(
"Rast_get_sample: %s",
_(
"Unknown interpolation type"));
116 result = scancatlabel(buf);
190 grid[0][0] = scancatlabel(buf);
192 grid[0][1] = scancatlabel(buf);
194 grid[1][0] = scancatlabel(buf);
196 grid[1][1] = scancatlabel(buf);
206 grid[1][0], grid[1][1]);
231 struct Categories *cats,
double north,
double east,
240 for (i = 0; i < 4; i++)
259 for (i = 0; i < 4; i++)
262 for (i = 0; i < 4; i++)
263 for (
j = 0;
j < 4;
j++)
280 for (i = 0; i < 4; i++) {
281 for (
j = 0;
j < 4;
j++) {
284 grid[i][
j] = scancatlabel(buf);
289 for (i = 0; i < 4; i++)
290 for (
j = 0;
j < 4;
j++)
291 grid[i][
j] = rows[i][
col +
j];
295 tcol,
trow, grid[0][0], grid[0][1], grid[0][2], grid[0][3], grid[1][0],
296 grid[1][1], grid[1][2], grid[1][3], grid[2][0], grid[2][1], grid[2][2],
297 grid[2][3], grid[3][0], grid[3][1], grid[3][2], grid[3][3]);
300 for (i = 0; i < 4; i++)
306static double scancatlabel(
const char *str)
310 if (
strcmp(str,
"no data") != 0)
313 G_warning(
_(
"\"no data\" label found; setting to zero"));
void G_free(void *)
Free allocated memory.
void G_squeeze(char *)
Remove superfluous white space.
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
void G_warning(const char *,...) __attribute__((format(printf
DCELL Rast_interp_bilinear(double, double, DCELL, DCELL, DCELL, DCELL)
DCELL * Rast_allocate_d_buf(void)
Allocates memory for a raster map of type DCELL.
double Rast_easting_to_col(double, const struct Cell_head *)
Easting to column.
DCELL Rast_interp_bicubic(double, double, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL)
void Rast_set_d_null_value(DCELL *, int)
To set a number of DCELL raster values to NULL.
char * Rast_get_c_cat(CELL *, struct Categories *)
Get a raster category label (CELL)
void Rast_get_d_row(int, DCELL *, int)
Get raster row (DCELL type)
int Rast_window_cols(void)
Number of columns in active window.
int Rast_window_rows(void)
Number of rows in active window.
double Rast_northing_to_row(double, const struct Cell_head *)
Northing to row.
#define Rast_is_d_null_value(dcellVal)
DCELL Rast_get_sample_cubic(int fd, const struct Cell_head *window, struct Categories *cats, double north, double east, int usedesc)
Extract a cell value from raster map (cubic interpolation).
DCELL Rast_get_sample_nearest(int fd, const struct Cell_head *window, struct Categories *cats, double north, double east, int usedesc)
Extract a cell value from raster map (neighbor interpolation)
DCELL Rast_get_sample_bilinear(int fd, const struct Cell_head *window, struct Categories *cats, double north, double east, int usedesc)
Extract a cell value from raster map (bilinear interpolation).
DCELL Rast_get_sample(int fd, const struct Cell_head *window, struct Categories *cats, double north, double east, int usedesc, INTERP_TYPE itype)
Extract a cell value from raster map.
2D/3D raster map header (used also for region)