GRASS GIS 7 Programmer's Manual  7.9.dev(2020)-ef56e0001
read_ogr.c File Reference

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

#include <grass/vector.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 feature from OGR layer. Skip empty features (level 1 without topology). More...
 
int V2_read_next_line_ogr (struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c)
 Read next feature from OGR layer on topological level. More...
 
int V1_read_line_ogr (struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c, off_t offset)
 Read feature from OGR layer at given offset (level 1 without topology) More...
 

Detailed Description

Vector library - reading data (OGR format)

Higher level functions for reading/writing/manipulating vectors.

(C) 2001-2011 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
Martin Landa <landa.martin gmail.com>

Definition in file read_ogr.c.

Function Documentation

◆ V1_read_line_ogr()

int V1_read_line_ogr ( struct Map_info Map,
struct line_pnts line_p,
struct line_cats line_c,
off_t  offset 
)

Read feature from OGR layer at given offset (level 1 without topology)

This function implements random access on level 1.

Parameters
Mappointer to Map_info structure
[out]line_pcontainer used to store line points within (pointer line_pnts struct)
[out]line_ccontainer used to store line categories within (pointer line_cats struct)
offsetgiven offset
Returns
line type
0 dead line
-2 no more features
-1 on failure

Definition at line 179 of file read_ogr.c.

◆ V1_read_next_line_ogr()

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

Read next feature from OGR layer. Skip empty features (level 1 without topology).

This function implements sequential access.

The action of this routine can be modified by:

Parameters
Mappointer to Map_info structure
[out]line_pcontainer used to store line points within
[out]line_ccontainer used to store line categories within
Returns
feature type
-2 no more features (EOF)
-1 out of memory

Definition at line 50 of file read_ogr.c.

◆ 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 feature from OGR layer on topological level.

This function implements sequential access.

Parameters
Mappointer to Map_info structure
[out]line_pcontainer used to store line points within (pointer to line_pnts struct)
[out]line_ccontainer used to store line categories within (pointer to line_cats struct)
Returns
feature type
-2 no more features (EOF)
-1 on failure

Definition at line 76 of file read_ogr.c.