GRASS Programmer's Manual  6.5.svn(2014)-r66266
 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) More...
 
int Vect_read_line (struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c, int line)
 Read vector feature. More...
 
int Vect_line_alive (struct Map_info *Map, int line)
 Check if feature is alive or dead. More...
 
int Vect_node_alive (struct Map_info *Map, int node)
 Check if node is alive or dead. More...
 
int Vect_area_alive (struct Map_info *Map, int area)
 Check if area is alive or dead. More...
 
int Vect_isle_alive (struct Map_info *Map, int isle)
 Check if isle is alive or dead. More...
 
long Vect_get_line_offset (const struct Map_info *Map, int line)
 Get feature offset. More...
 

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 wxdigit.IVDigit::GetAreaPerimeter(), wxdigit.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 wxdigit.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(), render::Map, and Vect_get_full_name().

Referenced by wxdigit.IVDigit::CopyCats(), wxdigit.IVDigit::DeleteSelectedLines(), wxdigit.IVDigit::EditLine(), wxdigit.IVDigit::GetAreaPerimeter(), wxdigit.IVDigit::GetAreaSize(), wxdisplay.DisplayDriver::GetDuplicates(), wxdigit.IVDigit::GetLineCats(), wxdigit.IVDigit::GetLineLength(), wxdisplay.DisplayDriver::GetSelected(), wxdisplay.DisplayDriver::GetSelectedVertex(), IL_vector_input_data_2d(), NetA_get_node_costs(), NetA_initialise_varray(), NetA_varray_to_nodes(), wxdigit.IVDigit::OpenBackgroundMap(), wxdisplay.DisplayDriver::SelectLineByPoint(), wxdisplay.DisplayDriver::SelectLinesByBox(), wxdigit.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_line(), 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(), and render::Map.

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