misc.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  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. extern 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. extern 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. extern int copy_tables_by_cats(struct Map_info *In, struct Map_info *Out);
  17. /* parse filter option and select appropriate lines */
  18. /* return array with selected lines or NULL */
  19. struct varray *parse_filter_options(struct Map_info *Map, int layer,
  20. int mask_type, char *where, char *cats, int *chcat);
  21. /* check topology corruption by boundary modification
  22. * return 0 on corruption, 1 if modification is ok */
  23. int check_topo(struct Map_info *, int, struct line_pnts *,
  24. struct line_pnts *, struct line_cats *);
  25. #endif