rewind_ogr.c

Go to the documentation of this file.
00001 /****************************************************************************
00002 *
00003 * MODULE:       Vector library 
00004 *               
00005 * AUTHOR(S):    Radim Blazek, Piero Cavalieri 
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 
00019 #ifdef HAVE_OGR
00020 #include <ogr_api.h>
00021 
00022 /* Rewind vector data file to cause reads to start at beginning. 
00023 ** returns 0 on success
00024 **        -1 on error
00025 */
00026 int 
00027 V1_rewind_ogr (struct Map_info *Map)
00028 {
00029     G_debug (2, "V1_rewind_ogr(): name = %s", Map->name);
00030 
00031     Map->fInfo.ogr.lines_num = 0;
00032     Map->fInfo.ogr.lines_next = 0;
00033 
00034     OGR_L_ResetReading ( Map->fInfo.ogr.layer );
00035     
00036     return 0;
00037 }
00038 
00039 int 
00040 V2_rewind_ogr (struct Map_info *Map)
00041 {
00042     G_debug (2, "V2_rewind_ogr(): name = %s", Map->name);
00043 
00044     Map->next_line = 1;
00045     
00046     return 0; 
00047 }
00048 
00049 #endif 

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