#include <stdlib.h>
#include <math.h>
#include <grass/Vect.h>
#include <grass/gis.h>
Go to the source code of this file.
Defines | |
#define | LENGTH(DX, DY) ( sqrt( (DX*DX)+(DY*DY) ) ) |
#define | PI M_PI |
Functions | |
int | find_cross (struct line_pnts *Points, int s1, int s2, int s3, int s4, int *s5, int *s6) |
int | point_in_buf (struct line_pnts *Points, double px, double py, double d) |
void | clean_parallel (struct line_pnts *Points, struct line_pnts *oPoints, double d, int rm_end) |
void | parallel_line (struct line_pnts *Points, double d, double tol, struct line_pnts *nPoints) |
void | Vect_line_parallel (struct line_pnts *InPoints, double distance, double tolerance, int rm_end, struct line_pnts *OutPoints) |
Create parrallel line. | |
void | Vect_line_buffer (struct line_pnts *InPoints, double distance, double tolerance, struct line_pnts *OutPoints) |
Create buffer around the line line. Buffer is closed counter clockwise polygon. Warning: output line may contain loops! |
#define PI M_PI |
void clean_parallel | ( | struct line_pnts * | Points, | |
struct line_pnts * | oPoints, | |||
double | d, | |||
int | rm_end | |||
) |
Definition at line 113 of file buffer.c.
References dig_find_intersection(), find_cross(), point_in_buf(), Vect_append_point(), Vect_find_poly_centroid(), Vect_new_line_struct(), and Vect_reset_line().
Referenced by Vect_line_parallel().
int find_cross | ( | struct line_pnts * | Points, | |
int | s1, | |||
int | s2, | |||
int | s3, | |||
int | s4, | |||
int * | s5, | |||
int * | s6 | |||
) |
Definition at line 38 of file buffer.c.
References dig_test_for_intersection().
Referenced by clean_parallel(), and Vect_line_check_intersection().
void parallel_line | ( | struct line_pnts * | Points, | |
double | d, | |||
double | tol, | |||
struct line_pnts * | nPoints | |||
) |
Definition at line 237 of file buffer.c.
References PI, Vect_append_point(), Vect_copy_xyz_to_pnts(), Vect_line_prune(), and Vect_reset_line().
Referenced by Vect_line_parallel().
int point_in_buf | ( | struct line_pnts * | Points, | |
double | px, | |||
double | py, | |||
double | d | |||
) |
Definition at line 82 of file buffer.c.
References dig_distance2_point_to_line().
Referenced by clean_parallel().
void Vect_line_buffer | ( | struct line_pnts * | InPoints, | |
double | distance, | |||
double | tolerance, | |||
struct line_pnts * | OutPoints | |||
) |
Create buffer around the line line. Buffer is closed counter clockwise polygon. Warning: output line may contain loops!
InPoints | input line | |
distance | ||
tolerance | maximum distance between theoretical arc and polygon segments | |
OutPoints | output line |
Definition at line 343 of file buffer.c.
References PI, Vect_append_point(), Vect_append_points(), Vect_line_parallel(), Vect_line_prune(), Vect_new_line_struct(), and Vect_reset_line().
void Vect_line_parallel | ( | struct line_pnts * | InPoints, | |
double | distance, | |||
double | tolerance, | |||
int | rm_end, | |||
struct line_pnts * | OutPoints | |||
) |
Create parrallel line.
InPoints | input line | |
distance | ||
tolerance | maximum distance between theoretical arc and polygon segments | |
rm_end | remove end points falling into distance | |
OutPoints | output line |
Definition at line 320 of file buffer.c.
References clean_parallel(), and parallel_line().
Referenced by Vect_line_buffer().