GRASS Programmer's Manual  6.4.2(2012)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
vector/Vlib/read.c File Reference
#include <grass/Vect.h>
#include <grass/glocale.h>
Include dependency graph for vector/Vlib/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.

Function Documentation

int Vect_area_alive ( struct Map_info *  Map,
int  area 
)

Check if area is alive or dead.

Parameters:
Mappointer to vector map
areaarea id
Returns:
1 if area alive
0 if area is dead

Definition at line 152 of file vector/Vlib/read.c.

References NULL.

Referenced by gui_modules.wxvdigit.IVDigit::GetAreaPerimeter(), gui_modules.wxvdigit.IVDigit::GetAreaSize(), 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:
Mappointer to vector map
linefeature id
Returns:
feature offset
-1 on error

Definition at line 188 of file vector/Vlib/read.c.

References NULL.

Referenced by gui_modules.wxvdigit.IVDigit::OpenBackgroundMap().

int Vect_isle_alive ( struct Map_info *  Map,
int  isle 
)

Check if isle is alive or dead.

Parameters:
Mappointer to vector map
isleisle id
Returns:
1 if isle alive
0 if isle is dead

Definition at line 169 of file vector/Vlib/read.c.

References NULL.

int Vect_node_alive ( struct Map_info *  Map,
int  node 
)

Check if node is alive or dead.

Parameters:
Mappointer to vector map
nodenode id
Returns:
1 if node alive
0 if node is dead

Definition at line 135 of file vector/Vlib/read.c.

References NULL.

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 
)

Read vector feature.

Parameters:
Mappointer to vector map
[out]line_pfeature geometry
[out]line_cfeature categories
linefeature id
Returns:
feature type
-1 out of memory,
-2 EOF

Definition at line 92 of file vector/Vlib/read.c.

References G_debug(), G_fatal_error(), and Vect_get_full_name().

Referenced by gui_modules.wxvdigit.IVDigit::CopyCats(), gui_modules.wxvdigit.IVDigit::DeleteSelectedLines(), gui_modules.wxvdigit.IVDigit::EditLine(), gui_modules.wxvdigit.IVDigit::GetAreaPerimeter(), gui_modules.wxvdigit.IVDigit::GetAreaSize(), gui_modules.wxvdriver.DisplayDriver::GetDuplicates(), gui_modules.wxvdigit.IVDigit::GetLineCats(), gui_modules.wxvdigit.IVDigit::GetLineLength(), gui_modules.wxvdriver.DisplayDriver::GetSelected(), gui_modules.wxvdriver.DisplayDriver::GetSelectedVertex(), IL_vector_input_data_2d(), NetA_get_node_costs(), NetA_varray_to_nodes(), gui_modules.wxvdigit.IVDigit::OpenBackgroundMap(), gui_modules.wxvdriver.DisplayDriver::SelectLineByPoint(), gui_modules.wxvdriver.DisplayDriver::SelectLinesByBox(), gui_modules.wxvdigit.IVDigit::SetLineCats(), Vect_break_lines_list(), Vect_break_polygons(), Vect_build_line_area(), Vect_build_nat(), Vect_clean_small_angles_at_nodes(), Vect_copy_map_lines(), Vect_find_line_list(), Vect_get_area_cats(), Vect_get_area_points(), Vect_get_isle_points(), Vect_get_line_cat(), Vect_merge_lines(), Vect_net_build_graph(), Vect_net_nearest_nodes(), Vect_net_shortest_path_coor2(), Vect_overlay_and(), Vect_point_in_area_outer_ring(), Vect_point_in_island(), Vect_remove_duplicates(), Vect_remove_small_areas(), Vect_select_lines_by_polygon(), Vect_set_varray_from_cat_list(), Vect_set_varray_from_db(), Vect_snap_lines(), Vect_snap_lines_list(), Vedit_add_vertex(), Vedit_bulk_labeling(), Vedit_chtype_lines(), Vedit_copy_lines(), Vedit_flip_lines(), Vedit_merge_lines(), Vedit_modify_cats(), Vedit_move_lines(), Vedit_move_vertex(), Vedit_remove_vertex(), Vedit_snap_lines(), Vedit_snap_point(), and Vedit_split_lines().

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:
Mappointer vector map
[out]line_pfeature geometry
[out]line_cfeature categories
Returns:
feature type,
-1 out of memory
-2 EOF

Definition at line 67 of file vector/Vlib/read.c.

References G_debug().

Referenced by G_site_get(), Gp_load_sites(), Gv_load_vect(), IL_vector_input_data_2d(), Vect_build_nat(), and Vect_copy_map_lines().