GRASS Programmer's Manual
6.4.2(2012)
|
00001 00019 #include <grass/gstypes.h> 00020 00031 int get_mapatt(typbuff * buff, int offset, float *att) 00032 { 00033 if (buff->nm) { 00034 if (BM_get 00035 (buff->nm, (offset % buff->nm->cols), 00036 (offset / buff->nm->cols))) { 00037 return (0); 00038 } 00039 } 00040 00041 *att = (buff->ib ? (float)buff->ib[offset] : 00042 buff->sb ? (float)buff->sb[offset] : 00043 buff->cb ? (float)buff->cb[offset] : 00044 buff->fb ? (float)buff->fb[offset] : buff->k); 00045 00046 if (buff->tfunc) { 00047 *att = (buff->tfunc) (*att, offset); 00048 } 00049 00050 return (1); 00051 }