GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71933
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
buffer.c File Reference

Vector library - nearest, adjust, parallel lines. More...

#include <stdlib.h>
#include <math.h>
#include <grass/vector.h>
Include dependency graph for buffer.c:

Go to the source code of this file.

Macros

#define LENGTH(DX, DY)   ( sqrt( (DX*DX)+(DY*DY) ) )
 
#define PI   M_PI
 

Functions

void Vect_line_parallel (struct line_pnts *InPoints, double distance, double tolerance, int rm_end, struct line_pnts *OutPoints)
 Create parallel line. More...
 
void Vect_line_buffer (const struct line_pnts *InPoints, double distance, double tolerance, struct line_pnts *OutPoints)
 Create buffer around the line line. More...
 

Detailed Description

Vector library - nearest, adjust, parallel lines.

Higher level functions for reading/writing/manipulating vectors.

See buffer2.c for replacement.

(C) 2001-2009 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
Radim Blazek

Definition in file buffer.c.

Macro Definition Documentation

#define LENGTH (   DX,
  DY 
)    ( sqrt( (DX*DX)+(DY*DY) ) )

Definition at line 24 of file buffer.c.

#define PI   M_PI

Definition at line 25 of file buffer.c.

Referenced by Vect_line_buffer().

Function Documentation

void Vect_line_buffer ( const struct line_pnts InPoints,
double  distance,
double  tolerance,
struct line_pnts OutPoints 
)

Create buffer around the line line.

This function is replaced by Vect_line_buffer().

Buffer is closed counter clockwise polygon. Warning: output line may contain loops!

Parameters
InPointsinput line
distancecreate buffer in distance
tolerancemaximum distance between theoretical arc and polygon segments
[out]OutPointsoutput line

Definition at line 382 of file buffer.c.

References GV_BACKWARD, GV_FORWARD, line_pnts::n_points, NULL, PI, Vect_append_point(), Vect_append_points(), Vect_line_parallel(), Vect_line_prune(), Vect_new_line_struct(), Vect_reset_line(), x, line_pnts::x, and line_pnts::y.

void Vect_line_parallel ( struct line_pnts InPoints,
double  distance,
double  tolerance,
int  rm_end,
struct line_pnts OutPoints 
)

Create parallel line.

This function is replaced by Vect_line_parallel2().

Parameters
InPointsinput line
distancecreate parallel line in distance
tolerancemaximum distance between theoretical arc and polygon segments
rm_endremove end points falling into distance
[out]OutPointsoutput line
Returns

Definition at line 354 of file buffer.c.

References G_debug(), and line_pnts::n_points.

Referenced by Vect_line_buffer().