vectorlib.dox 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584
  1. /*! \page Vector_Library GRASS 6 Vector Architecture
  2. by GRASS Development Team
  3. http://grass.osgeo.org
  4. <h2>Table of contents</h2>
  5. Specifications:
  6. - \subpage background
  7. - \subpage intro
  8. - \subpage libraries
  9. - \subpage vlib_topology_management
  10. - \subpage vlib_spidx
  11. - \subpage vlib_categories_layers
  12. - \subpage vlib_attributes
  13. - \subpage vlibtin
  14. - \subpage grassdglib
  15. - \subpage vlibascii
  16. - \subpage vectmodulesoper
  17. \subpage vlibfunc
  18. - \subpage area
  19. - \subpage array
  20. - \subpage box
  21. - \subpage break_lines
  22. - \subpage break_polygons
  23. - \subpage bridges
  24. - \subpage buffer
  25. - \subpage build
  26. - \subpage build_nat
  27. - \subpage build_ogr
  28. - \subpage cats
  29. - \subpage cindex
  30. - \subpage clean_nodes
  31. - \subpage close
  32. - \subpage constraint
  33. - \subpage dangles
  34. - \subpage dbcolumns
  35. - \subpage error
  36. - \subpage field
  37. - \subpage find
  38. - \subpage graph
  39. - \subpage header
  40. - \subpage hist
  41. - \subpage init_head
  42. - \subpage intersect
  43. - \subpage legal_vname
  44. - \subpage level
  45. - \subpage level_two
  46. - \subpage line
  47. - \subpage list
  48. - \subpage map
  49. - \subpage net
  50. - \subpage open
  51. - \subpage overlay
  52. - \subpage vpoly
  53. - \subpage read
  54. - \subpage remove_areas
  55. - \subpage remove_duplicates
  56. - \subpage rewind
  57. - \subpage select
  58. - \subpage sindex
  59. - \subpage snap
  60. - \subpage tin
  61. - \subpage type
  62. - \subpage delete
  63. - \subpage write
  64. \subpage contacts
  65. \subpage references
  66. \subpage seealso
  67. \section background Background
  68. Generally, the vector data model is used to describe geographic
  69. phenomena which may be represented by geometric entities like points,
  70. lines, and areas. The GRASS vector data model includes the description
  71. of topology, where besides the coordinates describing the location of
  72. the primitives (points, lines, boundaries, centroids, faces, and
  73. kernels), their spatial relations are also stored. In general,
  74. topological GIS require a data structure where the common boundary
  75. between two adjacent areas is stored as a single line, simplifying the
  76. map maintenance.
  77. \section intro Introduction
  78. The GRASS 6 vector format is very similar to old GRASS 4.x (5.0/5.3)
  79. vector format.
  80. This description covers the new GRASS 6 vector library architecture.
  81. This new architecture overcomes the vector limitations of GRASS
  82. 4.x-5.4.x by extending the vector support with attributes stored in
  83. external relational databases, and by new 3D capabilities. Besides
  84. internal file based storage the geometry may alternatively be stored
  85. in a PostGIS database. This enables users to maintain large data sets
  86. with simultaneous write access. External GIS formats such as
  87. SHAPE-files may be used directly, without requiring format conversion.
  88. The current implementation includes:
  89. <ul>
  90. <li> multi-layer: features in one vector map may represent more layers and
  91. may be linked to more external tables (see \ref vlib_categories_layers);
  92. <li> 2D and 3D vector geometry with topology (see \ref vlib_topology_management);
  93. <li> multi-format: external data formats supported (SHAPE-file, OGR sources etc.);
  94. <li> portability: platform independent internal format, read- and writable on 32bit,
  95. 64bit etc. computer architectures;
  96. <li> integrated \ref dglib: support for vector network analysis;
  97. <li> spatial index: based on R-tree method for fast vector geometry access (see \ref vlib_spidx).
  98. <li> multi-attribute: attributes saved in external Relational Database Management
  99. System (RDBMS) connected through DBMI library and drivers (\ref vlib_attributes);
  100. </ul>
  101. GRASS vector maps are stored in an arc-node representation, consisting
  102. of curves called arcs. An arc is stored as a series of x,y,z
  103. coordinate pairs. The two endpoints of an arc are called nodes. Two
  104. consecutive x,y,z pairs define an arc segment. The user specifies the
  105. type of input to GRASS; GRASS doesn't decide. GRASS allows for the
  106. line definition which allows for multiple types to co-exist in the
  107. same map. Centroid are assigned to area it is within/inside
  108. (geometrically). An area is identified by an x,y,z centroid point
  109. geometrically inside with a category number (ID). This identifies the
  110. area. Such centroids are stored in the same binary 'coor' file with
  111. other primitives. Each element may have none, one or more categories
  112. (cats). More cats are distinguished by field number (field, called
  113. "layer" at user level). Single and multi-category support on modules
  114. level are implemented. Z-coordinate is optional and both 2D and 3D
  115. files may be written.
  116. <p>
  117. The following vector objects are defined:
  118. <ul>
  119. <li> point: a point;
  120. <li> line: a directed sequence of connected vertices with two endpoints called nodes;
  121. <li> boundary: the border line to describe an area;
  122. <li> centroid: a point within a closed boundary;
  123. <li> area: the topological composition of centroid and boundary;
  124. <li> face: a 3D area;
  125. <li> kernel: a 3D centroid in a volume;
  126. <li> volume: a 3D corpus, the topological composition of faces and kernel.
  127. </ul>
  128. Note that all lines and boundaries can be polylines (with nodes in
  129. between).
  130. \section libraries Vector libraries
  131. Besides internal library functions there are two main libraries:
  132. <ul>
  133. <li> Vlib (Vector library), see \ref vlib
  134. <li> DGLib (Directed Graph Library), see \ref dglib
  135. </ul>
  136. For historical reasons, there are two internal libraries for vector:
  137. <ul>
  138. <li> diglib (with dig_*() functions), GRASS 3.x/4.x
  139. <li> Vlib (with V1_*(), V2_*() and Vect_*() functions), GRASS 4.x/5.x (except for the 5.7 interim version)
  140. </ul>
  141. The vector library was introduced in GRASS 4.0 to hide internal vector
  142. files' formats and structures. In GRASS 6, everything is accessed via
  143. Vect_*() functions, for example:
  144. Old 4.x code:
  145. \verbatim
  146. xx = Map.Att[Map.Area[area_num].att].x;
  147. \endverbatim
  148. New 6.x functions:
  149. \verbatim
  150. Vect_get_area_centroid()
  151. Vect_get_centroid_coor()
  152. \endverbatim
  153. In GRASS 6, all internal, mostly non-topological vector functions are
  154. hidden from the modules' API (mainly dig_*(), V1_*() and V2_*()
  155. functions). All available Vect_*() functions are topological vector
  156. functions.
  157. \subsection vlib Introduction to Vlib (Vector library)
  158. <i>Note: For details please read Blazek et al. 2002 (see below) as well as the
  159. references in this document.</i>
  160. \subsubsection Directory_structure Directory structure
  161. Directory structure and file names are changed with respect to
  162. previous GRASS versions. All vector files for one vector map are
  163. stored in one directory:<br>
  164. <b>$MAPSET/vector/vector_name/</b>
  165. <p>
  166. This directory contains these files:
  167. <ul>
  168. <li><b>coor</b> - binary file, coordinates [former dig/ file]
  169. <li><b>topo</b> - binary file, topology [former dig_plus/ file]
  170. <li><b>cidx</b> - binary file, category index
  171. <li><b>head</b> - text file, header information [former part of dig/ file]
  172. <li><b>dbln</b> - text file, link(s) to attribute table(s)
  173. <li><b>hist</b> - text file, vector map change history
  174. </ul>
  175. \subsubsection coor_file_format_specification Coor file format specification
  176. <ol>
  177. <li> In the coor file the following is stored: 'line' (element) type,
  178. number of attributes and layer number for each category.
  179. <li> Coordinates in binary file are stored as double (8 bytes).
  180. </ol>
  181. <b>Head</b>
  182. <TABLE border=2>
  183. <TR><TD>Name</TD><TD>Type</TD><TD>Number</TD><TD>Description</TD></TR>
  184. <TR><TD>Version_Major </TD><TD>C</TD><TD>1</TD><TD>file version (major)</TD></TR>
  185. <TR><TD>Version_Minor </TD><TD>C</TD><TD>1</TD><TD>file version (minor)</TD></TR>
  186. <TR><TD>Back_Major</TD><TD>C</TD><TD>1</TD><TD>supported from GRASS version (major)</TD></TR>
  187. <TR><TD>Back_Minor</TD><TD>C</TD><TD>1</TD><TD>supported from GRASS version (minor)</TD></TR>
  188. <TR><TD>byte_order</TD><TD>C</TD><TD>1</TD><TD>little or big endian
  189. flag; files are written in machine native order but
  190. files in both little and big endian order may be
  191. readl; zero for little endian</TD></TR>
  192. <TR><TD>size</TD><TD>L</TD><TD>1</TD><TD>coor file size</TD></TR>
  193. <TR><TD>with_z</TD><TD>C</TD><TD>1</TD><TD>2D or 3D flag; zero for 2D</TD></TR>
  194. <TR><TD>reserved</TD><TD>C</TD><TD>10</TD><TD>not used</TD></TR>
  195. </TABLE>
  196. <p>
  197. <b>Body</b>
  198. The body consists of line records:
  199. <br>
  200. <TABLE border=2>
  201. <TR><TD>Name</TD><TD>Type</TD><TD>Number</TD><TD>Description</TD></TR>
  202. <TR><TD>record header</TD><TD>C</TD><TD>1</TD><TD>
  203. <UL>
  204. <LI><B>0. bit</B> : 1 - alive, 0 - dead line
  205. <LI><B>1. bit</B> : 1 - categories, 0 - no categories
  206. <LI><B>2.-3. bit</B> : type - one of: GV_POINT, GV_LINE,
  207. GV_BOUNDARY, GV_CENTROID
  208. <LI><B>4.-7. bit</B> : reserved, not used
  209. </UL>
  210. </TD></TR>
  211. <TR><TD>ncats</TD><TD>I</TD><TD>1</TD><TD>number of categories
  212. (written only if categories exist) </TD></TR>
  213. <TR><TD>field</TD><TD>I</TD><TD>ncats</TD><TD>field identifier,
  214. distinguishes between more categories append to one line (written
  215. only if categories exist; field is called "layer" at user
  216. level)</TD></TR>
  217. <TR><TD>cat</TD><TD>I</TD><TD>ncats</TD><TD>category value (written
  218. only if categories exist)</TD></TR>
  219. <TR><TD>ncoor</TD><TD>I</TD><TD>1</TD><TD>written for GV_LINES and GV_BOUNDARIES
  220. only</TD></TR>
  221. <TR><TD>x</TD><TD>D</TD><TD>ncoor</TD><TD>x coordinate</TD></TR>
  222. <TR><TD>y</TD><TD>D</TD><TD>ncoor</TD><TD>y coordinate</TD></TR>
  223. <TR><TD>z</TD><TD>D</TD><TD>ncoor</TD><TD>z coordinate; present if
  224. with_z in head is set to 1</TD></TR> </TABLE>
  225. <P>
  226. <B>Types used in coor file</B>
  227. <TABLE border=2>
  228. <TR><TD>Type</TD><TD>Name</TD><TD>Size in Bytes</TD></TR>
  229. <TR><TD>D</TD><TD>Double</TD><TD>8</TD></TR>
  230. <TR><TD>L</TD><TD>Long </TD><TD>4</TD></TR>
  231. <TR><TD>I</TD><TD>Int </TD><TD>4</TD></TR>
  232. <TR><TD>S</TD><TD>Short </TD><TD>4</TD></TR>
  233. <TR><TD>C</TD><TD>Char </TD><TD>1</TD></TR>
  234. </TABLE>
  235. \subsubsection head_file_format Head file format
  236. The file is an unordered list of key/value entries. The <i>key</i>
  237. is a string separated from <i>value</i> by a colon and optional
  238. whitespace. Key words are:<br>
  239. \verbatim
  240. ORGANIZATION
  241. DIGIT DATE
  242. DIGIT NAME
  243. MAP NAME
  244. MAP DATE
  245. MAP SCALE
  246. OTHER INFO
  247. ZONE
  248. MAP THRESH
  249. \endverbatim
  250. \section vlib_topology_management Vector library topology management
  251. Topology general characteristics:
  252. <ol>
  253. <li> geometry and attributes are stored separately
  254. (don't read both if it is not necessary (usually it is not))</li>
  255. <li> the format is topological (areas build from boundaries)</li>
  256. <li>currently only 2D topology is supported
  257. </ol>
  258. <p>
  259. Topology is written for native format while pseudo-topology is written
  260. for OGR sources, SHAPE-link.
  261. \subsection topo_file_format Topo file format
  262. <b>Head</b>
  263. <TABLE border=2>
  264. <TR><TD>Name</TD><TD>Type</TD><TD>Number</TD><TD>Description</TD></TR>
  265. <TR><TD>Version_Major </TD><TD>C</TD><TD>1</TD><TD>file version (major)</TD></TR>
  266. <TR><TD>Version_Minor </TD><TD>C</TD><TD>1</TD><TD>file version (minor)</TD></TR>
  267. <TR><TD>Back_Major</TD><TD>C</TD><TD>1</TD><TD>supported from GRASS version (major)</TD></TR>
  268. <TR><TD>Back_Minor</TD><TD>C</TD><TD>1</TD><TD>supported from GRASS version (minor)</TD></TR>
  269. <TR><TD>byte_order</TD><TD>C</TD><TD>1</TD><TD>little or big endian
  270. flag; files are written in machine native order but
  271. files in both little and big endian order may be
  272. readl; zero for little endian</TD></TR>
  273. <TR><TD>head_size</TD><TD>L</TD><TD>1</TD><TD>header size</TD></TR>
  274. <TR><TD>with_z</TD><TD>C</TD><TD>1</TD><TD>2D or 3D flag; zero for 2D</TD></TR>
  275. <TR><TD>box</TD><TD>D</TD><TD>6</TD><TD>Bounding box coordinates (N,S,E,W,T,B)</TD></TR>
  276. <TR><TD>n_nodes, n_lines, etc.</TD><TD>I</TD><TD>7</TD><TD>Number of
  277. nodes, edges, lines, areas, isles, volumes and holes</TD></TR>
  278. <TR><TD>n_plines, n_llines, etc.</TD><TD>I</TD><TD>7</TD><TD>Number of
  279. points, lines, boundaries, centroids, faces and kernels</TD></TR>
  280. <TR><TD>Node_offset, Edge_offset,
  281. etc.</TD><TD>L</TD><TD>7</TD><TD>Offset value for nodes, edges, lines,
  282. areas, isles, volumes and holes</TD></TR>
  283. <TR><TD>coor_size</TD><TD>L</TD><TD>1</TD><TD>File size</TD></TR>
  284. </TABLE>
  285. <b>Body</b>
  286. For each node (n_nodes):
  287. <TABLE border=2>
  288. <TR><TD>Name</TD><TD>Type</TD><TD>Number</TD><TD>Description</TD></TR>
  289. <TR><TD>n_lines</TD><TD>I</TD><TD>1</TD><TD>Number of lines (0 for dead node)</TD></TR>
  290. <TR><TD>lines</TD><TD>I</TD><TD>n_lines</TD><TD>Line ids</TD></TR>
  291. <TR><TD>angles</TD><TD>D</TD><TD>n_lines</TD><TD>Angle value</TD></TR>
  292. <TR><TD>n_edges</TD><TD>I</TD><TD>1</TD><TD>Reserved for edges (only for with_z)</TD></TR>
  293. <TR><TD>x,y</TD><TD>D</TD><TD>2</TD><TD>Coordinate pair</TD></TR>
  294. <TR><TD>z</TD><TD>D</TD><TD>1</TD><TD>Only for with_z</TD></TR>
  295. </TABLE>
  296. For each line (n_lines):
  297. <TABLE border=2>
  298. <TR><TD>Name</TD><TD>Type</TD><TD>Number</TD><TD>Description</TD></TR>
  299. <TR><TD>feature type</TD><TD>C</TD><TD>1</TD><TD>0 for dead</TD></TR>
  300. <TR><TD>offset</TD><TD>L</TD><TD>1</TD><TD>Line offset</TD></TR>
  301. <TR><TD>N1</TD><TD>I</TD><TD>1</TD><TD>First node id (only if feature type is GV_POINTS, GV_LINES or GV_KERNEL)</TD></TR>
  302. <TR><TD>N2</TD><TD>I</TD><TD>1</TD><TD>Second node id (only if feature type is GV_LINE or GV_BOUNDARY)</TD></TR>
  303. <TR><TD>left</TD><TD>I</TD><TD>1</TD><TD>Left area id for feature type GV_BOUNDARY / Area id for feature type GV_CENTROID</TD></TR>
  304. <TR><TD>right</TD><TD>I</TD><TD>1</TD><TD>Right area id (for feature type GV_BOUNDARY)</TD></TR>
  305. <TR><TD>vol</TD><TD>I</TD><TD>1</TD><TD>Reserved for kernel (volume number, for feature type GV_KERNEL)</TD></TR>
  306. <TR><TD>N,S,E,W</TD><TD>D</TD><TD>4</TD><TD>Line bounding box (for feature type GV_LINE, GV_BOUNDARY or GV_FACE)</TD></TR>
  307. <TR><TD>T,B</TD><TD>D</TD><TD>2</TD><TD>Line bounding box for 3D (only if with_z=1)</TD></TR>
  308. </TABLE>
  309. For each area (n_areas):
  310. <TABLE border=2>
  311. <TR><TD>Name</TD><TD>Type</TD><TD>Number</TD><TD>Description</TD></TR>
  312. <TR><TD>n_lines</TD><TD>I</TD><TD>1</TD><TD>number of boundaries</TD></TR>
  313. <TR><TD>lines</TD><TD>I</TD><TD>n_lines</TD><TD>Line ids</TD></TR>
  314. <TR><TD>n_isles</TD><TD>I</TD><TD>1</TD><TD>Number of isles</TD></TR>
  315. <TR><TD>isles</TD><TD>I</TD><TD>n_isles</TD><TD>Isle ids</TD></TR>
  316. <TR><TD>centroid</TD><TD>I</TD><TD>1</TD><TD>Centroid id</TD></TR>
  317. <TR><TD>N,S,E,W</TD><TD>D</TD><TD>4</TD><TD>Area bounding box</TD></TR>
  318. <TR><TD>T,B</TD><TD>D</TD><TD>2</TD><TD>Area bounding box for 3D (only if with_z=1)</TD></TR>
  319. </TABLE>
  320. For each isle (n_isle):
  321. <TABLE border=2>
  322. <TR><TD>Name</TD><TD>Type</TD><TD>Number</TD><TD>Description</TD></TR>
  323. <TR><TD>n_lines</TD><TD>I</TD><TD>1</TD><TD>number of boundaries</TD></TR>
  324. <TR><TD>lines</TD><TD>I</TD><TD>n_lines</TD><TD>Line ids</TD></TR>
  325. <TR><TD>area</TD><TD>I</TD><TD>1</TD><TD>Area id</TD></TR>
  326. <TR><TD>N,S,E,W</TD><TD>D</TD><TD>4</TD><TD>Area bounding box</TD></TR>
  327. <TR><TD>T,B</TD><TD>D</TD><TD>2</TD><TD>Area bounding box for 3D (only if with_z=1)</TD></TR>
  328. </TABLE>
  329. <b>Feature types:</b>
  330. \verbatim
  331. /* Vector types used in memory on run time - may change */
  332. #define GV_POINT 0x01
  333. #define GV_LINE 0x02
  334. #define GV_BOUNDARY 0x04
  335. #define GV_CENTROID 0x08
  336. #define GV_FACE 0x10
  337. #define GV_KERNEL 0x20
  338. #define GV_AREA 0x40
  339. #define GV_VOLUME 0x80
  340. \endverbatim
  341. \verbatim
  342. #define GV_POINTS (GV_POINT | GV_CENTROID )
  343. #define GV_LINES (GV_LINE | GV_BOUNDARY )
  344. \endverbatim
  345. Face and kernel are 3D equivalents of boundary and centroid, but there
  346. is no support (yet) for 3D topology (volumes). Faces are used in a
  347. couple of modules including NVIZ to visualize 3D buildings and other
  348. volumetric figures.
  349. \verbatim
  350. /* Topology level details */
  351. #define GV_BUILD_NONE 0
  352. #define GV_BUILD_BASE 1
  353. #define GV_BUILD_AREAS 2
  354. #define GV_BUILD_ATTACH_ISLES 3 /* Attach islands to areas */
  355. #define GV_BUILD_CENTROIDS 4 /* Assign centroids to areas */
  356. #define GV_BUILD_ALL GV_BUILD_CENTROIDS
  357. \endverbatim
  358. GV_BOUNDARY contains geometry and it is used to build areas.
  359. GV_LINE cannot form an area.
  360. \verbatim
  361. struct line_cats
  362. {
  363. int *field; /* pointer to array of fields a.k.a. layer*/
  364. int *cat; /* pointer to array of categories */
  365. int n_cats; /* number of vector categories attached to element */
  366. int alloc_cats; /* allocated space */
  367. };
  368. \endverbatim
  369. \subsection Topology_Example_1 Topology Example 1:
  370. A polygon may be formed by many boundaries (more primitives but connected).
  371. One boundary is shared by adjacent areas.
  372. \verbatim
  373. +--1--+--5--+
  374. | | |
  375. 2 A 4 B 6
  376. | | |
  377. +--3--+--7--+
  378. 1,2,3,4,5,6,7 = 7 boundaries (primitives)
  379. A,B = 2 areas
  380. \endverbatim
  381. \subsection Topology_Example_2 Topology Example 2:
  382. This is handled correctly in GRASS: A can be filled, B filled differently.
  383. \verbatim
  384. +---------+
  385. | A |
  386. +-----+ |
  387. | B | |
  388. +-----+ |
  389. | |
  390. +---------+
  391. \endverbatim
  392. In GRASS, whenever an 'inner' ring touches the boundary of an outside area, even in
  393. one point, it is no longer an 'inner' ring, it is simply another area.
  394. A, B above can never be exported from GRASS as polygon A with inner ring B
  395. because there are only 2 areas A and B and no island.
  396. \subsection Topology_Example_3 Topology Example 3:
  397. v.in.ogr/v.clean can identify dangles and change the type from boundary
  398. to line (in TIGER data for example).
  399. Distinction between line and boundary isn't important only for dangles. Example:
  400. \verbatim
  401. +-----+-----+
  402. | . |
  403. | . |
  404. +.....+.....+
  405. | . |
  406. | x . |
  407. +-----+-----+
  408. ---- road + boundary of one parcel => type boundary
  409. .... road => type line
  410. x parcel centroid (identifies whole area)
  411. \endverbatim
  412. Because lines are not used to build areas, we have only one area/centroid,
  413. instead of 4 which would be necessary in TIGER.
  414. \subsection vlib_topo_memory Topology memory management
  415. Topology is generated for all kinds of vector types. Memory is not
  416. released by default. The programmer can force the library to release
  417. the memory by using Vect_set_release_support(). But: The programmer
  418. cannot run Vect_set_release_support() in mid process because all
  419. vectors are needed in the spatial index, which is needed to build topology.
  420. Topology is also necessary for points in case of a vector network
  421. because the graph is built using topology information about lines
  422. and points.
  423. The topology structure does not only store the topology but also
  424. the 'line' bounding box and line offset in coor file (index).
  425. The existing spatial index is using line ID in 'topology' structure
  426. to identify lines in 'coor' file. Currently it is not possible to build
  427. spatial index without topology.
  428. \section vlib_spidx Vector library spatial index management
  429. Spatial index (based on R-tree) is generated on the fly.
  430. Spatial index occupies a lot of memory but it is necessary for
  431. topology building. Also, it takes a long time to release the memory
  432. occupied by spatial index (dig_spidx_free()).
  433. The function building topology (Vect_build()) is usually called
  434. at the end of modules (before Vect_close()) so it is faster to call
  435. exit() and operating system releases all the memory much faster.
  436. By default the memory is not released.
  437. It is possible to call Vect_set_release_support() before Vect_close()
  438. to enforce memory release, but it takes a long time on large files.
  439. Currently most of the modules do not release the memory occupied for
  440. spatial index and work like this (pseudocode):
  441. \verbatim
  442. int
  443. main
  444. {
  445. Vect_open_new()
  446. //writing new vector
  447. Vect_build()
  448. Vect_close() // memory is not released
  449. }
  450. \endverbatim
  451. In general it is possible to free the memory with Vect_set_release_support()
  452. such as:
  453. \verbatim
  454. int
  455. main
  456. {
  457. Vect_open_new()
  458. // writing new vector
  459. Vect_build()
  460. Vect_set_release_support()
  461. Vect_close() // memory is released
  462. }
  463. \endverbatim
  464. but it takes longer.
  465. <P>
  466. It make sense to release the spatial index if it is used only at the beginning
  467. of a module or in permanently running programs like QGIS.
  468. For example:
  469. \verbatim
  470. int
  471. main
  472. {
  473. Vect_open_old()
  474. // select features using spatial index, e.g. Vect_select_lines_by_box()
  475. Vect_set_release_support()
  476. Vect_close() // memory is released
  477. // do some processing which needs memory
  478. }
  479. \endverbatim
  480. \section vlib_categories_layers Vector library categories and layers
  481. <P>
  482. <i>Note: "layer" was called "field" in earlier version.</i>
  483. <P>
  484. In GRASS, a "category" or "category number" is a vector feature ID
  485. used to link geometry to attributes which are stored in one or several
  486. (external) database table(s). This category number is stored into the
  487. vector geometry as well as a "cat" column (integer type) in each
  488. attribute database table. The category number is used to lookup an
  489. attribute assigned to a vector object. At user level, category numbers
  490. can be assigned to vector objects with the v.category command.
  491. In order to assign multiple attributes in different tables to vector
  492. objects, each map can hold multiple category numbers. This is achieved
  493. by assigning more than one "layer" to the map (v.db.connect
  494. command). The layer number determines which table to be used for
  495. attribute queries. For example, a cadastrial vector area map can be
  496. assigned on layer 1 to an attribute table containing landuse
  497. descriptions which are maintained by department A while layer 2 is
  498. assigned to an attribute table containing owner descriptions which are
  499. maintained by department B.
  500. Each vector feature inside a vector map has zero, one or more
  501. &lt;layer,category&gt; tuple(s). A user can (but not must) create
  502. attribute tables which are referenced by the layer, and rows which are
  503. essentially referenced by the &lt;layer,category&gt; pair. <P>
  504. Categories start with 1. Categories do not have to be continuous.
  505. \section vlib_cidx Vector library category index
  506. The category index (stored in the cidx file) improves the performance of all
  507. selections by cats/attributes (SQL, e.g. 'd.vect cats=27591', 'v.extract list=20000-21000').
  508. This avoids that all selections have to be made by looping through all vector lines.
  509. Cidx is also essential for simple feature representation of GRASS vectors.
  510. Cidx is created for each field. In memory, it is stored in
  511. \verbatim
  512. struct Cat_index {
  513. int field; /* field number a.k.a. layer*/
  514. int n_cats; /* number of items in cat array */
  515. int a_cats; /* allocated space in cat array */
  516. int (*cat)[3]; /* array of cats (cat,type, lines/area) */
  517. int n_ucats; /* number of unique cats (not updated) */
  518. int n_types; /* number of types in type */
  519. int type[7][2];/* number of elements for each type (point, line, boundary, centroid, area, face, kernel) */
  520. long offset; /* offset of the beginning of this index in cidx file */
  521. };
  522. \endverbatim
  523. Cidx is built with topology, but it is not updated if vector is edited on level 2.
  524. Cidx is stored in 'cidx' file, 'cat' array is written/read by one call of
  525. dig__fwrite_port_I( (int *)ci->cat, 3 * ci->n_cats, fp) or
  526. dig__fread_port_I( (int *)ci->cat, 3 * ci->n_cats, fp).
  527. Stored values can be retrieved either by index in 'cat' array
  528. (if all features of given field are required) or by category value
  529. (one or few features), always by Vect_cidx_*() functions.
  530. To create cidx, it will be necessary to rebuild topology for all existing vectors.
  531. This is an opportunity to make (hopefully) last changes in 'topo', 'cidx' formats.
  532. \section vlibtin Vector TINs
  533. TINs are simply created as 2D/3D vector polygons consisting of
  534. 3 vertices.
  535. \section vlib_attributes Vector library and attributes
  536. The old GRASS 4.x 'dig_cats' files are not used any more and vectors'
  537. attributes are stored in external database. Connection with the
  538. database is done through drivers based on DBMI library (DBF, SQLite,
  539. PostgreSQL, MySQL and ODBC drivers are available at this
  540. time). Records in a table are linked to vector entities by layer and
  541. category number. The layer identifies table and the category
  542. identifies record. I.e., for any unique combination
  543. map+mapset+layer+category, there exists one unique combination
  544. driver+database+table+row.
  545. The general DBMI settings are defined in the "MAPSET/VAR" text file
  546. (maintained with db.connect command at user level).
  547. Each vector maps has its own DBMI settings stored in the
  548. "MAPSET/vector/vector_name/dbln" text file. For each pair <B>map +
  549. layer</B>, all of <B>table, key column, database, driver</B> must be
  550. defined in a new row. This definition must be written to
  551. "MAPSET/vector/vector_name/dbln" text file. Each row in the "dbln"
  552. file contains names separated by spaces in following order ([] -
  553. optional): <BR><BR>
  554. \verbatim
  555. map[@mapset] layer table [key [database [driver]]]
  556. \endverbatim
  557. If key, database or driver are omitted (on second and higher row only)
  558. the last definition is used. When reading a vector map from another
  559. mapset (if mapset is specified along with map name), definitions in
  560. the related "dbln" file may overwrite the DBMI definition in the
  561. current mapset. This means that the map-wise definition is always
  562. "stronger".
  563. <P>
  564. Wild cards <B>*</B> and <B>?</B> may be used in map and mapset names.
  565. <P>
  566. Variables <B>$GISDBASE, $LOCATION_NAME, $MAPSET, $MAP</B> may be used
  567. in table, key, database and driver names (function
  568. Vect_subst_var()). Note that $MAPSET is not the current mapset but
  569. mapset of the map the rule is defined for.
  570. <P>
  571. Note that vector features in GRASS vector maps may have attributes
  572. in different tables or may be without attributes. Boundaries
  573. form areas but it may happen that some boundaries are not closed
  574. (such boundaries would not appear in polygon layer).
  575. Boundaries may have attributes. All types may be mixed in one vector map.
  576. <P>
  577. The link to the table is permanent and it is stored in 'dbln' file
  578. in vector directory. Tables are considered to be a part of the vector
  579. and the command g.remove, for example, deletes linked tables of the vector.
  580. Attributes must be joined with geometry.
  581. <P>
  582. <B>Examples:</B>
  583. Examples are written mostly for the dbf driver, where database is full path to
  584. the directory with dbf files and table name is the name of dbf file without
  585. .dbf extension:
  586. <P>
  587. \verbatim
  588. * 1 mytable id $GISDBASE/$LOCATION_NAME/$MAPSET/vector/$MAP dbf
  589. \endverbatim
  590. This definition says that entities with category of layer 1 are linked
  591. to dbf tables with names "mytable.dbf" saved in vector directories of
  592. each map. The attribute column containing the category numbers is
  593. called "id".
  594. \verbatim
  595. * 1 $MAP id $GISDBASE/$LOCATION_NAME/$MAPSET/dbf dbf
  596. \endverbatim
  597. Similar as above but all dbf files are in one directory dbf/ in mapset
  598. and names of dbf files are $MAP.dbf
  599. \verbatim
  600. water* 1 rivers id /home/grass/dbf dbf
  601. water* 2 lakes lakeid /home/guser/mydb
  602. trans* 1 roads key basedb odbc
  603. trans* 5 rails
  604. \endverbatim
  605. These definitions define more layers (called "field" in the API) for one map
  606. i.e. in one map may be more features linked to more tables. Definitions on
  607. first 2 rows are applied for example on maps water1, water2, ... so that more
  608. maps may share one table.<BR><BR>
  609. \verbatim
  610. water@PERMANENT 1 myrivers id /home/guser/mydbf dbf
  611. \endverbatim
  612. This definion overwrites the definition saved in PERMANENT/VAR and
  613. links the water map from PERMANENT mapset to the user's table.
  614. <P>
  615. Modules should be written so that connections to databases for each
  616. vector layer are independent. It should be possible to read attributes
  617. of an input map from one database and write to some other and even with
  618. some other driver (should not be a problem).
  619. <P>
  620. There are open questions, however. For one, how does one distinguish when
  621. new tables should be written and when not? For example, definitions:<BR>
  622. \verbatim
  623. river 1 river id water odbc
  624. river.backup* 1 NONE
  625. \endverbatim
  626. could be used to say that tables should not be copied for backups of
  627. map river because table is stored in a reliable RDBMS.
  628. \section grassdglib DGLib (Directed Graph Library)
  629. The Directed Graph Library or DGLib (Micarelli 2002, \ref dglib ,
  630. http://grass.osgeo.org/dglib/) provides functionality for vector network
  631. analysis. This library released under GPL is hosted by the GRASS
  632. project (within the GRASS source code). As a stand-alone library it
  633. may also be used by other software projects.
  634. The Directed Graph Library library provides functionality to assign costs to
  635. lines and/or nodes. That means that costs can be accumulated while traveling
  636. along polylines. The user can assign individual costs to all lines and/or
  637. nodes of a vector map and later calculate shortest path connections based on
  638. the accumulated costs. Applications are transport analysis, connectivity and
  639. more. Implemented applications cover Shortest path, Traveling salesman (round trip),
  640. Allocation of sources (creation of subnetworks), Minimum Steiner trees
  641. (star-like connections), and iso-distances (from centers).
  642. For details, please read Blazek et al. 2002 (see below).
  643. Related vector functions are:
  644. Vect_graph_add_edge(),
  645. Vect_graph_init(),
  646. Vect_graph_set_node_costs(),
  647. Vect_graph_shortest_path(),
  648. Vect_net_build_graph(),
  649. Vect_net_nearest_nodes(),
  650. Vect_net_shortest_path(), and
  651. Vect_net_shortest_path_coor().
  652. \section vlibascii Vector ASCII Format Specifications
  653. The ASCII format is (currently) explained in the
  654. manual page of v.in.ascii, which is defined in the file:
  655. vector/v.in.ascii/description.html
  656. \section vectmodules Vector modules and their parameters/flags
  657. See also grass5/documents/parameter_proposal.txt
  658. <P>
  659. <I>A module is a GRASS command invoked by the user.</I>
  660. </P>
  661. \subsection vectmodulesoper Modules operation
  662. Each module which modifies and writes data must read from input= and
  663. write to output= so that data may not be lost. For example v.spag
  664. works on map= at in grass5.0 but if program (system) crashes or threshold was
  665. specified incorrectly and vector was not backuped, data were lost.
  666. In this case map= option should be replaced by input= and output=
  667. <P>
  668. Topology is always built by default if the coor file was modified.
  669. <P>
  670. Dimensionality is generally kept. Input 2D vector is written as 2D, 3D as 3D.
  671. There are a few modules which change the dimension on purpose.
  672. \subsection vectmodulesopt Modules parameters/flags
  673. <B>-b</B> do not build topo file; by default topo file is written <BR>
  674. <B>-t</B> create new table, default<BR>
  675. <B>-u</B> don't create new table<BR>
  676. <B>-z</B> write 3D vector map (if input was 2D) <BR>
  677. <BR>
  678. <B>map=</B> input vector map for modules without output <BR>
  679. <B>input=</B> input vector map <BR>
  680. <B>output=</B> output vector map <BR>
  681. <B>type=</B> type of elements: point,line,boundary,centroid,area <BR>
  682. <B>cat=</B> category or category list (example: 1,5,9-13,35) <BR>
  683. <B>layer=</B> layer number <BR>
  684. <B>where=</B> condition of SQL statement for selection of records <BR>
  685. <B>column=</B> column name (in external table)
  686. \section vlibfunc List of vector library functions
  687. The Vect_*() functions are the programmer's API for GRASS vector
  688. programming.
  689. \section area Vector area functions
  690. - Vect_get_area_area()
  691. - Vect_get_area_boundaries()
  692. - Vect_get_area_centroid()
  693. - Vect_get_area_isle()
  694. - Vect_get_area_num_isles()
  695. - Vect_area_perimeter()
  696. - Vect_get_area_points()
  697. - Vect_get_isle_area()
  698. - Vect_get_isle_boundaries()
  699. - Vect_get_isle_points()
  700. - Vect_point_in_area()
  701. \section array Vector array functions
  702. - Vect_new_varray()
  703. - Vect_set_varray_from_cat_list()
  704. - Vect_set_varray_from_cat_string()
  705. - Vect_set_varray_from_db()
  706. \section box Vector bounding box functions
  707. - Vect_box_copy()
  708. - Vect_box_clip()
  709. - Vect_box_extend()
  710. - Vect_box_overlap()
  711. - Vect_get_area_box()
  712. - Vect_get_isle_box()
  713. - Vect_get_line_box()
  714. - Vect_get_map_box()
  715. - Vect_point_in_box()
  716. - Vect_region_box()
  717. \section break_lines Vector break lines functions
  718. - Vect_break_lines()
  719. - Vect_break_lines_list()
  720. \section break_polygons Vector break polygons functions
  721. - Vect_break_polygons()
  722. \section bridges Vector bridges functions
  723. - Vect_chtype_bridges()
  724. - Vect_remove_bridges()
  725. \section buffer Vector buffer functions
  726. - Vect_line_buffer()
  727. - Vect_line_parallel()
  728. \section build Vector build functions
  729. - Vect_build()
  730. - Vect_build_partial()
  731. - Vect_get_built()
  732. - Vect_save_spatial_index()
  733. - Vect_save_topo()
  734. - Vect_spatial_index_dump()
  735. - Vect_topo_dump()
  736. \subsection build_nat Vector build (native) functions
  737. - Vect_attach_centroids()
  738. - Vect_attach_isle()
  739. - Vect_attach_isles()
  740. - Vect_build_line_area()
  741. - Vect_build_nat()
  742. - Vect_isle_find_area()
  743. \subsection build_ogr Vector build (OGR) functions
  744. - Vect_build_ogr()
  745. \section cats Vector categories functions
  746. - Vect_array_to_cat_list()
  747. - Vect_cat_del()
  748. - Vect_cat_get()
  749. - Vect_cat_in_array()
  750. - Vect_cat_in_cat_list()
  751. - Vect_cat_set()
  752. - Vect_destroy_cat_list()
  753. - Vect_destroy_cats_struct()
  754. - Vect_field_cat_del()
  755. - Vect_get_area_cats()
  756. - Vect_get_area_cat()
  757. - Vect_get_line_cat()
  758. - Vect_new_cat_list()
  759. - Vect_new_cats_struct()
  760. - Vect_reset_cats()
  761. - Vect_str_to_cat_list()
  762. \section cindex Vector category index functions
  763. (note: vector layer is historically called "field")
  764. - Vect_cidx_dump()
  765. - Vect_cidx_find_next()
  766. - Vect_cidx_find_all()
  767. - Vect_cidx_get_cat_by_index()
  768. - Vect_cidx_get_field_index()
  769. - Vect_cidx_get_field_number()
  770. - Vect_cidx_get_num_cats_by_index()
  771. - Vect_cidx_get_num_fields()
  772. - Vect_cidx_get_num_types_by_index()
  773. - Vect_cidx_get_num_unique_cats_by_index()
  774. - Vect_cidx_get_type_count()
  775. - Vect_cidx_get_type_count_by_index()
  776. - Vect_cidx_open()
  777. - Vect_cidx_save()
  778. - Vect_set_category_index_update()
  779. \section clean_nodes Vector clean nodes functions
  780. - Vect_clean_small_angles_at_nodes()
  781. \section close Vector close functions
  782. - Vect_close()
  783. \section constraint Vector constraint functions
  784. - Vect_get_constraint_box()
  785. - Vect_remove_constraints()
  786. - Vect_set_constraint_region()
  787. - Vect_set_constraint_type()
  788. \section dangles Vector dangles functions
  789. - Vect_chtype_dangles()
  790. - Vect_remove_dangles()
  791. - Vect_select_dangles()
  792. \section dbcolumns Vector dbcolumns functions
  793. - Vect_get_column_names()
  794. - Vect_get_column_names_types()
  795. - Vect_get_column_types()
  796. \section error Vector error functions
  797. - Vect_get_fatal_error()
  798. - Vect_set_fatal_error()
  799. \section field Vector field functions
  800. (note: vector layer is historically called "field")
  801. - Vect_add_dblink()
  802. - Vect_check_dblink()
  803. - Vect_default_field_info()
  804. - Vect_get_dblink()
  805. - Vect_get_field()
  806. - Vect_map_add_dblink()
  807. - Vect_map_check_dblink()
  808. - Vect_map_del_dblink()
  809. - Vect_new_dblinks_struct()
  810. - Vect_read_dblinks()
  811. - Vect_reset_dblinks()
  812. - Vect_set_db_updated()
  813. - Vect_subst_var()
  814. - Vect_write_dblinks()
  815. \section find Vector find functions
  816. - Vect_find_area()
  817. - Vect_find_island()
  818. - Vect_find_line()
  819. - Vect_find_line_list()
  820. - Vect_find_node()
  821. \section graph Vector graph functions
  822. - Vect_graph_add_edge()
  823. - Vect_graph_build()
  824. - Vect_graph_init()
  825. - Vect_graph_set_node_costs()
  826. - Vect_graph_shortest_path()
  827. \section header Vector header functions
  828. - Vect_get_comment()
  829. - Vect_get_constraint_box()
  830. - Vect_get_date()
  831. - Vect_get_full_name()
  832. - Vect_get_map_date()
  833. - Vect_get_map_name()
  834. - Vect_get_mapset()
  835. - Vect_get_name()
  836. - Vect_get_organization()
  837. - Vect_get_person()
  838. - Vect_get_proj()
  839. - Vect_get_proj_name()
  840. - Vect_get_scale()
  841. - Vect_get_thresh()
  842. - Vect_get_zone()
  843. - Vect_is_3d()
  844. - Vect_print_header()
  845. - Vect_read_header()
  846. - Vect_set_comment()
  847. - Vect_set_date()
  848. - Vect_set_map_date()
  849. - Vect_set_map_name()
  850. - Vect_set_organization()
  851. - Vect_set_person()
  852. - Vect_set_scale()
  853. - Vect_set_thresh()
  854. - Vect_set_zone()
  855. - Vect_write_header()
  856. \section hist Vector history functions
  857. - Vect_hist_command()
  858. - Vect_hist_copy()
  859. - Vect_hist_read()
  860. - Vect_hist_rewind()
  861. - Vect_hist_write()
  862. \section init_head Vector header functions
  863. - Vect_copy_head_data()
  864. \section intersect Vector intersection functions
  865. - Vect_line_check_intersection()
  866. - Vect_line_intersection()
  867. - Vect_segment_intersection()
  868. \section legal_vname Vector valid map name functions
  869. - Vect_check_input_output_name()
  870. - Vect_legal_filename()
  871. \section level Vector level functions
  872. - Vect_level()
  873. \section level_two Vector topological (level 2) functions
  874. - Vect_get_centroid_area()
  875. - Vect_get_line_areas()
  876. - Vect_get_line_nodes()
  877. - Vect_get_node_coor()
  878. - Vect_get_node_line()
  879. - Vect_get_node_line_angle()
  880. - Vect_get_node_n_lines()
  881. - Vect_get_num_areas()
  882. - Vect_get_num_dblinks()
  883. - Vect_get_num_faces()
  884. - Vect_get_num_islands()
  885. - Vect_get_num_lines()
  886. - Vect_get_num_nodes()
  887. - Vect_get_num_primitives()
  888. - Vect_get_num_updated_lines()
  889. - Vect_get_num_updated_nodes()
  890. - Vect_get_updated_line()
  891. - Vect_get_updated_node()
  892. - Vect_set_release_support()
  893. \section line Vector feature functions
  894. - Vect_append_point()
  895. - Vect_append_points()
  896. - Vect_copy_pnts_to_xyz()
  897. - Vect_copy_xyz_to_pnts()
  898. - Vect_destroy_line_struct()
  899. - Vect_line_box()
  900. - Vect_line_delete_point()
  901. - Vect_line_distance()
  902. - Vect_line_geodesic_length()
  903. - Vect_line_insert_point()
  904. - Vect_line_length()
  905. - Vect_line_prune()
  906. - Vect_line_prune_thresh()
  907. - Vect_line_reverse()
  908. - Vect_line_segment()
  909. - Vect_new_line_struct()
  910. - Vect_point_on_line()
  911. - Vect_points_distance()
  912. - Vect_reset_line()
  913. \section list Vector list functions
  914. - Vect_destroy_list()
  915. - Vect_list_append()
  916. - Vect_list_append_list()
  917. - Vect_list_delete()
  918. - Vect_list_delete_list()
  919. - Vect_new_list()
  920. - Vect_reset_list()
  921. - Vect_val_in_list()
  922. \section map Vector map functions
  923. - Vect_copy()
  924. - Vect_copy_map_lines()
  925. - Vect_copy_table()
  926. - Vect_copy_table_by_cats()
  927. - Vect_copy_tables()
  928. - Vect_delete()
  929. - Vect_rename()
  930. \section net Vector network functions
  931. - Vect_net_build_graph()
  932. - Vect_net_get_line_cost()
  933. - Vect_net_get_node_cost()
  934. - Vect_net_nearest_nodes()
  935. - Vect_net_shortest_path()
  936. - Vect_net_shortest_path_coor()
  937. \section open Vector open functions
  938. - Vect_coor_info()
  939. - Vect_maptype_info()
  940. - Vect_open_new()
  941. - Vect__open_old()
  942. - Vect_open_old()
  943. - Vect_open_old_head()
  944. - Vect_open_spatial_index()
  945. - Vect_open_topo()
  946. - Vect_open_update()
  947. - Vect_open_update_head()
  948. - Vect_set_open_level()
  949. \section overlay Vector overlay functions
  950. - Vect_overlay()
  951. - Vect_overlay_str_to_operator()
  952. \section vpoly Vector polygon functions
  953. - Vect_find_poly_centroid()
  954. - Vect_get_point_in_area()
  955. - Vect_point_in_area_outer_ring()
  956. - Vect_point_in_island()
  957. - Vect_get_point_in_poly()
  958. - Vect_get_point_in_poly_isl()
  959. \section read Vector read functions
  960. \subsection read1_2 Level 1 and 2
  961. - Vect_read_next_line()
  962. \subsection read2 Level 2 only
  963. - Vect_area_alive()
  964. - Vect_isle_alive()
  965. - Vect_line_alive()
  966. - Vect_node_alive()
  967. - Vect_read_line()
  968. \section remove_areas Vector remove areas functions
  969. - Vect_remove_small_areas()
  970. \section remove_duplicates Vector remove duplicates functions
  971. - Vect_line_check_duplicate()
  972. - Vect_remove_duplicates()
  973. \section rewind Vector rewind functions
  974. - Vect_rewind()
  975. \section select Vector select functions
  976. - Vect_select_areas_by_box()
  977. - Vect_select_areas_by_polygon()
  978. - Vect_select_isles_by_box()
  979. - Vect_select_lines_by_box()
  980. - Vect_select_lines_by_polygon()
  981. - Vect_select_nodes_by_box()
  982. \section sindex Vector spatial index functions
  983. - Vect_build_sidx_from_topo()
  984. - Vect_build_spatial_index()
  985. - Vect_spatial_index_add_item()
  986. - Vect_spatial_index_del_item()
  987. - Vect_spatial_index_destroy()
  988. - Vect_spatial_index_init()
  989. - Vect_spatial_index_select()
  990. \section snap Vector snap functions
  991. - Vect_snap_lines()
  992. - Vect_snap_lines_list()
  993. \section tin Vector TIN functions
  994. - Vect_tin_get_z()
  995. \section type Vector type option functions
  996. - Vect_option_to_types()
  997. \section delete Vector delete functions
  998. \subsection delete2 Level 2 only
  999. - Vect_delete_line()
  1000. \section write Vector write functions
  1001. \subsection write1_2 Level 1 and 2
  1002. - Vect_write_line()
  1003. \subsection write2 Level 2 only
  1004. - Vect_rewrite_line()
  1005. \section contacts Contacts
  1006. Radim Blazek (vector architecture) <radim.blazek@gmail.com>
  1007. Roberto Micarelli (DGLib) <mi.ro@iol.it>
  1008. \section references References
  1009. Text based on: R. Blazek, M. Neteler, and R. Micarelli. The new GRASS 5.1
  1010. vector architecture. In Open source GIS - GRASS users conference 2002,
  1011. Trento, Italy, 11-13 September 2002. University of Trento, Italy, 2002.
  1012. <a href="http://www.ing.unitn.it/~grass/conferences/GRASS2002/proceedings/proceedings/pdfs/Blazek_Radim.pdf">http://www.ing.unitn.it/~grass/conferences/GRASS2002/proceedings/proceedings/pdfs/Blazek_Radim.pdf</a>
  1013. \section seealso See Also
  1014. - \ref dglib
  1015. - \ref dbmilib
  1016. - \ref Vedit_Library
  1017. Last change: $Date$
  1018. */