GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
read_ogr.c File Reference

Vector library - reading data (OGR format) More...

#include <grass/gis.h>
#include <grass/Vect.h>
#include <grass/glocale.h>
#include <ogr_api.h>
Include dependency graph for read_ogr.c:

Go to the source code of this file.

Functions

int V1_read_next_line_ogr (struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c)
 Read next line from OGR layer. Skip empty features. More...
 
int V2_read_next_line_ogr (struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c)
 Read next line from OGR layer. More...
 
int V2_read_line_ogr (struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c, int line)
 Read line from layer on given offset. More...
 

Detailed Description

Vector library - reading data (OGR format)

Higher level functions for reading/writing/manipulating vectors.

(C) 2001-2008 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
Radim Blazek, Piero Cavalieri
Date
2001

Definition in file read_ogr.c.

Function Documentation

int V1_read_next_line_ogr ( struct Map_info *  Map,
struct line_pnts *  line_p,
struct line_cats *  line_c 
)

Read next line from OGR layer. Skip empty features.

The action of this routine can be modified by:

Parameters
Mapvector map layer
line_pcontainer used to store line points within
line_ccontainer used to store line categories within
Returns
line type
-2 no more features (EOF)
-1 out of memory

Definition at line 143 of file read_ogr.c.

References G_debug(), G_warning(), int, NULL, Vect_append_points(), Vect_box_overlap(), Vect_cat_set(), Vect_get_constraint_box(), Vect_line_box(), Vect_reset_cats(), and Vect_reset_line().

int V2_read_line_ogr ( struct Map_info *  Map,
struct line_pnts *  line_p,
struct line_cats *  line_c,
int  line 
)

Read line from layer on given offset.

Parameters
Mapvector map layer
line_pcontainer used to store line points within
line_ccontainer used to store line categories within
lineline id
Returns
line type
-2 end of table (last row)
-1 out of memory

Definition at line 325 of file read_ogr.c.

References G_debug(), G_fatal_error(), if(), int, NULL, Vect_append_point(), Vect_cat_set(), Vect_reset_cats(), and Vect_reset_line().

Referenced by V2_read_next_line_ogr().

int V2_read_next_line_ogr ( struct Map_info *  Map,
struct line_pnts *  line_p,
struct line_cats *  line_c 
)

Read next line from OGR layer.

Parameters
Mapvector map layer
line_pcontainer used to store line points within
line_ccontainer used to store line categories within
Returns
line type
-2 no more features (EOF)
-1 out of memory

Definition at line 242 of file read_ogr.c.

References V2_read_line_ogr().