GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
build_nat.c File Reference

Vector library - Building topology for native format. More...

#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <grass/glocale.h>
#include <grass/gis.h>
#include <grass/Vect.h>
Include dependency graph for build_nat.c:

Go to the source code of this file.

Functions

int Vect_build_line_area (struct Map_info *Map, int iline, int side)
 Build area on given side of line (GV_LEFT or GV_RIGHT) More...
 
int Vect_isle_find_area (struct Map_info *Map, int isle)
 Find area outside island. More...
 
int Vect_attach_isle (struct Map_info *Map, int isle)
 (Re)Attach isle to area More...
 
int Vect_attach_isles (struct Map_info *Map, BOUND_BOX *box)
 (Re)Attach isles to areas in given box More...
 
int Vect_attach_centroids (struct Map_info *Map, BOUND_BOX *box)
 (Re)Attach centroids to areas in given box More...
 
int Vect_build_nat (struct Map_info *Map, int build)
 Build topology. More...
 

Detailed Description

Vector library - Building topology for native format.

(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 build_nat.c.

Function Documentation

int Vect_attach_centroids ( struct Map_info *  Map,
BOUND_BOX *  box 
)

(Re)Attach centroids to areas in given box

Parameters
Map_infovector map
boxbounding box
Returns
0

Definition at line 333 of file build_nat.c.

References dig_line_add_updated(), first, G_debug(), NULL, Vect_find_area(), Vect_new_list(), and Vect_select_lines_by_box().

Referenced by V2_delete_line_nat().

int Vect_attach_isle ( struct Map_info *  Map,
int  isle 
)

(Re)Attach isle to area

Parameters
Map_infovector map
isleisle id
Returns
0

Definition at line 258 of file build_nat.c.

References dig_area_add_isle(), G_debug(), and Vect_isle_find_area().

Referenced by Vect_attach_isles(), and Vect_build_nat().

int Vect_attach_isles ( struct Map_info *  Map,
BOUND_BOX *  box 
)

(Re)Attach isles to areas in given box

Parameters
Map_infovector map
boxbounding box
Returns
0

Definition at line 295 of file build_nat.c.

References dig_area_del_isle(), first, G_debug(), Vect_attach_isle(), Vect_new_list(), and Vect_select_isles_by_box().

Referenced by V2_delete_line_nat().

int Vect_build_line_area ( struct Map_info *  Map,
int  iline,
int  side 
)

Build area on given side of line (GV_LEFT or GV_RIGHT)

Parameters
Map_infovector map
ilineline id
sideside (GV_LEFT or GV_RIGHT)
Returns
> 0 number of area
< 0 number of isle
0 not created (may also already exist)

Definition at line 37 of file build_nat.c.

References dig_add_area(), dig_add_isle(), dig_build_area_with_line(), dig_find_area_poly(), dig_line_get_area(), first, G_debug(), G_fatal_error(), G_warning(), NULL, dialogs::type, Vect_append_points(), Vect_close(), Vect_new_line_struct(), Vect_read_line(), and Vect_reset_line().

Referenced by V2_delete_line_nat(), and Vect_build_nat().

int Vect_isle_find_area ( struct Map_info *  Map,
int  isle 
)

Find area outside island.

Parameters
Map_infovector map
isleisle id
Returns
number of area(s)
0 if not found

Definition at line 126 of file build_nat.c.

References tools::box, first, G_area_of_polygon(), G_begin_polygon_area_calculations(), G_debug(), G_warning(), NULL, tools::size, Vect_get_area_box(), Vect_get_area_points(), Vect_get_isle_box(), Vect_new_line_struct(), Vect_new_list(), Vect_point_in_area_outer_ring(), and Vect_select_areas_by_box().

Referenced by Vect_attach_isle().