dlg.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. #ifndef GRASS_DLG_H
  2. #define GRASS_DLG_H
  3. struct dlg_node
  4. {
  5. double x;
  6. double y;
  7. int n_lines;
  8. int n_atts;
  9. int n_lines_alloc;
  10. int n_atts_alloc;
  11. int *lines;
  12. int *atts;
  13. };
  14. struct dlg_area
  15. {
  16. double x;
  17. double y;
  18. int n_lines;
  19. int n_atts;
  20. int n_isles;
  21. int n_lines_alloc;
  22. int n_atts_alloc;
  23. int *lines;
  24. int *atts;
  25. };
  26. struct dlg_line
  27. {
  28. int start_node;
  29. int end_node;
  30. int left_area;
  31. int right_area;
  32. int n_coors;
  33. int n_atts;
  34. int n_coors_alloc;
  35. int n_atts_alloc;
  36. int *atts;
  37. double *coors;
  38. double N;
  39. double S;
  40. double E;
  41. double W;
  42. };
  43. struct dlg_head
  44. {
  45. int nlines;
  46. char banner[73];
  47. char cart_unit[41];
  48. char source_date[11];
  49. char orig_scale[9];
  50. char line_3[73];
  51. int level_code;
  52. int plani_code;
  53. int plani_zone;
  54. int plani_units;
  55. double resolution;
  56. int trans_param;
  57. int misc_records;
  58. int num_sides;
  59. int num_cats;
  60. };
  61. struct dlg_coors
  62. {
  63. double lat[4];
  64. double lon[4];
  65. double utm_n[4];
  66. double utm_e[4];
  67. };
  68. struct dlg_proj
  69. {
  70. double params[15];
  71. double int_params[4];
  72. };
  73. struct dlg_cats
  74. {
  75. int read;
  76. char name[21];
  77. int form_code;
  78. int num_nodes;
  79. int act_nodes;
  80. int nta_link;
  81. int ntl_link;
  82. int num_areas;
  83. int act_areas;
  84. int atn_link;
  85. int atl_link;
  86. int area_list;
  87. int num_lines;
  88. int act_lines;
  89. int line_list;
  90. };
  91. struct dlg
  92. {
  93. struct dlg_head head;
  94. struct dlg_cats cats;
  95. struct dlg_coors coors;
  96. struct dlg_proj proj;
  97. struct dlg_line line;
  98. struct dlg_area area;
  99. struct dlg_node node;
  100. long *node_off;
  101. long *area_off;
  102. long *line_off;
  103. int node_alloc;
  104. int area_alloc;
  105. int line_alloc;
  106. int max_nodes;
  107. int max_areas;
  108. int max_lines;
  109. };
  110. #define SW 0
  111. #define NW 1
  112. #define NE 2
  113. #define SE 3
  114. /* this will be stored as a double on mass, sun and 3b2's */
  115. #define ISLAND_MARKER -99999999.
  116. /* Need a definition for FILE */
  117. #include <stdio.h>
  118. #include <grass/defs/dlg.h>
  119. #endif