vectorlib.dox 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224
  1. /*! \page vectorlib GRASS Vector Library
  2. by GRASS Development Team (http://grass.osgeo.org)
  3. \tableofcontents
  4. \par Table of contents
  5. - \ref vlibBackground
  6. - \ref vlibIntro
  7. - \ref vlibVectorMap
  8. - \ref vlibVectorLevels
  9. - \ref vlibCategoriesLayers
  10. - \ref vlibAttributes
  11. - \ref vlibGeometry
  12. - \ref vlibFeatureTypes
  13. - \ref vlibStructures
  14. - \ref vlibFunc
  15. - \ref vlibAuthors
  16. - \ref vlibReferences
  17. - \ref vlibSeealso
  18. \par Subpages
  19. - \subpage vlibDescription
  20. - \subpage vlibFormat
  21. - \subpage vlibTopology
  22. - \subpage vlibIndices
  23. - \subpage vlibAscii
  24. - \subpage vlibOgr
  25. - \subpage vlibTin
  26. - \subpage veditlib
  27. - \subpage dglib
  28. - \subpage netalib
  29. \section vlibBackground Background
  30. Generally, the vector data model is used to describe geographic
  31. phenomena which may be represented by geometric entities like
  32. <em>points</em>, <em>lines</em>, and <em>areas</em>. The GRASS vector
  33. data model includes the description of <em>topology</em>, where
  34. besides the coordinates describing the location of the primitives
  35. (points, lines, boundaries, centroids, faces, kernels, and volumes),
  36. their spatial relations are also stored. In general, topological GIS
  37. requires a data structure where the common boundary between two
  38. adjacent areas is stored as a single line, simplifying the vector data
  39. maintenance.
  40. \section vlibIntro Introduction
  41. The GRASS 6/7 vector format is very similar to the previous GRASS 4.x
  42. (5.0/5.3) vector format.
  43. This description covers the new GRASS 6/7 vector library architecture.
  44. This new architecture overcomes the vector limitations of GRASS
  45. 4.x-5.4.x by extending the vector support with attributes stored in
  46. the external relational databases, and by new 3D capabilities. Besides
  47. internal file based storage the geometry may alternatively be stored
  48. in a PostGIS database (accessible via OGR interface). This enables
  49. users to maintain large data sets with simultaneous write
  50. access. External GIS formats such as SHAPE-files may be used directly,
  51. without requiring format conversion. All vector data accessed through
  52. the OGR interface have only pseudo-topology and only a limited subset
  53. of vector operations can be performed.
  54. The current implementation includes:
  55. - <em>multi-layer</em>: features in one vector map may represent more
  56. layers and may be linked to more external tables (see \ref
  57. vlibCategoriesLayers)
  58. - <em>2D and 3D vector geometry</em> with full topology support for 2D and
  59. partial topology support for 3D (see \ref vlibTopoManagement)
  60. - <em>multi-format</em>: external data formats supported (SHAPE-file,
  61. OGR sources etc.)
  62. - <em>portability</em>: platform independent internal format, read- and
  63. writable on 32bit, 64bit etc. computer architectures
  64. - integrated \ref dglib - support for vector network analysis
  65. - <em>spatial index</em>: based on R-tree method for fast vector
  66. geometry access (see \ref vlibSpidx)
  67. - <em>multi-attribute</em>: attributes saved in external Relational
  68. Database Management System (RDBMS) connected through DBMI
  69. library and drivers (see \ref vlibAttributes)
  70. \section vlibVectorMap Vector map definition (native format)
  71. GRASS vector maps are stored in an <em>arc-node</em> representation,
  72. consisting of curves called arcs. An arc is stored as a series of
  73. x,y,z coordinate pairs. The two endpoints of an arc are called
  74. <em>nodes</em>. Two consecutive x,y,z pairs define an arc segment. The
  75. user specifies the type of input to GRASS; GRASS doesn't decide. GRASS
  76. supports feature type definition which allows for multiple types to
  77. co-exist in the same map. A centroid is assigned to the area it is
  78. within/inside (geometrically). An area is defined by one or more
  79. boundaries that form a losed ring. The category to which an area belongs
  80. is stored with the centroid. Such centroids are stored in the same binary
  81. 'coor' file with other primitives. Each element may have none, one or
  82. more categories (cats). More cats can be distinguished by field number
  83. (field, called "layer" at user level). Single and multi-category
  84. support on modules level are implemented. The z coordinate is optional
  85. and both 2D and 3D files may be written.
  86. The following <em>vector feature types (primitives)</em> are defined
  87. by the vector library (and holds by the coor file; see also \ref
  88. vlibFeatureTypes):
  89. - point: a point (2D or 3D) - GV_POINT
  90. - line: a directed sequence of connected vertices with two endpoints
  91. called nodes (2D or 3D) - GV_LINE
  92. - boundary: the border line to describe an area (2D only) - GV_BOUNDARY
  93. - centroid: a point within a closed boundary(ies) to describe an area
  94. (2D only) - GV_CENTROID
  95. - face: a 3D boundary (not implemented yet) - GV_FACE
  96. - kernel: a 3D centroid in a volume - GV_KERNEL
  97. From vector feature types mentioned above are derived:
  98. - area: the topological composition of a closed ring of boundary(ies)
  99. and optionally a centroid (2D only, 3D coordinates supported but
  100. ignored) - GV_AREA
  101. - isle: an area within area, not touching the boundaries of the outer
  102. area (2D only, 3D coordinates supported but ignored)
  103. - volume: a 3D corpus, the topological composition of faces and
  104. kernel (not implemented yet) - GV_VOLUME
  105. - hole: a volume within volume, 3D equivalent to isle within area (not
  106. implemented yet)
  107. Note that all lines and boundaries can consist of multiple segments.
  108. Area topology also holds information about isles. <em>Isles</em> are
  109. located within an area, not touching the boundaries of the outer
  110. area. Isles consist of one or more areas and are used internally by
  111. the vector library to maintain correct topology of areas.
  112. \section vlibVectorLevels Levels of read access
  113. There are two levels of read access to the vector data:
  114. - <i>Level One</i> provides simple access to the vector feature
  115. information. There is no access to topology information at this
  116. level.
  117. - <i>Level Two</i> provides full access to all the information
  118. including topology information. This level requires more from the
  119. programmer, more memory, and longer startup time. Without this level,
  120. areas are not available.
  121. The level of access is retured by Vect_open_old().
  122. <b>Example for sequential read access without topology:</b>
  123. \code
  124. int main
  125. {
  126. int type, ltype;
  127. struct Map_info Map;
  128. struct line_pnts *Points;
  129. struct line_cat *Cats;
  130. const char *name, *mapset;
  131. /* set open level to 1: no topology */
  132. Vect_set_open_level(1);
  133. if (Vect_open_old(&Map, name, mapset) < 1)
  134. G_fatal_error(_("Failed to open vector '%s'"), name);
  135. /* rewind vector file */
  136. Vect_rewind(&Map);
  137. Points = Vect_new_line_struct();
  138. Cats = Vect_new_cats_struct();
  139. while ((ltype = Vect_read_next_line(&Map, Points, Cats) > 0) {
  140. /* check for desired type */
  141. if (!(ltype & type))
  142. continue;
  143. /* process the feature */
  144. }
  145. exit(EXIT_SUCCESS);
  146. }
  147. \endcode
  148. <b>Example for random read access with topology:</b>
  149. \code
  150. int main
  151. {
  152. int line, nlines, type, ltype;
  153. struct Map_info Map;
  154. struct line_pnts *Points;
  155. struct line_cat *Cats;
  156. const char *name, *mapset;
  157. if (Vect_open_old(&Map, name, mapset) < 2)
  158. G_fatal_error(_("Failed to open vector '%s'"), name);
  159. Points = Vect_new_line_struct();
  160. Cats = Vect_new_cats_struct();
  161. nlines = Vect_get_num_lines(&Map);
  162. for (line = 1; line <= nlines; line++) {
  163. /* check for desired type */
  164. if (!(Vect_get_line_type(&Map, line) & type))
  165. continue;
  166. Vect_read_line(&Map, points, cats, line);
  167. /* process the feature */
  168. }
  169. exit(EXIT_SUCCESS);
  170. }
  171. \endcode
  172. <b>Example for working with areas (requires topology):</b>
  173. \code
  174. int main
  175. {
  176. int area, nareas;
  177. struct Map_info Map;
  178. struct line_cat *Cats;
  179. const char *name, *mapset;
  180. if (Vect_open_old(&Map, name, mapset) < 2)
  181. G_fatal_error(_("Failed to open vector '%s'"), name);
  182. Points = Vect_new_line_struct();
  183. Cats = Vect_new_cats_struct();
  184. nareas = Vect_get_num_areas(&Map);
  185. for (area = 1; area <= nareas; area++) {
  186. /* process the area */
  187. /* example: get area categories */
  188. if (Vect_get_area_cats(&Map, area, Cats) == -1)
  189. G_message(_("No catagory available for area %d"), area);
  190. }
  191. exit(EXIT_SUCCESS);
  192. }
  193. \endcode
  194. <em>Note:</em> Higher level of access are planned, so when checking
  195. success return codes for a particular level of access (when calling
  196. Vect_open_old() for example), the programmer should use >= instead of
  197. == for compatibility with future releases.
  198. An existing vector map can be opened for reading by Vect_open_old().
  199. A new vector map can be created (or open for writing) by
  200. Vect_open_new(). Vect_open_old() attempts to open a vector map at the
  201. highest possible level of access. It will return the number of the
  202. level at which the map was opened. Vect_open_new() always opens at level 1
  203. only. If you require that a vector map be opened at a lower level
  204. (e.g. one), you can call the routine <tt>Vect_set_open_level(1)</tt>;
  205. Vect_open_old() will then either open at level one or fail. If you
  206. instead require the highest level access possible, you should not use
  207. Vect_set_open_level(), but instead check the return value of
  208. Vect_open_old() to make sure it is greater than or equal to the lowest
  209. level at which you need access. This allows for future levels to work
  210. without need for module change.
  211. \section vlibCategoriesLayers Categories and Layers
  212. <i>Note: "layer" was called "field" in earlier version.</i>
  213. In GRASS, a "category" or "category number" is a vector feature ID
  214. used to link geometry to attributes which are stored in one or several
  215. (external) database table(s). This category number is stored into the
  216. vector geometry as well as a "cat" column (integer type) in each
  217. attribute database table. The category number is used to lookup an
  218. attribute assigned to a vector object. At user level, category numbers
  219. can be assigned to vector objects with the <tt>v.category</tt> command.
  220. In order to assign multiple attributes in different tables to vector
  221. objects, each map can hold multiple category numbers. This is achieved
  222. by assigning more than one "layer" to the map (<tt>v.db.connect</tt>
  223. command). The layer number determines which table to be used for
  224. attribute queries. For example, a cadastrial vector area map can be
  225. assigned on layer 1 to an attribute table containing landuse
  226. descriptions which are maintained by department A while layer 2 is
  227. assigned to an attribute table containing owner descriptions which are
  228. maintained by department B.
  229. Each vector feature inside a vector map has zero, one or more
  230. &lt;layer,category&gt; tuple(s). A user can (but not must) create
  231. attribute tables which are referenced by the layer, and rows which are
  232. essentially referenced by the &lt;layer,category&gt; pair.
  233. %Categories start with 1 (category '0' is allowed for OGR
  234. layers). %Categories do not have to be continuous.
  235. Information about categories holds \ref line_cats data structure.
  236. \section vlibAttributes Attributes
  237. The old GRASS 4.x 'dig_cats' files are not used any more and vectors'
  238. attributes are stored in external database. Connection with the
  239. database is done through drivers based on \ref dbmilib. Records in a
  240. table are linked to vector entities by layer and category number. The
  241. layer identifies table and the category identifies record. I.e., for
  242. any unique combination
  243. \verbatim
  244. map+mapset+layer+category
  245. \endverbatim
  246. there exists one unique combination
  247. \verbatim
  248. driver+database+table+row
  249. \endverbatim
  250. The general DBMI settings are defined in the '$MAPSET/VAR' text file
  251. (maintained with <tt>db.connect</tt> command at user level).
  252. \section vlibStructures Vector library data structures
  253. All data structure used by the vector library are defined in
  254. include/vect/dig_structs.h. See the list bellow:
  255. Major:
  256. - \ref Map_info
  257. - \ref Plus_head
  258. - \ref dig_head
  259. Supporting:
  260. - \ref bound_box
  261. - \ref gvfile
  262. - \ref Port_info
  263. - \ref Coor_info
  264. - \ref spatial_index
  265. Format-related:
  266. - \ref Format_info
  267. - \ref Format_info_ogr
  268. DB-related:
  269. - \ref field_info
  270. - \ref dblinks
  271. Geometry-related:
  272. - \ref line_pnts
  273. Category-related:
  274. - \ref line_cats
  275. - \ref cat_list
  276. - \ref Cat_index
  277. Topology-related:
  278. - \ref P_node
  279. - \ref P_line
  280. - \ref P_area
  281. - \ref P_isle
  282. Misc:
  283. - \ref ilist
  284. - \ref varray
  285. Obsolete:
  286. - \ref site_att
  287. - \ref recycle
  288. \section vlibGeometry Vector library feature geometry
  289. \subsection vlibFeatureTypes Feature types
  290. Feature types are defined in include/vect_dig_defines.h, see the list bellow:
  291. - GV_POINT
  292. - GV_LINE
  293. - GV_BOUNDARY
  294. - GV_CENTROID
  295. - GV_FACE
  296. - GV_KERNEL
  297. - GV_AREA
  298. - GV_VOLUME
  299. - GV_POINTS (GV_POINT | GV_CENTROID)
  300. - GV_LINES (GV_LINE | GV_BOUNDARY)
  301. Face and kernel are 3D equivalents of boundary and centroid, but there
  302. is no support (yet) for 3D topology (volumes). Faces are used in a
  303. couple of modules including NVIZ to visualize 3D buildings and other
  304. volumetric figures.
  305. \section vlibFunc List of vector library functions
  306. The vector library provides the GRASS programmer with routines to
  307. process vector data. The routines in the vector library are presented
  308. in functional groupings, rather than in alphabetical order. The order
  309. of presentation will, it is hoped, provide better understanding of how
  310. the library is to be used, as well as show the interrelationships
  311. among the various routines. Note that a good way to understand how to
  312. use these routines is to look at the source code for GRASS modules
  313. which use them.
  314. Note: All routines start with one of following prefixes Vect_, V1_,
  315. V2_ or dig_. To avoid name conficts, programmers should not create
  316. variables or routines in their own modules which use this prefix.
  317. The Vect_*() functions are the programmer's API for GRASS vector
  318. programming. The programmer should use only routines with this prefix.
  319. \section vlibArea Vector area functions
  320. - Vect_get_area_area()
  321. - Vect_get_area_boundaries()
  322. - Vect_get_area_centroid()
  323. - Vect_get_area_isle()
  324. - Vect_get_area_num_isles()
  325. - Vect_area_perimeter()
  326. - Vect_get_area_points()
  327. - Vect_get_isle_area()
  328. - Vect_get_isle_boundaries()
  329. - Vect_get_isle_points()
  330. - Vect_point_in_area()
  331. \section vlibArray Vector array functions
  332. - Vect_new_varray()
  333. - Vect_set_varray_from_cat_list()
  334. - Vect_set_varray_from_cat_string()
  335. - Vect_set_varray_from_db()
  336. \section vlibBox Vector bounding box functions
  337. - Vect_box_copy()
  338. - Vect_box_clip()
  339. - Vect_box_extend()
  340. - Vect_box_overlap()
  341. - Vect_get_area_box()
  342. - Vect_get_isle_box()
  343. - Vect_get_line_box()
  344. - Vect_get_map_box()
  345. - Vect_point_in_box()
  346. - Vect_region_box()
  347. \section vlibBreakLines Vector break lines functions
  348. - Vect_break_lines()
  349. - Vect_break_lines_list()
  350. \section vlibBreakPolygons Vector break polygons functions
  351. - Vect_break_polygons()
  352. \section vlibBridges Vector bridges functions
  353. - Vect_chtype_bridges()
  354. - Vect_remove_bridges()
  355. \section vlibBuffer Vector buffer functions
  356. - Vect_line_buffer()
  357. - Vect_line_parallel()
  358. \section vlibBuild Vector build functions
  359. - Vect_build()
  360. - Vect_build_partial()
  361. - Vect_get_built()
  362. - Vect_build_sidx_from_topo()
  363. - Vect_build_sidx()
  364. - Vect_save_sidx()
  365. - Vect_save_topo()
  366. - Vect_sidx_dump()
  367. - Vect_topo_dump()
  368. \subsection vlibBuildNat Vector build (native) functions
  369. - Vect_attach_centroids()
  370. - Vect_attach_isle()
  371. - Vect_attach_isles()
  372. - Vect_build_line_area()
  373. - Vect_build_nat()
  374. - Vect_isle_find_area()
  375. \subsection vlibBuildOgr Vector build (OGR) functions
  376. - Vect_build_ogr()
  377. \section vlibCats Vector categories functions
  378. - Vect_array_to_cat_list()
  379. - Vect_cat_del()
  380. - Vect_cat_get()
  381. - Vect_cat_in_array()
  382. - Vect_cat_in_cat_list()
  383. - Vect_cat_set()
  384. - Vect_destroy_cat_list()
  385. - Vect_destroy_cats_struct()
  386. - Vect_field_cat_del()
  387. - Vect_get_area_cats()
  388. - Vect_get_area_cat()
  389. - Vect_get_line_cat()
  390. - Vect_new_cat_list()
  391. - Vect_new_cats_struct()
  392. - Vect_reset_cats()
  393. - Vect_str_to_cat_list()
  394. \section vlibCindex Vector category index functions
  395. (note: vector layer is historically called "field")
  396. - Vect_cidx_dump()
  397. - Vect_cidx_find_next()
  398. - Vect_cidx_find_all()
  399. - Vect_cidx_get_cat_by_index()
  400. - Vect_cidx_get_field_index()
  401. - Vect_cidx_get_field_number()
  402. - Vect_cidx_get_num_cats_by_index()
  403. - Vect_cidx_get_num_fields()
  404. - Vect_cidx_get_num_types_by_index()
  405. - Vect_cidx_get_num_unique_cats_by_index()
  406. - Vect_cidx_get_type_count()
  407. - Vect_cidx_get_type_count_by_index()
  408. - Vect_cidx_open()
  409. - Vect_cidx_save()
  410. - Vect_set_category_index_update()
  411. \section vlibCleanNodes Vector clean nodes functions
  412. - Vect_clean_small_angles_at_nodes()
  413. \section vlibClose Vector close functions
  414. - Vect_close()
  415. \section vlibConstraint Vector constraint functions
  416. - Vect_get_constraint_box()
  417. - Vect_remove_constraints()
  418. - Vect_set_constraint_region()
  419. - Vect_set_constraint_type()
  420. \section vlibDangles Vector dangles functions
  421. - Vect_chtype_dangles()
  422. - Vect_remove_dangles()
  423. - Vect_select_dangles()
  424. \section vlibDbcolumns Vector dbcolumns functions
  425. - Vect_get_column_names()
  426. - Vect_get_column_names_types()
  427. - Vect_get_column_types()
  428. \section vlibError Vector error functions
  429. - Vect_get_fatal_error()
  430. - Vect_set_fatal_error()
  431. \section vlibField Vector field functions
  432. (note: vector layer is historically called "field")
  433. - Vect_add_dblink()
  434. - Vect_check_dblink()
  435. - Vect_default_field_info()
  436. - Vect_get_dblink()
  437. - Vect_get_field()
  438. - Vect_get_field_by_name()
  439. - Vect_map_add_dblink()
  440. - Vect_map_check_dblink()
  441. - Vect_map_del_dblink()
  442. - Vect_new_dblinks_struct()
  443. - Vect_read_dblinks()
  444. - Vect_reset_dblinks()
  445. - Vect_set_db_updated()
  446. - Vect_subst_var()
  447. - Vect_write_dblinks()
  448. \section vlibFind Vector find functions
  449. - Vect_find_area()
  450. - Vect_find_island()
  451. - Vect_find_line()
  452. - Vect_find_line_list()
  453. - Vect_find_node()
  454. \section vlibGraph Vector graph functions
  455. - Vect_graph_add_edge()
  456. - Vect_graph_build()
  457. - Vect_graph_init()
  458. - Vect_graph_set_node_costs()
  459. - Vect_graph_shortest_path()
  460. \section vlibHeader Vector header functions
  461. - Vect_get_comment()
  462. - Vect_get_constraint_box()
  463. - Vect_get_date()
  464. - Vect_get_full_name()
  465. - Vect_get_map_date()
  466. - Vect_get_map_name()
  467. - Vect_get_mapset()
  468. - Vect_get_name()
  469. - Vect_get_organization()
  470. - Vect_get_person()
  471. - Vect_get_proj()
  472. - Vect_get_proj_name()
  473. - Vect_get_scale()
  474. - Vect_get_thresh()
  475. - Vect_get_zone()
  476. - Vect_is_3d()
  477. - Vect_print_header()
  478. - Vect_read_header()
  479. - Vect_set_comment()
  480. - Vect_set_date()
  481. - Vect_set_map_date()
  482. - Vect_set_map_name()
  483. - Vect_set_organization()
  484. - Vect_set_person()
  485. - Vect_set_scale()
  486. - Vect_set_thresh()
  487. - Vect_set_zone()
  488. - Vect_write_header()
  489. \section vlibHist Vector history functions
  490. - Vect_hist_command()
  491. - Vect_hist_copy()
  492. - Vect_hist_read()
  493. - Vect_hist_rewind()
  494. - Vect_hist_write()
  495. \section vlibInitHead Vector header functions
  496. - Vect_copy_head_data()
  497. \section vlibIntersect Vector intersection functions
  498. - Vect_line_check_intersection()
  499. - Vect_line_intersection()
  500. - Vect_segment_intersection()
  501. \section vlibLegalVname Vector valid map name functions
  502. - Vect_check_input_output_name()
  503. - Vect_legal_filename()
  504. \section vlibLevel Vector level functions
  505. - Vect_level()
  506. \section vlibLevelTwo Vector topological (level 2) functions
  507. - Vect_get_centroid_area()
  508. - Vect_get_line_areas()
  509. - Vect_get_line_nodes()
  510. - Vect_get_node_coor()
  511. - Vect_get_node_line()
  512. - Vect_get_node_line_angle()
  513. - Vect_get_node_n_lines()
  514. - Vect_get_num_areas()
  515. - Vect_get_num_dblinks()
  516. - Vect_get_num_faces()
  517. - Vect_get_num_islands()
  518. - Vect_get_num_lines()
  519. - Vect_get_num_nodes()
  520. - Vect_get_num_primitives()
  521. - Vect_get_num_updated_lines()
  522. - Vect_get_num_updated_nodes()
  523. - Vect_get_updated_line()
  524. - Vect_get_updated_node()
  525. - Vect_set_release_support()
  526. \section vlibLine Vector feature functions
  527. - Vect_append_point()
  528. - Vect_append_points()
  529. - Vect_copy_pnts_to_xyz()
  530. - Vect_copy_xyz_to_pnts()
  531. - Vect_destroy_line_struct()
  532. - Vect_get_num_line_points()
  533. - Vect_line_box()
  534. - Vect_line_delete_point()
  535. - Vect_line_distance()
  536. - Vect_line_geodesic_length()
  537. - Vect_line_get_point()
  538. - Vect_line_insert_point()
  539. - Vect_line_length()
  540. - Vect_line_prune()
  541. - Vect_line_prune_thresh()
  542. - Vect_line_reverse()
  543. - Vect_line_segment()
  544. - Vect_new_line_struct()
  545. - Vect_point_on_line()
  546. - Vect_points_distance()
  547. - Vect_reset_line()
  548. \section vlibList Vector list functions
  549. - Vect_destroy_list()
  550. - Vect_list_append()
  551. - Vect_list_append_list()
  552. - Vect_list_delete()
  553. - Vect_list_delete_list()
  554. - Vect_new_list()
  555. - Vect_reset_list()
  556. - Vect_val_in_list()
  557. - Vect_destroy_boxlist()
  558. - Vect_boxlist_append()
  559. - Vect_boxlist_append_boxlist()
  560. - Vect_boxlist_delete()
  561. - Vect_boxlist_delete_boxlist()
  562. - Vect_new_boxlist()
  563. - Vect_reset_boxlist()
  564. - Vect_val_in_boxlist()
  565. \section vlibMap Vector map functions
  566. - Vect_copy()
  567. - Vect_copy_map_lines()
  568. - Vect_copy_table()
  569. - Vect_copy_table_by_cats()
  570. - Vect_copy_tables()
  571. - Vect_delete()
  572. - Vect_rename()
  573. \section vlibMergeLines Vector merge line functions
  574. - Vect_merge_lines()
  575. \section vlibNet Vector network functions
  576. - Vect_net_build_graph()
  577. - Vect_net_get_line_cost()
  578. - Vect_net_get_node_cost()
  579. - Vect_net_nearest_nodes()
  580. - Vect_net_shortest_path()
  581. - Vect_net_shortest_path_coor()
  582. \section vlibOpen Vector open functions
  583. - Vect_coor_info()
  584. - Vect_maptype_info()
  585. - Vect_maptype()
  586. - Vect_open_new()
  587. - Vect__open_old()
  588. - Vect_open_old()
  589. - Vect_open_old_head()
  590. - Vect_open_sidx()
  591. - Vect_open_topo()
  592. - Vect_open_update()
  593. - Vect_open_update_head()
  594. - Vect_set_open_level()
  595. \section vlibOverlay Vector overlay functions
  596. - Vect_overlay()
  597. - Vect_overlay_str_to_operator()
  598. \section vlibVpoly Vector polygon functions
  599. - Vect_find_poly_centroid()
  600. - Vect_get_point_in_area()
  601. - Vect_point_in_area_outer_ring()
  602. - Vect_point_in_island()
  603. - Vect_get_point_in_poly()
  604. - Vect_get_point_in_poly_isl()
  605. \section vlibRead Vector read functions
  606. \subsection vlibread1_2 Level 1 and 2
  607. - Vect_read_next_line()
  608. \subsection vlibRead2 Level 2 only
  609. - Vect_area_alive()
  610. - Vect_isle_alive()
  611. - Vect_line_alive()
  612. - Vect_node_alive()
  613. - Vect_read_line()
  614. \section vlibRemoveAreas Vector remove areas functions
  615. - Vect_remove_small_areas()
  616. \section vlibRemoveDuplicates Vector remove duplicates functions
  617. - Vect_line_check_duplicate()
  618. - Vect_remove_duplicates()
  619. \section vlibRewind Vector rewind functions
  620. - Vect_rewind()
  621. \section vlibSelect Vector select functions
  622. - Vect_select_areas_by_box()
  623. - Vect_select_areas_by_polygon()
  624. - Vect_select_isles_by_box()
  625. - Vect_select_lines_by_box()
  626. - Vect_select_lines_by_polygon()
  627. - Vect_select_nodes_by_box()
  628. \section vlibSindex Vector spatial index functions
  629. - Vect_spatial_index_add_item()
  630. - Vect_spatial_index_del_item()
  631. - Vect_spatial_index_destroy()
  632. - Vect_spatial_index_init()
  633. - Vect_spatial_index_select()
  634. \section vlibSnap Vector snap functions
  635. - Vect_snap_lines()
  636. - Vect_snap_lines_list()
  637. \section vlibTinFuns Vector TIN functions
  638. - Vect_tin_get_z()
  639. \section vlibType Vector type option functions
  640. - Vect_option_to_types()
  641. \section vlibDelete Vector delete functions
  642. \subsection vlibDelete2 Level 2 only
  643. - Vect_delete_line()
  644. \section vlibWrite Vector write functions
  645. \subsection vlibWrite1_2 Level 1 and 2
  646. - Vect_write_line()
  647. \subsection vlibWrite2 Level 2 only
  648. - Vect_rewrite_line()
  649. \subsection vlibAsciiFn Vector ASCII functions
  650. - Vect_read_ascii()
  651. - Vect_read_ascii_head()
  652. - Vect_write_ascii()
  653. - Vect_write_ascii_head()
  654. \subsection vlibSFAFn Vector Simple Feature Access API
  655. Functions from GRASS Simple Feature API (in progress, incomplete).
  656. - Vect_sfa_get_line_type()
  657. - Vect_sfa_check_line_type()
  658. - Vect_sfa_line_dimension()
  659. - Vect_sfa_line_geometry_type()
  660. - Vect_sfa_line_astext()
  661. - Vect_sfa_is_line_simple()
  662. - Vect_sfa_is_line_closed()
  663. \section vlibGeosFn Vector GEOS functions
  664. Note: The functions are available only if GRASS is compiled with
  665. <tt>--with-geos</tt> switch.
  666. - Vect_read_line_geos()
  667. - Vect_read_area_geos()
  668. - Vect_line_to_geos()
  669. - Vect_get_area_points_geos()
  670. - Vect_get_isle_points_geos()
  671. \section vlibPgFn Vector PostgreSQL/PostGIS functions
  672. Note: The functions are available only if GRASS is compiled with
  673. <tt>--with-postgres</tt> switch.
  674. - Vect_open_topo_pg()
  675. - Vect_build_pg()
  676. (For internal use only)
  677. - V1_open_old_pg(), V2_open_old_pg() called by Vect_open_old()
  678. - V1_open_new_pg(), V2_open_new_pg() called by Vect_open_new()
  679. - V1_rewind_pg(), V2_rewind_pg() called by Vect_rewind()
  680. - V1_close_pg(), V2_close_pg() called by Vect_close()
  681. - V1_read_line_pg(), V2_read_line_pg() called by Vect_read_line()
  682. - V1_read_next_line_pg(), V2_read_next_line_pg() called by Vect_read_next_line()
  683. - V1_delete_line_pg(), V2_delete_line_sfa() called by Vect_delete_line()
  684. - V1_write_line_pg(), V2_write_line_pg() called by Vect_write_line()
  685. - V1_rewrite_line_pg(), V2_rewrite_line_sfa() called by Vect_rewrite_line()
  686. - V2_write_area_pg(), see <tt>v.out.postgis</tt> for implementation issues
  687. \section vlibAuthors Authors
  688. - Radim Blazek (vector architecture) <radim.blazek gmail.com>
  689. - Roberto Micarelli (DGLib) <mi.ro iol.it>
  690. Updates for GRASS 7:
  691. - Markus Metz (file-based spatial index, vector topology)
  692. - Martin Landa (GEOS support, direct OGR read access, PostgreSQL/PostGIS support) <landa.martin gmail.com>
  693. \section vlibReferences References
  694. Text based on: R. Blazek, M. Neteler, and R. Micarelli. The new GRASS 5.1
  695. vector architecture. In Open source GIS - GRASS users conference 2002,
  696. Trento, Italy, 11-13 September 2002. University of Trento, Italy, 2002.
  697. <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>
  698. \section vlibSeealso See Also
  699. - \ref dglib
  700. - \ref dbmilib
  701. - \ref veditlib
  702. */