misc.h 865 B

1234567891011121314151617181920212223242526272829
  1. #ifndef MISC_H_
  2. #define MISC_H_
  3. #include <grass/vector.h>
  4. /* returns bitmask for all the types specified in type_opt
  5. * e.g GV_LINE | GV_BOUNDARY
  6. */
  7. int type_mask(struct Option *type_opt);
  8. /* returns the squared distance and the index of the point furthest
  9. * from the line segment Points[a], Points[b] such that the
  10. * index of this points is in [a,b]
  11. */
  12. int get_furthest(struct line_pnts *Points, int a, int b, int with_z,
  13. double *dist);
  14. /* copy attributes of In which appear in Out */
  15. /* returns 1 on success, 0 on failure */
  16. int copy_tables_by_cats(struct Map_info *In, struct Map_info *Out);
  17. /* check topology corruption by boundary modification
  18. * return 0 on corruption, 1 if modification is ok */
  19. int check_topo(struct Map_info *, int, struct line_pnts *,
  20. struct line_pnts *, struct line_cats *);
  21. int set_topo_debug(void);
  22. #endif