GRASS Programmer's Manual  6.4.2(2012)
address.c
Go to the documentation of this file.
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 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines