diglib/type.c

Go to the documentation of this file.
00001 /****************************************************************************
00002 *
00003 * MODULE:       Vector library 
00004 *               
00005 * AUTHOR(S):    Radim Blazek
00006 *
00007 * PURPOSE:      Higher level functions for reading/writing/manipulating vectors.
00008 *
00009 * COPYRIGHT:    (C) 2001 by the GRASS Development Team
00010 *
00011 *               This program is free software under the GNU General Public
00012 *               License (>=v2). Read the file COPYING that comes with GRASS
00013 *               for details.
00014 *
00015 *****************************************************************************/
00016 #include <grass/gis.h>
00017 #include <grass/Vect.h>
00018 
00025 int
00026 dig_type_to_store (int type)
00027 {
00028     switch ( type ) {
00029         case GV_POINT:
00030            return GV_STORE_POINT;
00031         case GV_LINE:
00032            return GV_STORE_LINE;
00033         case GV_BOUNDARY:
00034            return GV_STORE_BOUNDARY;
00035         case GV_CENTROID:
00036            return GV_STORE_CENTROID;
00037         case GV_AREA:
00038            return GV_STORE_AREA;
00039         case GV_FACE:
00040            return GV_STORE_FACE;
00041         case GV_KERNEL:
00042            return GV_STORE_KERNEL;
00043         case GV_VOLUME:
00044            return GV_STORE_VOLUME;
00045         default:
00046            return 0;
00047     }
00048 }
00049 
00056 int
00057 dig_type_from_store (int stype)
00058 {
00059     switch ( stype ) {
00060         case GV_STORE_POINT:
00061            return GV_POINT;
00062         case GV_STORE_LINE:
00063            return GV_LINE;
00064         case GV_STORE_BOUNDARY:
00065            return GV_BOUNDARY;
00066         case GV_STORE_CENTROID:
00067            return GV_CENTROID;
00068         case GV_STORE_AREA:
00069            return GV_AREA;
00070         case GV_STORE_FACE:
00071            return GV_FACE;
00072         case GV_STORE_KERNEL:
00073            return GV_KERNEL;
00074         case GV_STORE_VOLUME:
00075            return GV_VOLUME;
00076         default:
00077            return 0;
00078     }
00079 }
00080 

Generated on Sun Apr 6 17:32:44 2008 for GRASS by  doxygen 1.5.5