~ubuntu-branches/ubuntu/wily/grass/wily

« back to all changes in this revision

Viewing changes to vector/v.generalize/simplification.c

Tags: 7.0.0~rc1+ds1-1~exp1
* New upstream release candidate.
* Repack upstream tarball, remove precompiled Python objects.
* Add upstream metadata.
* Update gbp.conf and Vcs-Git URL to use the experimental branch.
* Update watch file for GRASS 7.0.
* Drop build dependencies for Tcl/Tk, add build dependencies:
  python-numpy, libnetcdf-dev, netcdf-bin, libblas-dev, liblapack-dev
* Update Vcs-Browser URL to use cgit instead of gitweb.
* Update paths to use grass70.
* Add configure options: --with-netcdf, --with-blas, --with-lapack,
  remove --with-tcltk-includes.
* Update patches for GRASS 7.
* Update copyright file, changes:
  - Update copyright years
  - Group files by license
  - Remove unused license sections
* Add patches for various typos.
* Fix desktop file with patch instead of d/rules.
* Use minimal dh rules.
* Bump Standards-Version to 3.9.6, no changes.
* Use dpkg-maintscript-helper to replace directories with symlinks.
  (closes: #776349)
* Update my email to use @debian.org address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#include <stdio.h>
20
20
#include <stdlib.h>
21
21
#include <grass/gis.h>
22
 
#include <grass/Vect.h>
 
22
#include <grass/vector.h>
23
23
#include <grass/glocale.h>
24
24
#include "point.h"
25
25
#include "pq.h"
225
225
 */
226
226
int reumann_witkam(struct line_pnts *Points, double thresh, int with_z)
227
227
{
228
 
    int seg1, seg2;
229
228
    int i, count;
230
229
    POINT x0, x1, x2, sub, diff;
231
230
    double subd, diffd, sp, dist;
238
237
 
239
238
    thresh *= thresh;
240
239
 
241
 
    seg1 = 0;
242
 
    seg2 = 1;
243
240
    count = 1;
244
241
 
245
 
    point_assign(Points, 0, with_z, &x1);
246
 
    point_assign(Points, 1, with_z, &x2);
 
242
    point_assign(Points, 0, with_z, &x1, 0);
 
243
    point_assign(Points, 1, with_z, &x2, 0);
247
244
    point_subtract(x2, x1, &sub);
248
245
    subd = point_dist2(sub);
249
246
 
250
247
 
251
248
    for (i = 2; i < n; i++) {
252
249
 
253
 
        point_assign(Points, i, with_z, &x0);
 
250
        point_assign(Points, i, with_z, &x0, 0);
254
251
        point_subtract(x1, x0, &diff);
255
252
        diffd = point_dist2(diff);
256
253
        sp = point_dot(diff, sub);
259
256
         * all variables which do not change for each line-point calculation */
260
257
        if (dist > thresh) {
261
258
 
262
 
            point_assign(Points, i - 1, with_z, &x1);
263
 
            point_assign(Points, i, with_z, &x2);
 
259
            point_assign(Points, i - 1, with_z, &x1, 0);
 
260
            point_assign(Points, i, with_z, &x2, 0);
264
261
            point_subtract(x2, x1, &sub);
265
262
            subd = point_dist2(sub);
266
263