27static double scancatlabel(
const char *);
50 struct Categories *cats,
double north,
double east,
68 G_fatal_error(
"Rast_get_sample: %s",
_(
"Unknown interpolation type"));
118 result = scancatlabel(buf);
192 grid[0][0] = scancatlabel(buf);
194 grid[0][1] = scancatlabel(buf);
196 grid[1][0] = scancatlabel(buf);
198 grid[1][1] = scancatlabel(buf);
208 grid[1][0], grid[1][1]);
233 struct Categories *cats,
double north,
double east,
242 for (i = 0; i < 4; i++)
261 for (i = 0; i < 4; i++)
264 for (i = 0; i < 4; i++)
265 for (
j = 0;
j < 4;
j++)
282 for (i = 0; i < 4; i++) {
283 for (
j = 0;
j < 4;
j++) {
286 grid[i][
j] = scancatlabel(buf);
291 for (i = 0; i < 4; i++)
292 for (
j = 0;
j < 4;
j++)
293 grid[i][
j] = rows[i][
col +
j];
297 tcol,
trow, grid[0][0], grid[0][1], grid[0][2], grid[0][3], grid[1][0],
298 grid[1][1], grid[1][2], grid[1][3], grid[2][0], grid[2][1], grid[2][2],
299 grid[2][3], grid[3][0], grid[3][1], grid[3][2], grid[3][3]);
302 for (i = 0; i < 4; i++)
308static double scancatlabel(
const char *str)
312 if (
strcmp(str,
"no data") != 0)
315 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)