#include <stdlib.h>
#include <grass/Vect.h>
#include <grass/gis.h>
#include <grass/glocale.h>
#include "dgraph.h"
Go to the source code of this file.
Defines | |
#define | LENGTH(DX, DY) (sqrt((DX*DX)+(DY*DY))) |
#define | MIN(X, Y) ((X<Y)?X:Y) |
#define | MAX(X, Y) ((X>Y)?X:Y) |
#define | PI M_PI |
#define | RIGHT_SIDE 1 |
#define | LEFT_SIDE -1 |
#define | LOOPED_LINE 1 |
#define | NON_LOOPED_LINE 0 |
Functions | |
void | Vect_line_buffer2 (struct line_pnts *Points, double da, double db, double dalpha, int round, int caps, double tol, struct line_pnts **oPoints, struct line_pnts ***iPoints, int *inner_count) |
Creates buffer around line. | |
void | Vect_area_buffer2 (struct Map_info *Map, int area, double da, double db, double dalpha, int round, int caps, double tol, struct line_pnts **oPoints, struct line_pnts ***iPoints, int *inner_count) |
Creates buffer around area. | |
void | Vect_point_buffer2 (double px, double py, double da, double db, double dalpha, int round, double tol, struct line_pnts **oPoints) |
Creates buffer around the point (px, py). | |
void | Vect_line_parallel2 (struct line_pnts *InPoints, double da, double db, double dalpha, int side, int round, double tol, struct line_pnts *OutPoints) |
Higher level functions for reading/writing/manipulating vectors.
(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.
Definition in file buffer2.c.
#define NON_LOOPED_LINE 0 |
#define RIGHT_SIDE 1 |
void Vect_area_buffer2 | ( | struct Map_info * | Map, | |
int | area, | |||
double | da, | |||
double | db, | |||
double | dalpha, | |||
int | round, | |||
int | caps, | |||
double | tol, | |||
struct line_pnts ** | oPoints, | |||
struct line_pnts *** | iPoints, | |||
int * | inner_count | |||
) |
Creates buffer around area.
Map | vector map | |
area | area id | |
da | distance along major axis | |
db | distance along minor axis | |
dalpha | angle between 0x and major axis | |
round | make corners round | |
caps | add caps at line ends | |
tol | maximum distance between theoretical arc and output segments | |
[out] | oPoints | output polygon outer border (ccw order) |
[out] | inner_count | number of holes |
[out] | iPoints | array of output polygon's holes (cw order) |
Definition at line 1063 of file buffer2.c.
References Vect_append_point(), Vect_destroy_line_struct(), Vect_get_area_isle(), Vect_get_area_num_isles(), Vect_get_area_points(), Vect_get_isle_points(), and Vect_new_line_struct().
void Vect_line_buffer2 | ( | struct line_pnts * | Points, | |
double | da, | |||
double | db, | |||
double | dalpha, | |||
int | round, | |||
int | caps, | |||
double | tol, | |||
struct line_pnts ** | oPoints, | |||
struct line_pnts *** | iPoints, | |||
int * | inner_count | |||
) |
Creates buffer around line.
See also Vect_line_buffer().
InPoints | input line geometry | |
da | distance along major axis | |
db | distance along minor axis | |
dalpha | angle between 0x and major axis | |
round | make corners round | |
caps | add caps at line ends | |
tol | maximum distance between theoretical arc and output segments | |
[out] | oPoints | output polygon outer border (ccw order) |
[out] | inner_count | number of holes |
[out] | iPoints | array of output polygon's holes (cw order) |
Definition at line 998 of file buffer2.c.
References pg_create(), pg_destroy_struct(), RIGHT_SIDE, Vect_destroy_line_struct(), and Vect_new_line_struct().
void Vect_line_parallel2 | ( | struct line_pnts * | InPoints, | |
double | da, | |||
double | db, | |||
double | dalpha, | |||
int | side, | |||
int | round, | |||
double | tol, | |||
struct line_pnts * | OutPoints | |||
) |
void Vect_point_buffer2 | ( | double | px, | |
double | py, | |||
double | da, | |||
double | db, | |||
double | dalpha, | |||
int | round, | |||
double | tol, | |||
struct line_pnts ** | oPoints | |||
) |
Creates buffer around the point (px, py).
px | input point x-coordinate | |
py | input point y-coordinate | |
da | distance along major axis | |
da | distance along minor axis | |
dalpha | angle between 0x and major axis | |
round | make corners round | |
tol | maximum distance between theoretical arc and output segments | |
[out] | nPoints | output polygon outer border (ccw order) |
Definition at line 1132 of file buffer2.c.
References PI, Vect_append_point(), and Vect_new_line_struct().