GRASS Programmer's Manual
6.4.2(2012)
|
00001 00015 #include <grass/segment.h> 00016 00017 00031 int segment_address(const SEGMENT * SEG, int row, int col, int *n, int *index) 00032 { 00033 *n = row / SEG->srows * SEG->spr + col / SEG->scols; 00034 *index = (row % SEG->srows * SEG->scols + col % SEG->scols) * SEG->len; 00035 00036 return 0; 00037 }