count_decimation.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /****************************************************************************
  2. *
  3. * MODULE: v.decimate
  4. * AUTHOR(S): Vaclav Petras
  5. * PURPOSE: Reduce the number of points in a vector map
  6. * COPYRIGHT: (C) 2015 by the GRASS Development Team
  7. *
  8. * This program is free software under the GNU General Public
  9. * License (>=v2). Read the COPYING file that comes with GRASS
  10. * for details.
  11. *
  12. *****************************************************************************/
  13. #ifndef GRASS_COUNT_DECIMATION_H
  14. #define GRASS_COUNT_DECIMATION_H
  15. /* TODO: change int to ul/ull */
  16. /* TODO: revise names (now partially on some vars in v.in.lidar code) */
  17. struct CountDecimationControl {
  18. int offset_n;
  19. int offset_n_counter;
  20. int skip_every;
  21. int preserve_every;
  22. int every_counter;
  23. int n_count_filtered;
  24. int limit_n;
  25. int limit_n_counter;
  26. };
  27. void count_decimation_init(struct CountDecimationControl *control,
  28. int *skip, int *preserve,
  29. int *offset, int *limit);
  30. int count_decimation_is_valid(struct CountDecimationControl *control);
  31. int count_decimation_is_noop(struct CountDecimationControl *control);
  32. void count_decimation_init_from_str(struct CountDecimationControl *control,
  33. const char *skip, const char *preserve,
  34. const char *offset, const char *limit);
  35. int count_decimation_is_out(struct CountDecimationControl *control);
  36. int count_decimation_is_end(struct CountDecimationControl *control);
  37. #endif /* GRASS_COUNT_DECIMATION_H */