write.c File Reference

#include <grass/gis.h>
#include <grass/glocale.h>
#include <grass/Vect.h>

Include dependency graph for write.c:

Go to the source code of this file.

Functions

long Vect_write_line (struct Map_info *Map, int type, struct line_pnts *points, struct line_cats *cats)
 writes new line to the end of file (table) the function calls fatal error on error
int Vect_rewrite_line (struct Map_info *Map, int line, int type, struct line_pnts *points, struct line_cats *cats)
 rewrites line info at the given offset. The number of points or cats or type may change. If necessary, the old line is deleted and new is written.
int Vect_delete_line (struct Map_info *Map, int line)
 deletes line of given number. Map must be opened on level 2.


Function Documentation

int Vect_delete_line ( struct Map_info *  Map,
int  line 
)

deletes line of given number. Map must be opened on level 2.

\ fn int Vect_delete_line ( struct Map_info *Map, int line)

Returns:
0 on success, -1 on error
Parameters:
Map_info structure
line number

Definition at line 188 of file write.c.

References dig_line_reset_updated(), and dig_node_reset_updated().

Referenced by remove_bridges(), remove_dangles(), Vect_break_lines(), Vect_break_polygons(), Vect_clean_small_angles_at_nodes(), Vect_remove_duplicates(), Vect_remove_small_areas(), and Vect_snap_lines().

int Vect_rewrite_line ( struct Map_info *  Map,
int  line,
int  type,
struct line_pnts *  points,
struct line_cats *  cats 
)

rewrites line info at the given offset. The number of points or cats or type may change. If necessary, the old line is deleted and new is written.

Parameters:
Map_info structure
line number
vector type
line_pnts structure
line_cats structure
Returns:
number of new line, -1 on error

Definition at line 131 of file write.c.

References dig_line_reset_updated(), and dig_node_reset_updated().

Referenced by remove_bridges(), remove_dangles(), Vect_break_polygons(), Vect_clean_small_angles_at_nodes(), Vect_remove_duplicates(), and Vect_snap_lines().

long Vect_write_line ( struct Map_info *  Map,
int  type,
struct line_pnts *  points,
struct line_cats *  cats 
)

writes new line to the end of file (table) the function calls fatal error on error

Parameters:
Map_info structure
vector type
line_pnts structure
line_cats structure
Returns:
offset into file where the line starts

Definition at line 84 of file write.c.

References dig_line_reset_updated(), and dig_node_reset_updated().

Referenced by remove_bridges(), remove_dangles(), Vect_break_lines(), Vect_break_polygons(), Vect_clean_small_angles_at_nodes(), Vect_copy_map_lines(), Vect_overlay_and(), Vect_remove_duplicates(), and Vect_remove_small_areas().


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