read.c File Reference

Vector library - read vector features. More...

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

Go to the source code of this file.

Functions

int Vect_read_next_line (struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c)
 Read next vector feature (level 1 and 2).
int Vect_read_line (struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c, int line)
 Read vector feature.
int Vect_line_alive (struct Map_info *Map, int line)
 Check if feature is alive or dead.
int Vect_node_alive (struct Map_info *Map, int node)
 Check if node is alive or dead.
int Vect_area_alive (struct Map_info *Map, int area)
 Check if area is alive or dead.
int Vect_isle_alive (struct Map_info *Map, int isle)
 Check if isle is alive or dead.
long Vect_get_line_offset (const struct Map_info *Map, int line)
 Get feature offset.

Detailed Description

Vector library - read vector features.

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:
Original author CERL, probably Dave Gerdes or Mike Higgins.
Update to GRASS 5.7 Radim Blazek and David D. Gray.
Date:
2001-2008

Definition in file read.c.


Function Documentation

int Vect_area_alive ( struct Map_info *  Map,
int  area 
)

Check if area is alive or dead.

Parameters:
Map pointer to vector map
area area id
Returns:
1 if area alive
0 if area is dead

Definition at line 152 of file read.c.

Referenced by Vect_build_partial(), and Vect_remove_small_areas().

long Vect_get_line_offset ( const struct Map_info *  Map,
int  line 
)

Get feature offset.

Can be used for Vect_restore_line().

Parameters:
Map pointer to vector map
line feature id
Returns:
feature offset
-1 on error

Definition at line 188 of file read.c.

int Vect_isle_alive ( struct Map_info *  Map,
int  isle 
)

Check if isle is alive or dead.

Parameters:
Map pointer to vector map
isle isle id
Returns:
1 if isle alive
0 if isle is dead

Definition at line 169 of file read.c.

int Vect_line_alive ( struct Map_info *  Map,
int  line 
)
int Vect_node_alive ( struct Map_info *  Map,
int  node 
)

Check if node is alive or dead.

Parameters:
Map pointer to vector map
node node id
Returns:
1 if node alive
0 if node is dead

Definition at line 135 of file read.c.

Referenced by Vect_clean_small_angles_at_nodes().

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

Read next vector feature (level 1 and 2).

Parameters:
Map pointer vector map
[out] line_p feature geometry
[out] line_c feature categories
Returns:
feature type,
-1 out of memory
-2 EOF

Definition at line 67 of file read.c.

Referenced by Vect_build_nat(), and Vect_copy_map_lines().

Generated on Tue Apr 6 13:28:18 2010 for GRASS Programmer's Manual by  doxygen 1.6.3