| 1 |
<!-- meta page description: wxGUI Vector Digitizer --> |
| 2 |
<!-- meta page index: topic_GUI|GUI --> |
| 3 |
<h2>DESCRIPTION</h2> |
| 4 |
|
| 5 |
The <b>vector digitizer</b> is a <em><a href="wxGUI.html">wxGUI</a></em> |
| 6 |
component intended for interactive editing and digitizing vector maps |
| 7 |
(see <em><a href="v.edit.html">v.edit</a></em> for non-interactive |
| 8 |
vector editing GRASS capabilities). |
| 9 |
|
| 10 |
<p> |
| 11 |
Note that only vector maps stored or generated in the <i>current</i> |
| 12 |
mapset can be opened for editing. |
| 13 |
|
| 14 |
<p> |
| 15 |
The digitizer allows editing of 2D vector features (points, lines, |
| 16 |
centroids, boundaries, and areas). |
| 17 |
|
| 18 |
<p> |
| 19 |
Vector features can be selected by mouse (bounding box or simply by |
| 20 |
mouse click, see select threshold |
| 21 |
in <i>Settings→General→Select threshold</i>), or by query |
| 22 |
(eg. by line length, see <i>Settings→Query Tool</i>). |
| 23 |
|
| 24 |
<h3>STARTING THE DIGITIZER</h3> |
| 25 |
|
| 26 |
The vector digitizer can be launched from Map Display toolbar by selecting |
| 27 |
"Digitize" from <i>Tools</i> combobox. Vector map is |
| 28 |
selectable for editing from Digitizer toolbar ("Select vector |
| 29 |
map" combobox, note that only vector maps from the current layer |
| 30 |
tree in Layer Manager are listed). |
| 31 |
|
| 32 |
The vector digitizer can alternatively be activated from the contextual |
| 33 |
menu in the Layer Manager by selecting "Start editing" on selected vector |
| 34 |
map in the layer tree, or directly from the Layer Manager |
| 35 |
toolbar <img src="icons/edit.png" alt="icon">. |
| 36 |
|
| 37 |
The vector digitizer also can also be launched from the command line as a |
| 38 |
stand-alone application <em>g.gui.vdigit</em>. |
| 39 |
|
| 40 |
<h3>CREATING A NEW VECTOR MAP</h3> |
| 41 |
|
| 42 |
A new vector map can be easily created from the digitizer toolbar by |
| 43 |
selecting "New vector map" in "Select vector map" |
| 44 |
combobox. A new vector map is created, added to the current layer tree |
| 45 |
in Layer Manager and opened for editing. "Select vector map" |
| 46 |
combobox in the digitizer toolbar also allows easily switching between |
| 47 |
vector maps to be edited. |
| 48 |
|
| 49 |
<h3>EDITING AN EXISTING VECTOR MAP</h3> |
| 50 |
|
| 51 |
An existing vector map selected in the digitizer toolbar in the |
| 52 |
"Select vector map" combobox. This map is then opened for editing |
| 53 |
and added to the current layer tree in the <em>Layer Manager</em>. This |
| 54 |
"Select vector map" combobox in the digitizer toolbar also allows |
| 55 |
to easily switch between vector maps to be edited. |
| 56 |
|
| 57 |
<h3>USING A RASTER BACKGROUND MAP</h3> |
| 58 |
|
| 59 |
In order to digitize from a raster map, simply load the map into the |
| 60 |
<em>Map Display</em> using the <em>Layer Manager</em>. Then start digitizing, |
| 61 |
see below for details. |
| 62 |
|
| 63 |
<h3>USING A VECTOR BACKGROUND MAP</h3> |
| 64 |
|
| 65 |
The vector digitizer allows you to select a "background" vector map. |
| 66 |
Loading it within the digitizer is different from simply loading it via |
| 67 |
<em>Layer Manager</em> since direct interaction with single vector features |
| 68 |
then becomes possible.<br> |
| 69 |
Vector features may be copied from the background map by "Copy features from |
| 70 |
(background) vector map" tool from the "Additional tools" of the |
| 71 |
digitizer toolbar. |
| 72 |
Newly digitized vector features are snapped in the given threshold to the features |
| 73 |
from the background map. |
| 74 |
|
| 75 |
<h3>DIGITIZER TOOLBAR</h3> |
| 76 |
|
| 77 |
<center> |
| 78 |
<br> |
| 79 |
<img src="vdigit_toolbar.jpg" border="1" alt="Vector Digitizer Toolbar"> |
| 80 |
<br><br> |
| 81 |
</center> |
| 82 |
|
| 83 |
<dl> |
| 84 |
<dt><img src="icons/point-create.png" alt="icon"> |
| 85 |
<em>Digitize new point</em></dt> |
| 86 |
<dd>Add new point to vector map and optionally define its |
| 87 |
attributes (Ctrl+P).</dd> |
| 88 |
|
| 89 |
<dt><img src="icons/line-create.png" alt="icon"> |
| 90 |
<em>Digitize new line</em></dt> |
| 91 |
<dd>Add new line to vector map and optionally define its |
| 92 |
attributes (Ctrl+L).</dd> |
| 93 |
|
| 94 |
<dt><img src="icons/boundary-create.png" alt="icon"> |
| 95 |
<em>Digitize new boundary</em></dt> |
| 96 |
<dd>Add new boundary to vector map and optionally define its |
| 97 |
attributes (Ctrl+B).</dd> |
| 98 |
|
| 99 |
<dt><img src="icons/centroid-create.png" alt="icon"> |
| 100 |
<em>Digitize new centroid</em></dt> |
| 101 |
<dd>Add new centroid to vector map and optionally define its |
| 102 |
attributes (Ctrl+C).</dd> |
| 103 |
|
| 104 |
<dt><img src="icons/polygon-create.png" alt="icon"> |
| 105 |
<em>Digitize new area</em></dt> |
| 106 |
<dd>Add new area (closed boundary and one centroid inside) to vector |
| 107 |
map and optionally define its attributes (Ctrl+A).</dd> |
| 108 |
|
| 109 |
<dt><img src="icons/vertex-move.png" alt="icon"> |
| 110 |
<em>Move vertex</em></dt> |
| 111 |
<dd>Move selected vertex of linear feature. Thus shape of linear |
| 112 |
feature is changed (Ctrl+G).</dd> |
| 113 |
|
| 114 |
<dt><img src="icons/vertex-create.png" alt="icon"> |
| 115 |
<em>Add vertex</em></dt> |
| 116 |
<dd>Add new vertex to selected linear feature (shape not |
| 117 |
changed) (Ctrl+V).</dd> |
| 118 |
|
| 119 |
<dt><img src="icons/vertex-delete.png" alt="icon"> |
| 120 |
<em>Remove vertex</em></dt> |
| 121 |
<dd>Remove selected vertex from linear feature (Ctrl+X). Thus shape of selected |
| 122 |
feature can be changed.</dd> |
| 123 |
|
| 124 |
<dt><img src="icons/line-edit.png" alt="icon"> |
| 125 |
<em>Edit line/boundary</em></dt> |
| 126 |
<dd>Edit selected linear feature, add new segments or remove |
| 127 |
existing segments of linear feature (Ctrl+E).</dd> |
| 128 |
|
| 129 |
<dt><img src="icons/line-move.png" alt="icon"> |
| 130 |
<em>Move feature(s)</em></dt> |
| 131 |
<dd>Move selected vector features (Ctrl+M.) Selection can be done by mouse or |
| 132 |
by query.</dd> |
| 133 |
|
| 134 |
<dt><img src="icons/line-delete.png" alt="icon"> |
| 135 |
<em>Delete feature(s)</em></dt> |
| 136 |
<dd>Delete selected vector features (point, line, centroid, or |
| 137 |
boundary) (Ctrl+D). Selection can be done by mouse or by query.</dd> |
| 138 |
|
| 139 |
<dt><img src="icons/polygon-delete.png" alt="icon"> |
| 140 |
<em>Delete areas(s)</em></dt> |
| 141 |
<dd>Delete selected vector areas (Ctrl+F). Selection can be done by mouse |
| 142 |
or by query.</dd> |
| 143 |
|
| 144 |
<dt><img src="icons/cats-display.png" alt="icon"> |
| 145 |
<em>Display/update categories</em></dt> |
| 146 |
<dd>Display categories of selected vector feature (Ctrl+J). Category settings |
| 147 |
can be modified, new layer/category pairs added or already defined pairs |
| 148 |
removed.</dd> |
| 149 |
|
| 150 |
<dt><img src="icons/attributes-display.png" alt="icon"> |
| 151 |
<em>Display/update attributes</em></dt> |
| 152 |
<dd>Display attributes of selected vector feature (based on its |
| 153 |
category settings) (Ctrl+K). Attributes can be also modified. Same |
| 154 |
functionality is accessible from Main toolbar "Query vector map |
| 155 |
(editable mode)".</dd> |
| 156 |
|
| 157 |
<dt><img src="icons/tools.png" alt="icon"> |
| 158 |
<em>Additional tools</em></dt> |
| 159 |
<dd> |
| 160 |
<ul> |
| 161 |
<li><em>Break selected lines/boundaries at intersection</em><br> Split |
| 162 |
given vector line or boundary into two lines on given position |
| 163 |
(based on <em><a href="v.clean.html">v.clean</a></em>, |
| 164 |
<code>tool=break</code>).</li> |
| 165 |
|
| 166 |
<li><em>Connect two selected lines/boundaries</em><br> Connect selected |
| 167 |
lines or boundaries, the first given line is connected to the |
| 168 |
second one. The second line is broken if necessary on each intersection. |
| 169 |
The lines are connected only if distance between them is not greater |
| 170 |
than snapping threshold value.</li> |
| 171 |
|
| 172 |
<li><em>Copy categories</em><br>Copy category settings of |
| 173 |
selected vector feature to other vector |
| 174 |
features. Layer/category pairs of source vector features are |
| 175 |
appended to the target feature category settings. Existing |
| 176 |
layer/category pairs are not removed from category settings of |
| 177 |
the target features.</li> |
| 178 |
|
| 179 |
<li><em>Copy features from (background) vector map</em><br> Make identical copy of |
| 180 |
selected vector features. If a background vector map has been |
| 181 |
selected from the Layer Manager, copy features from background |
| 182 |
vector map, not from the currently modified vector map.</li> |
| 183 |
|
| 184 |
<li><em>Copy attributes</em><br>Duplicate attributes settings of |
| 185 |
selected vector feature to other vector features. New |
| 186 |
category(ies) is appended to the target feature category |
| 187 |
settings and attributes duplicated based on category settings |
| 188 |
of source vector features. Existing layer/category pairs are |
| 189 |
not removed from category settings of the target |
| 190 |
features.</li> |
| 191 |
|
| 192 |
<li><em>Feature type conversion</em><br> Change feature type of selected |
| 193 |
geometry features. Points are converted to centroids, |
| 194 |
centroids to points, lines to boundaries and boundaries to |
| 195 |
lines.</li> |
| 196 |
|
| 197 |
<li><em>Flip selected lines/boundaries</em><br> Flip direction of |
| 198 |
selected linear features (lines or boundaries).</li> |
| 199 |
|
| 200 |
<li><em>Merge selected lines/boundaries</em><br> Merge (at least two) |
| 201 |
selected vector lines or boundaries. The geometry of the |
| 202 |
merged vector lines can be changed. If the second line from |
| 203 |
two selected lines is in opposite direction to the first, it |
| 204 |
will be flipped. See also |
| 205 |
module <em><a href="v.build.polylines.html">v.build.polylines</a></em>.</li> |
| 206 |
|
| 207 |
<li><em>Snap selected lines/boundaries (only to nodes)</em><br> Snap |
| 208 |
vector features in given threshold. See also |
| 209 |
module <em><a href="v.clean.html">v.clean</a></em>. Note that |
| 210 |
this tool supports only snapping to nodes. Snapping to vector |
| 211 |
features from background vector map is not currently |
| 212 |
supported.</li> |
| 213 |
|
| 214 |
<li><em>Split line/boundary</em><br>Split selected line or boundary on |
| 215 |
given position.</li> |
| 216 |
|
| 217 |
<li><em>Query tool</em><br>Select vector features by defining a threshold for |
| 218 |
min/max length value (linear features or dangles).</li> |
| 219 |
|
| 220 |
<li><em>Z-bulk labeling of 3D lines</em><br> Assign z coordinate values to 3D |
| 221 |
vector lines in bounding box. This is useful for labeling contour lines.</li> |
| 222 |
</ul> |
| 223 |
</dd> |
| 224 |
|
| 225 |
<dt><img src="icons/undo.png" alt="icon"> |
| 226 |
<em>Undo</em></dt> |
| 227 |
<dd>Undo previous operations (Ctrl+Z).</dd> |
| 228 |
|
| 229 |
<dt><img src="icons/redo.png" alt="icon"> |
| 230 |
<em>Redo</em></dt> |
| 231 |
<dd>Redo previous operations (Ctrl+Y).</dd> |
| 232 |
|
| 233 |
<dt><img src="icons/settings.png" alt="icon"> |
| 234 |
<em>Settings</em></dt> |
| 235 |
<dd>Digitizer settings (Ctrl+T).</dd> |
| 236 |
|
| 237 |
<dt><img src="icons/help.png" alt="icon"> |
| 238 |
<em>Show help</em></dt> |
| 239 |
<dd>Show help page for the Digitizer (Ctrl+H).</dd> |
| 240 |
|
| 241 |
<dt><img src="icons/quit.png" alt="icon"> |
| 242 |
<em>Quit digitizing tool</em></dt> |
| 243 |
<dd>Changes in vector map can be optionally discarded when |
| 244 |
digitizing session is quited (Ctrl+Q).</dd> |
| 245 |
|
| 246 |
</dl> |
| 247 |
|
| 248 |
<h2>NOTES</h2> |
| 249 |
|
| 250 |
<dl><dt><b>Mouse button functions:</b><dd> |
| 251 |
<dt><i>Left</i> - select or deselect features</dt> |
| 252 |
<dt><i>Control+Left</i> - cancel action or undo vertex when digitizing lines</dt> |
| 253 |
<dt><i>Right</i> - confirm action</dt> |
| 254 |
</dl> |
| 255 |
|
| 256 |
<p> |
| 257 |
<i>Dead (deleted)</i> features are only marked as 'dead' in the geometry file |
| 258 |
but remain there and occupy space. Any vector module |
| 259 |
used afterwards on this vector map which really reads and writes |
| 260 |
vector geometry (so not <em><a href="g.copy.html">g.copy</a></em>) |
| 261 |
will write only features which are 'alive'. |
| 262 |
|
| 263 |
<p> |
| 264 |
<i>Added or modified</i> vector features are <i>snapped</i> to |
| 265 |
existing vector features (Settings→General→Snapping). To |
| 266 |
disable snapping set the snapping threshold to '0'. |
| 267 |
|
| 268 |
<p> |
| 269 |
If the digitizer crashes for some reason, the changes are |
| 270 |
automatically saved. Broken topology can be repaired by running |
| 271 |
<em><a href="v.build.html">v.build</a></em>. |
| 272 |
|
| 273 |
<p> |
| 274 |
GRASS uses a topological vector format, meaning that a common boundary of |
| 275 |
two polygons is only stored once. When digitizing polygons it is thus important |
| 276 |
to be able to only draw each boundary once. When drawing a polygon adjacent to an |
| 277 |
existing polygon, one has to first split the existing boundary at the points where |
| 278 |
the new boundary will be attached. Snapping should be set to ensure that the new |
| 279 |
boundaries are automatically attached to the chosen points. |
| 280 |
|
| 281 |
<h2>REFERENCES</h2> |
| 282 |
|
| 283 |
<ul> |
| 284 |
<li><a href="https://grass.osgeo.org/programming8/veditlib.html">GRASS Vedit Library</a></li> |
| 285 |
<li><a href="https://grasswiki.osgeo.org/wiki/Vector_Database_Management">Vector Database Management</a> (Wiki page)</li> |
| 286 |
</ul> |
| 287 |
|
| 288 |
<h2>SEE ALSO</h2> |
| 289 |
|
| 290 |
<em> |
| 291 |
<a href="wxGUI.html">wxGUI</a>, |
| 292 |
<a href="wxGUI.components.html">wxGUI components</a> |
| 293 |
</em> |
| 294 |
|
| 295 |
<p> |
| 296 |
<em> |
| 297 |
<a href="v.edit.html">v.edit</a>, |
| 298 |
<a href="v.category.html">v.category</a>, |
| 299 |
<a href="v.build.html">v.build</a>, |
| 300 |
<a href="g.gui.rdigit.html">g.gui.rdigit</a>, |
| 301 |
<a href="wxGUI.rdigit.html">wxGUI.rdigit</a> |
| 302 |
</em> |
| 303 |
|
| 304 |
<p> |
| 305 |
See also the <a href="https://grasswiki.osgeo.org/wiki/WxGUI_Vector_Digitizer">WxGUI Vector Digitizer Wiki page</a> |
| 306 |
including <a href="https://grasswiki.osgeo.org/wiki/WxGUI_Vector_Digitizer#Vector_tutorials">video |
| 307 |
tutorials</a>. |
| 308 |
|
| 309 |
<h2>AUTHOR</h2> |
| 310 |
|
| 311 |
Martin Landa, FBK-irst (2007-2008), Trento, Italy, and Czech Technical |
| 312 |
University in Prague, Czech Republic |