vectorlib.dox 39 KB

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