[GRASS-SVN] r49868 - grass/branches/releasebranch_6_4/lib/vector

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Dec 22 17:26:23 EST 2011


Author: neteler
Date: 2011-12-22 14:26:23 -0800 (Thu, 22 Dec 2011)
New Revision: 49868

Modified:
   grass/branches/releasebranch_6_4/lib/vector/vectorlib.dox
Log:
sync with GRASS 6.5 doc

Modified: grass/branches/releasebranch_6_4/lib/vector/vectorlib.dox
===================================================================
--- grass/branches/releasebranch_6_4/lib/vector/vectorlib.dox	2011-12-22 22:24:20 UTC (rev 49867)
+++ grass/branches/releasebranch_6_4/lib/vector/vectorlib.dox	2011-12-22 22:26:23 UTC (rev 49868)
@@ -118,8 +118,8 @@
       System (RDBMS) connected through DBMI library and drivers (\ref vlib_attributes);
 </ul>
 
-GRASS vector maps are stored in an arc-node representation, consisting
-of curves called arcs. An arc is stored as a series of x,y,z
+GRASS vector maps are stored in an arc-node representation,
+consisting of curves called arcs. An arc is stored as a series of x,y,z
 coordinate pairs. The two endpoints of an arc are called nodes. Two
 consecutive x,y,z pairs define an arc segment. The user specifies the
 type of input to GRASS; GRASS doesn't decide. GRASS allows for the
@@ -312,17 +312,256 @@
 \section vlib_topology_management Vector library topology management
 
 Topology general characteristics:
