|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-f6f2c534ea
|
Raster library - Sampling methods (extract a cell value from raster map) More...
#include <string.h>#include <unistd.h>#include <math.h>#include <grass/gis.h>#include <grass/raster.h>#include <grass/glocale.h>
Go to the source code of this file.
Functions | |
| 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. | |
| 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_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). | |
Raster library - Sampling methods (extract a cell value from raster map)
1/2006: moved to libgis from v.sample/v.drape for clone removal
(C) 2001-2009 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file sample.c.
| 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.
Extract a cell value from raster map at given northing and easting with a sampled 3x3 window using a specified interpolation method.
| fd | file descriptor |
| window | region settings |
| cats | categories |
| north | northing position |
| east | easting position |
| usedesc | flag to scan category label |
| itype | interpolation method |
Definition at line 49 of file sample.c.
References _, G_fatal_error(), INTERP_BICUBIC, INTERP_BILINEAR, INTERP_NEAREST, Rast_get_sample_bilinear(), Rast_get_sample_cubic(), and Rast_get_sample_nearest().
| 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).
Extract a cell value from raster map at given northing and easting with a sampled 3x3 window using a bilinear interpolation.
| fd | file descriptor |
| window | region settings |
| cats | categories |
| north | northing position |
| east | easting position |
| usedesc | flag to scan category label |
Definition at line 144 of file sample.c.
References G_free(), G_squeeze(), Rast_allocate_d_buf(), Rast_easting_to_col(), Rast_get_c_cat(), Rast_get_d_row(), Rast_interp_bilinear(), Rast_is_d_null_value, Rast_northing_to_row(), Rast_set_d_null_value(), Rast_window_cols(), and Rast_window_rows().
Referenced by Rast_get_sample().
| 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).
Extract a cell value from raster map at given northing and easting with a sampled 3x3 window using a cubic interpolation.
| fd | file descriptor |
| window | region settings |
| cats | categories |
| north | northing position |
| east | easting position |
| usedesc | flag to scan category label |
Definition at line 232 of file sample.c.
References G_free(), G_squeeze(), Rast_allocate_d_buf(), Rast_easting_to_col(), Rast_get_c_cat(), Rast_get_d_row(), Rast_interp_bicubic(), Rast_is_d_null_value, Rast_northing_to_row(), Rast_set_d_null_value(), Rast_window_cols(), and Rast_window_rows().
Referenced by Rast_get_sample().
| 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)
Extract a cell value from raster map at given northing and easting with a sampled 3x3 window using a neighbor interpolation.
| fd | file descriptor |
| window | region settings |
| cats | categories |
| north | northing position |
| east | easting position |
| usedesc | flag to scan category label |
Definition at line 89 of file sample.c.
References G_free(), G_squeeze(), Rast_allocate_d_buf(), Rast_easting_to_col(), Rast_get_c_cat(), Rast_get_d_row(), Rast_is_d_null_value, Rast_northing_to_row(), Rast_set_d_null_value(), Rast_window_cols(), and Rast_window_rows().
Referenced by Rast_get_sample().