vector.html 2.1 KB

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