63 if (2 == (newln->
dims = gln->
dims)) {
69 for (i = 0; i < np; i++) {
70 newln->
p2[i][
X] = gln->
p2[i][
X];
71 newln->
p2[i][
Y] = gln->
p2[i][
Y];
80 for (i = 0; i < np; i++) {
81 newln->
p3[i][
X] = gln->
p3[i][
X];
82 newln->
p3[i][
Y] = gln->
p3[i][
Y];
83 newln->
p3[i][
Z] = gln->
p3[i][
Z];
114 targp = (int)(gln->
npts / factor);
122 if (2 == (newln->
dims = gln->
dims)) {
128 for (i = 0; i < targp; i++) {
129 if (i == targp - 1) {
130 nextp = gln->
npts - 1;
133 nextp = (int)((i * (gln->
npts - 1)) / (targp - 1));
136 newln->
p2[i][
X] = gln->
p2[nextp][
X];
137 newln->
p2[i][
Y] = gln->
p2[nextp][
Y];
146 for (i = 0; i < targp; i++) {
147 if (i == targp - 1) {
148 nextp = gln->
npts - 1;
151 nextp = (int)((i * (gln->
npts - 1)) / (targp - 1));
154 newln->
p3[i][
X] = gln->
p3[nextp][
X];
155 newln->
p3[i][
Y] = gln->
p3[nextp][
Y];
156 newln->
p3[i][
Z] = gln->
p3[nextp][
Z];
177 for (n = 0; n < gln->
npts - 1; n++) {
201 for (tln = gln; tln; tln = tln->
next) {
234 int T_pts, A_ppl, N_s;
235 float decim_factor, slength[
MFAST_LNS], T_slength, A_slength;
252 for (gln = gv->
lines; gln; gln = gln->
next) {
253 if (gln->
npts > A_ppl) {
255 prev->
next = thin_line(gln, decim_factor);
259 prev = gv->
fastlines = thin_line(gln, decim_factor);
267 A_slength = T_slength / N_s;
270 for (gln = gv->
lines; gln; gln = gln->
next) {
271 if (gln->
npts <= A_ppl) {
273 if (slength[N_s++] > A_slength) {
275 prev->
next = copy_line(gln);
286 G_debug(3,
"Decimated lines have %d points.",
#define TFAST_PTS
target number of desired points to represent entire file
float GS_distance(float *, float *)
Calculate distance.
float gv_line_length(geoline *gln)
Get line width.
int gv_decimate_lines(geovect *gv)
Decimate line.
int gln_num_points(geoline *gln)
Get number of line vertices.
int gv_num_points(geovect *gv)
Get number of points in vector.
#define MFAST_LNS
max number of lines desired
float GS_P2distance(float *, float *)
Calculate distance in plane.
int G_debug(int, const char *,...) __attribute__((format(printf