local_proto.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /****************************************************************************
  2. *
  3. * MODULE: r.in.Lidar
  4. *
  5. * AUTHOR(S): Markus Metz
  6. * Based on r.in.xyz by Hamish Bowman, Volker Wichmann
  7. *
  8. * PURPOSE: Imports LAS LiDAR point clouds to a raster map using
  9. * aggregate statistics.
  10. *
  11. * COPYRIGHT: (C) 2011 Markus Metz and the The GRASS Development Team
  12. *
  13. * This program is free software under the GNU General Public
  14. * License (>=v2). Read the file COPYING that comes with GRASS
  15. * for details.
  16. *
  17. *****************************************************************************/
  18. #ifndef __LOCAL_PROTO_H__
  19. #define __LOCAL_PROTO_H__
  20. #include <grass/gis.h>
  21. #include <grass/raster.h>
  22. #include <liblas/capi/liblas.h>
  23. #define BUFFSIZE 256
  24. #define METHOD_NONE 0
  25. #define METHOD_N 1
  26. #define METHOD_MIN 2
  27. #define METHOD_MAX 3
  28. #define METHOD_RANGE 4
  29. #define METHOD_SUM 5
  30. #define METHOD_MEAN 6
  31. #define METHOD_STDDEV 7
  32. #define METHOD_VARIANCE 8
  33. #define METHOD_COEFF_VAR 9
  34. #define METHOD_MEDIAN 10
  35. #define METHOD_PERCENTILE 11
  36. #define METHOD_SKEWNESS 12
  37. #define METHOD_TRIMMEAN 13
  38. #define LAS_ALL 0
  39. #define LAS_FIRST 1
  40. #define LAS_MID 2
  41. #define LAS_LAST 3
  42. /* info.c */
  43. void print_lasinfo(LASHeaderH, LASSRSH);
  44. int scan_bounds(LASReaderH, int, int, int, double, struct Cell_head *);
  45. /* support.c */
  46. int blank_array(void *, int, int, RASTER_MAP_TYPE, int);
  47. int update_n(void *, int, int, int);
  48. int update_min(void *, int, int, int, RASTER_MAP_TYPE, double);
  49. int update_max(void *, int, int, int, RASTER_MAP_TYPE, double);
  50. int update_sum(void *, int, int, int, RASTER_MAP_TYPE, double);
  51. int update_sumsq(void *, int, int, int, RASTER_MAP_TYPE, double);
  52. /* projection.c */
  53. void projection_mismatch_report(struct Cell_head cellhd,
  54. struct Cell_head loc_wind,
  55. struct Key_Value *loc_proj_info,
  56. struct Key_Value *loc_proj_units,
  57. struct Key_Value *proj_info,
  58. struct Key_Value *proj_units,
  59. int err);
  60. void projection_check_wkt(struct Cell_head cellhd,
  61. struct Cell_head loc_wind,
  62. const char *projstr,
  63. int override,
  64. int verbose);
  65. /* raster reading */
  66. int row_array_get_value_row_col(void *array, int arr_row, int arr_col,
  67. int cols, RASTER_MAP_TYPE rtype, double *value);
  68. /* multiple files */
  69. struct StringList
  70. {
  71. int num_items;
  72. int max_items;
  73. char **items;
  74. };
  75. void string_list_from_file(struct StringList *string_list, char *filename);
  76. void string_list_from_one_item(struct StringList *string_list, char *item);
  77. void string_list_free(struct StringList *string_list);
  78. #endif /* __LOCAL_PROTO_H__ */