Vlib/type.c

Go to the documentation of this file.
00001 
00020 #include <grass/gis.h>
00021 #include <grass/Vect.h>
00022 
00031 int Vect_option_to_types(struct Option *type_opt)
00032 {
00033     int i = 0;
00034     int type = 0;
00035 
00036     while (type_opt->answers[i]) {
00037         switch (type_opt->answers[i][0]) {
00038         case 'p':
00039             type |= GV_POINT;
00040             break;
00041         case 'l':
00042             type |= GV_LINE;
00043             break;
00044         case 'b':
00045             type |= GV_BOUNDARY;
00046             break;
00047         case 'c':
00048             type |= GV_CENTROID;
00049             break;
00050         case 'f':
00051             type |= GV_FACE;
00052             break;
00053         case 'k':
00054             type |= GV_KERNEL;
00055             break;
00056         case 'a':
00057             type |= GV_AREA;
00058             break;
00059         case 'v':
00060             type |= GV_VOLUME;
00061             break;
00062         }
00063         i++;
00064     }
00065 
00066     return type;
00067 }
Generated on Tue Apr 6 13:28:10 2010 for GRASS Programmer's Manual by  doxygen 1.6.3