-<ul>
-<li> geometry and attributes are stored separately
-   (don't read both if it is not necessary (usually it is not))</li>
-<li> the format is topological (areas build from boundaries)</li>
-<li>currently only 2D topology is supported
-</ul>
 
-<p>
-Topology is written for native format while pseudo-topology is written
-for OGR sources, SHAPE-link.
+- geometry and attributes are stored separately
+   (don't read both if it is not necessary - usually it is not)
+- the format is topological (areas build from boundaries)
+- currently only 2D topology is supported
 
+Topology is written for native GRASS vector format; in case of
+linked OGR sources (see <tt>v.external</tt> module), only
+pseudo-topology (boundaries constructed from polygons) is written.
+
+The following rules apply to the vector data:
+
+- Boundaries should not cross each other (i.e., boundaries which would
+  cross must be split at their intersection to form distict boundaries).
+  On the contrary, lines can cross each other, e.g. bridges over rivers.
+- Lines and boundaries share nodes only if their endpoints are identical.
+  Lines or boundaries can be forced to share a common node by snapping
+  them together. This is particulary important since nodes
+  are not represented in the coor file, but only implicitly as
+  endpoints of lines and boundaries.
+- Common area boundaries should appear only once (i.e., should not be
+  double digitized).
+- Areas must be explicitly closed. This means that it must be possible
+  to complete each area by following one or more boundaries that are
+  connected by common nodes, and that such tracings result in closed
+  areas.
+- It is recommended that area features and linear features be placed
+  in separate layers. However if area features and linear features
+  must appear in one layer, common boundaries should be digitized only
+  once. For example, a boundary that is also a line (e.g., a road which
+  is also a field boundary), should be digitized as a boundary to 
+  complete the area(s), and a boundary which is functionally also a line
+  should be labeled as a line by a distinct category number.
+
+Vector map topology can be cleaned at user level by <tt>v.clean</tt>
+command.
+
+
+\subsection vlib_topology_examples Topology examples
+
+<b>Points</b>
+
+\verbatim
+One point (nodes: 1, lines: 1, areas: 0, isles: 0)
+
+    + N1/L1
+\endverbatim
+
+%Node N1 (see P_Node)
+
+\verbatim
+node = 1, n_lines = 1, xyz = 631286.707172, 225105.223577, 0.000000
+  line =   1, type = 1, angle = -9.000000
+\endverbatim
+
+Line L1 (see P_Line)
+
+\verbatim
+line = 1, type = 1, offset = 18 n1 = 1, n2 = 1, left/area = 0, right = 0
+N,S,E,W,T,B: 225105.223577, 225105.223577, 631286.707172, 631286.707172, 0.000000, 0.000000
+\endverbatim
+
+<b>Lines</b>
+
+\verbatim
+One line (nodes: 2, lines: 1, areas: 0, isles: 0)
+
+
+   +----L1----+
+   N1         N2
+\endverbatim
+
+%Node N1 (see P_Node)
+
+\verbatim
+node = 1, n_lines = 1, xyz = 634624.746450, 223557.302231, 0.000000
+  line =   1, type = 2, angle = -0.436257
+\endverbatim
+
+%Node N2 (see P_Node)
+
+\verbatim
+node = 2, n_lines = 1, xyz = 638677.484787, 221667.849899, 0.000000
+  line =  -1, type = 2, angle = 2.705335
+\endverbatim
+
+Line L1 (see P_Line)
+
+\verbatim
+line = 1, type = 2, offset = 18 n1 = 1, n2 = 2, left/area = 0, right = 0
+N,S,E,W,T,B: 223557.302231, 221667.849899, 638677.484787, 634624.746450, 0.000000, 0.000000
+\endverbatim
+
+<b>Areas without holes</b>
+
+\verbatim
+One line (nodes: 2, lines: 2, areas: 1, isles: 1)
+
+          +N1
+         /   \
+        /     \
+       /       \
+      /  +N2/L2 \
+     /           \
+    -------L1------
+\endverbatim
+
+%Node N1 (see P_Node)
+
+\verbatim
+node = 1, n_lines = 2, xyz = 635720.081136, 225063.387424, 0.000000
+  line =   1, type = 4, angle = -2.245537
+  line =  -1, type = 4, angle = -0.842926
+\endverbatim
+
+%Node N2 (see P_Node)
+
+\verbatim
+node = 2, n_lines = 1, xyz = 635779.454021, 223100.127232, 0.000000
+  line =   2, type = 8, angle = -9.000000
+\endverbatim
+
+Line L1 (see P_Line)
+
+\verbatim
+line = 1, type = 4, offset = 18 n1 = 1, n2 = 1, left/area = 1, right = -1
+N,S,E,W,T,B: 225063.387424, 222188.133874, 638184.584178, 633419.878296, 0.000000, 0.000000
+\endverbatim
+
+Line L2 (see P_Line)
+
+\verbatim
+line = 2, type = 8, offset = 87 n1 = 2, n2 = 2, left/area = 1, right = 0
+N,S,E,W,T,B: 223100.127232, 223100.127232, 635779.454021, 635779.454021, 0.000000, 0.000000
+\endverbatim
+
+Area A1 (see P_Area)
+
+\verbatim
+area = 1, n_lines = 1, n_isles = 0 centroid = 2
+N,S,E,W,T,B: 225063.387424, 222188.133874, 638184.584178, 633419.878296, 0.000000, 0.000000
+  line =  -1
+\endverbatim
+
+Isle I1 (see \ref P_Isle)
+
+\verbatim
+isle = 1, n_lines = 1 area = 0
+N,S,E,W,T,B: 225063.387424, 222188.133874, 638184.584178, 633419.878296, 0.000000, 0.000000
+  line =   1
+\endverbatim
+
+<b>Areas with holes</b>
+
+\verbatim
+One line (nodes: 3, lines: 3, areas: 2, isles: 2)
+
+             +N1
+            / \
+           /   \
+          /     \
+         /       \
+        /  +N2/L2 \
+       /           \
+      /   +N3       \
+     /   /\          \
+    /   /  \          \
+   /   /    \          \
+  /    ---L3--          \
+ /                       \
+------------L1-------------
+\endverbatim
+
+%Node N1 (see P_Node)
+
+\verbatim
+node = 1, n_lines = 2, xyz = 635720.081136, 225063.387424, 0.000000
+  line =   1, type = 4, angle = -2.245537
+  line =  -1, type = 4, angle = -0.842926
+\endverbatim
+
+%Node N2 (see P_Node)
+
+\verbatim
+node = 2, n_lines = 1, xyz = 635779.454021, 223100.127232, 0.000000
+  line =   2, type = 8, angle = -9.000000
+\endverbatim
+
+%Node N3 (see P_Node)
+
+\verbatim
+node = 3, n_lines = 2, xyz = 636788.032454, 223173.935091, 0.000000
+  line =   3, type = 4, angle = -2.245537
+  line =  -3, type = 4, angle = -0.866302
+\endverbatim
+
+Line L1 (see P_Line)
+
+\verbatim
+line = 1, type = 4, offset = 18 n1 = 1, n2 = 1, left/area = 1, right = -1
+N,S,E,W,T,B: 225063.387424, 222188.133874, 638184.584178, 633419.878296, 0.000000, 0.000000
+\endverbatim
+
+Line L2 (see P_Line)
+
+\verbatim
+line = 2, type = 8, offset = 87 n1 = 2, n2 = 2, left/area = 1, right = 0
+N,S,E,W,T,B: 223100.127232, 223100.127232, 635779.454021, 635779.454021, 0.000000, 0.000000
+\endverbatim
+
+Line L3 (see P_Line)
+
+\verbatim
+line = 3, type = 4, offset = 197 n1 = 3, n2 = 3, left/area = 2, right = -2
+N,S,E,W,T,B: 223173.935091, 222626.267748, 637253.549696, 636349.898580, 0.000000, 0.000000
+\endverbatim
+
+Area A1 (see P_Area)
+
+\verbatim
+area = 1, n_lines = 1, n_isles = 1 centroid = 2
+N,S,E,W,T,B: 225063.387424, 222188.133874, 638184.584178, 633419.878296, 0.000000, 0.000000
+  line =  -1
+  isle =   2
+\endverbatim
+
+Area A2 (see P_Area)
+
+\verbatim
+area = 2, n_lines = 1, n_isles = 0 centroid = 0
+N,S,E,W,T,B: 223173.935091, 222626.267748, 637253.549696, 636349.898580, 0.000000, 0.000000
+  line =  -3
+\endverbatim
+
+Isle I1 (see P_Isle)
+
+\verbatim
+isle = 1, n_lines = 1 area = 0
+N,S,E,W,T,B: 225063.387424, 222188.133874, 638184.584178, 633419.878296, 0.000000, 0.000000
+  line =   1
+\endverbatim
+
+Isle I2 (see P_Isle)
+
+\verbatim
+isle = 2, n_lines = 1 area = 1
+N,S,E,W,T,B: 223173.935091, 222626.267748, 637253.549696, 636349.898580, 0.000000, 0.000000
+  line =   3
+\endverbatim
+
 \subsection topo_file_format Topo file format
 
 <b>Head</b>
@@ -459,7 +698,6 @@
 };
 \endverbatim
 
-
 \subsection Topology_Example_1 Topology Example 1:
 
 A polygon may be formed by many boundaries (more primitives but connected).
@@ -1574,13 +1812,19 @@
  - Vect_rewrite_line()
 
 
-\section contacts Contacts
+\section vlibAuthors Authors
 
- Radim Blazek (vector architecture) <radim.blazek at gmail.com>
+- Radim Blazek (vector architecture) <radim.blazek gmail.com>
 
- Roberto Micarelli (DGLib) <mi.ro at iol.it>
+- Roberto Micarelli (DGLib) <mi.ro iol.it>
 
+Updates:
 
+- Markus Metz
+
+- Martin Landa <landa.martin gmail.com>
+
+
 \section references References
 
 Text based on: R. Blazek, M. Neteler, and R. Micarelli. The new GRASS 5.1



More information about the grass-commit mailing list