plus_line.c File Reference

Vector library - update topo for lines (lower level functions). More...

#include <stdlib.h>
#include <grass/Vect.h>

Include dependency graph for plus_line.c:

Go to the source code of this file.

Functions

int dig_add_line (struct Plus_head *plus, int type, struct line_pnts *Points, long offset)
 Add new line to Plus_head structure.
int dig_restore_line (struct Plus_head *plus, int lineid, int type, struct line_pnts *Points, long offset)
 Restore line in Plus_head structure.
int dig_del_line (struct Plus_head *plus, int line)
 Delete line from Plus_head structure.
plus_t dig_line_get_area (struct Plus_head *plus, plus_t line, int side)
 Get area number on line side.
int dig_line_set_area (struct Plus_head *plus, plus_t line, int side, plus_t area)
 Set area number on line side.
int dig_line_set_box (struct Plus_head *plus, plus_t line, BOUND_BOX *Box)
 Set line bounding box.
int dig_line_get_box (struct Plus_head *plus, plus_t line, BOUND_BOX *Box)
 Get line bounding box saved in topo.


Detailed Description

Vector library - update topo for lines (lower level functions).

Lower level functions for reading/writing/manipulating vectors.

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author:
CERL (probably Dave Gerdes), Radim Blazek
Date:
2001-2008

Definition in file plus_line.c.


Function Documentation

int dig_add_line ( struct Plus_head *  plus,
int  type,
struct line_pnts *  Points,
long  offset 
)

Add new line to Plus_head structure.

Parameters:
[in,out] plus pointer to Plus_head structure
[in] type feature type
[in] Points line geometry
[in] offset line offset
Returns:
-1 on error

line id

Definition at line 102 of file plus_line.c.

References dig_alloc_lines().

Referenced by V2_write_line_nat(), and Vect_build_nat().

int dig_del_line ( struct Plus_head *  plus,
int  line 
)

Delete line from Plus_head structure.

Doesn't update area/isle references (dig_del_area() or dig_del_isle()) must be run before the line is deleted if the line is part of such structure). Update is info about line in nodes. If this line is last in node then node is deleted.

Parameters:
[in,out] plus pointer to Plus_head structure
[in] line line id
Returns:
-1 on error

0 OK

Definition at line 183 of file plus_line.c.

References dig_node_add_updated(), dig_spidx_del_line(), and dig_spidx_del_node().

Referenced by V2_delete_line_nat().

plus_t dig_line_get_area ( struct Plus_head *  plus,
plus_t  line,
int  side 
)

Get area number on line side.

Parameters:
[in] plus pointer Plus_head structure
[in] line line id
[in] side side id (GV_LEFT || GV_RIGHT)
Returns:
area number

0 no area

-1 on error

Definition at line 261 of file plus_line.c.

Referenced by Vect_build_line_area().

int dig_line_get_box ( struct Plus_head *  plus,
plus_t  line,
BOUND_BOX *  Box 
)

Get line bounding box saved in topo.

Parameters:
[in] plus pointer Plus_head structure
[in] line line id
[in,out] Box bounding box
Returns:
1

Definition at line 343 of file plus_line.c.

Referenced by dig_add_area(), and dig_add_isle().

int dig_line_set_area ( struct Plus_head *  plus,
plus_t  line,
int  side,
plus_t  area 
)

Set area number on line side.

Parameters:
[in] plus pointer Plus_head structure
[in] line line id
[in] side side id (GV_LEFT || GV_RIGHT)
[in] area area id
Returns:
1

Definition at line 294 of file plus_line.c.

int dig_line_set_box ( struct Plus_head *  plus,
plus_t  line,
BOUND_BOX *  Box 
)

Set line bounding box.

Parameters:
[in] plus pointer Plus_head structure
[in] line line id
[in] Box bounding box
Returns:
1

Definition at line 318 of file plus_line.c.

Referenced by V2_restore_line_nat(), and V2_write_line_nat().

int dig_restore_line ( struct Plus_head *  plus,
int  lineid,
int  type,
struct line_pnts *  Points,
long  offset 
)

Restore line in Plus_head structure.

Parameters:
[in,out] plus pointer to Plus_head structure
[in] type feature type
[in] Points line geometry
[in] offset line offset
Returns:
-1 on error

line id

Definition at line 157 of file plus_line.c.

Referenced by V2_restore_line_nat().


Generated on Thu Jul 16 13:21:28 2009 for GRASS Programmer's Manual by  doxygen 1.5.6