vectorlib.dox 41 KB

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