GRASS GIS 7 Programmer's Manual  7.5.svn(2018)-r72636
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
read_sfa.c File Reference

Vector library - reading features - simple feature access. More...

#include <grass/vector.h>
#include <grass/glocale.h>
Include dependency graph for read_sfa.c:

Go to the source code of this file.


int V2_read_line_sfa (struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c, int line)
 Reads feature from OGR/PostGIS layer on topological level. More...

Detailed Description

Vector library - reading features - simple feature access.

Higher level functions for reading/writing/manipulating vectors.

See read_ogr.c (OGR interface) and read_pg.c (PostGIS interface) for imlementation issues.

(C) 2011-2012 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.

Martin Landa <landa.martin>

Definition in file read_sfa.c.

Function Documentation

int V2_read_line_sfa ( struct Map_info Map,
struct line_pnts line_p,
struct line_cats line_c,
int  line 

Reads feature from OGR/PostGIS layer on topological level.

This function implements random access on level 2.

Note: Topology must be built at level >= GV_BUILD_BASE

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)
linefeature id (starts at 1)
feature type
-2 no more features
-1 on failure

Definition at line 40 of file read_sfa.c.

References _, P_topo_c::area, boxlist::box, dig_init_boxlist(), bound_box::E, Map_info::format, G_debug(), G_fatal_error(), G_warning(), GV_CENTROID, GV_FORMAT_POSTGIS, boxlist::id, Plus_head::Line, bound_box::N, Plus_head::n_areas, Plus_head::n_lines, boxlist::n_values, NULL, P_line::offset, Map_info::plus, P_line::topo, TRUE, P_line::type, V1_read_line_ogr(), V1_read_line_pg(), Vect_append_point(), Vect_cat_set(), Vect_get_area_box(), Vect_reset_cats(), Vect_reset_line(), and Vect_select_lines_by_box().

Referenced by V2_delete_line_sfa(), and V2_rewrite_line_sfa().