vector.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <head>
  2. <title>GRASS 5.7/6 Vector Format and API</title>
  3. </head>
  4. <body>
  5. <p><H1>GRASS 5.7/6 Vector Format and API</H1>
  6. The API is described in
  7. <p><a href="http://grass.itc.it/devel/index.php#prog">GRASS 6 Programmer's Manual</a>
  8. <p>
  9. source code file:<br>
  10. lib/vector/vectorlib.dox
  11. <HR>
  12. <h2><A NAME="ascii">Vector ASCII Format Specification</a></h2>
  13. <p>
  14. <i>format notes here are outdated and to be merged into<br>
  15. vector/v.in.ascii/description.html</i>
  16. <p>The ASCII format in the new version contains support for categories,
  17. z-coordinates, and the new types centroid, face, and kernel.
  18. Points and centroids are saved as one coordinate pair instead of two.
  19. File is saved in old dig_ascii directory but the name will be probably changed.
  20. <h3>Head</h3>
  21. The head of the file is similar as the head file of vector binary
  22. format but contains bounding box also. Key words are:<br>
  23. <pre>
  24. ORGANIZATION
  25. DIGIT DATE
  26. DIGIT NAME
  27. MAP NAME
  28. MAP DATE
  29. MAP SCALE
  30. OTHER INFO
  31. ZONE
  32. WEST EDGE
  33. EAST EDGE
  34. SOUTH EDGE
  35. NORTH EDGE
  36. MAP THRESH
  37. </pre>
  38. <h3>Body</h3>
  39. The body begins with the row:
  40. <pre>
  41. VERTI:
  42. </pre>
  43. followed by records of lines:
  44. <pre>
  45. TYPE NUMBER_OF_COORDINATES [NUMBER_OF_CATEGORIES]
  46. X Y [Z]
  47. ....
  48. X Y [Z]
  49. [ FIELD CATEGORY]
  50. ....
  51. [ FIELD CATEGORY]
  52. </pre>
  53. Everything above in <b>[ ]</b> is optional.
  54. Note the coordinate order in the old version (Y X) has been changed
  55. to (X Y [Z]).
  56. <br><br>
  57. TYPE may be:<br>
  58. <ul>
  59. <li><b>P</b> point (dot) <br>
  60. <li><b>p</b> dead point (dead dot) <br>
  61. <li><b>L</b> line <br>
  62. <li><b>l</b> dead line <br>
  63. <li><b>B(A)</b> boundary <br>
  64. <li><b>b(a)</b> dead boundary <br>
  65. <li><b>C</b> centroid <br>
  66. <li><b>c</b> dead centroid <br>
  67. <li><b>F</b> face (3D boundary) <br>
  68. <li><b>K</b> kernel (3D centroid) <br>
  69. </ul>
  70. <br>
  71. Example of records:
  72. <pre>
  73. P 1 1
  74. 1234 3435
  75. 1 354
  76. L 3 1
  77. 4132 4534
  78. 1453 1454
  79. 1453 4543
  80. 1 355
  81. </pre>
  82. <HR>
  83. <h2><A NAME="example">Vector module programming example</a></h2>
  84. <a href=v.example/>Vector module C programming example</a>
  85. <h2><A NAME="status">Vector module upgrade status</a></h2>
  86. <a href=v.modules.html>Vector upgrade status</a> (partially outdated)
  87. <hr>
  88. $Date$
  89. </BODY>
  90. </HTML>