GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
sample.c File Reference

GIS 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/glocale.h>
Include dependency graph for sample.c:

Go to the source code of this file.

Functions

DCELL G_get_raster_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. More...
 
DCELL G_get_raster_sample_nearest (int fd, const struct Cell_head *window, struct Categories *cats, double north, double east, int usedesc)
 
DCELL G_get_raster_sample_bilinear (int fd, const struct Cell_head *window, struct Categories *cats, double north, double east, int usedesc)
 
DCELL G_get_raster_sample_cubic (int fd, const struct Cell_head *window, struct Categories *cats, double north, double east, int usedesc)
 

Detailed Description

GIS 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-2008 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.

Author
James Darrell McCauley <darrell mccauley-usa.com>, http://mccauley-usa.com/
Date
1994

Definition in file sample.c.

Function Documentation

DCELL G_get_raster_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.

Parameters
fdfile descriptor
windowregion settings
catscategories
northnorthing position
easteasting position
usedescflag to scan category label
itypeinterpolation method
Returns
cell value at given position

Definition at line 50 of file sample.c.

References G_fatal_error(), G_get_raster_sample_bilinear(), G_get_raster_sample_cubic(), and G_get_raster_sample_nearest().

DCELL G_get_raster_sample_bilinear ( int  fd,
const struct Cell_head *  window,
struct Categories *  cats,
double  north,
double  east,
int  usedesc 
)
DCELL G_get_raster_sample_cubic ( int  fd,
const struct Cell_head *  window,
struct Categories *  cats,
double  north,
double  east,
int  usedesc 
)
DCELL G_get_raster_sample_nearest ( int  fd,
const struct Cell_head *  window,
struct Categories *  cats,
double  north,
double  east,
int  usedesc 
)