浏览代码

v.decimate: fix counting of points at the beginning (https://trac.osgeo.org/grass/changeset/67160 in v.in.lidar)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@67294 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 9 年之前
父节点
当前提交
052991a36c
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      vector/v.decimate/count_decimation.c

+ 5 - 3
vector/v.decimate/count_decimation.c

@@ -92,11 +92,13 @@ void count_decimation_init_from_str(struct CountDecimationControl *control,
 int count_decimation_is_out(struct CountDecimationControl *control)
 {
     if (control->offset_n) {
-        control->offset_n_counter++;
-        if (control->offset_n_counter < control->offset_n)
+        if (control->offset_n_counter < control->offset_n) {
+            control->offset_n_counter++;
             return TRUE;
-        else
+        }
+        else {
             control->offset_n = 0;  /* disable offset check */
+        }
     }
     if (control->skip_every) {
         control->every_counter++;