2 @package vdigit.mapwindow
4 @brief Map display canvas for wxGUI vector digitizer
7 - mapwindow::VDigitWindow
9 (C) 2011 by the GRASS Development Team
11 This program is free software under the GNU General Public License
12 (>=v2). Read the file COPYING that comes with GRASS for details.
14 @author Martin Landa <landa.martin gmail.com>
20 from core.gcmd import RunCommand, GMessage, GError
26 from vdigit.dialogs import VDigitCategoryDialog, VDigitZBulkDialog, VDigitDuplicatesDialog
29 """!A Buffered window extended for vector digitizer.
31 def __init__(self, parent, id = wx.ID_ANY,
32 Map =
None, tree =
None, lmgr =
None,
33 style = wx.NO_FULL_REPAINT_ON_RESIZE, **kwargs):
34 BufferedWindow.__init__(self, parent, id, Map, tree, lmgr,
38 self.
toolbar = self.parent.GetToolbar(
'vdigit')
41 self.Bind(wx.EVT_KEY_DOWN, self.
OnKeyDown)
45 return self.digit.GetDisplay()
49 """!Set up related toolbar
53 def _onMotion(self, coord, precision):
54 """!Track mouse motion and update statusbar (see self.Motion)
56 @parem coord easting, northing
57 @param precision formatting precision
61 if self.toolbar.GetAction() !=
'addLine' or \
62 self.toolbar.GetAction(
'type')
not in (
'line',
'boundary')
or \
68 (e, n), screen =
False)[0]
69 distance_tot = distance_seg
74 self.parent.SetStatusText(
"%.*f, %.*f (seg: %.*f; tot: %.*f)" % \
75 (precision, e, precision, n,
76 precision, distance_seg,
77 precision, distance_tot), 0)
83 shift = event.ShiftDown()
84 kc = event.GetKeyCode()
89 event = wx.CommandEvent(winid = self.toolbar.addPoint)
90 tool = self.toolbar.OnAddPoint
92 event = wx.CommandEvent(winid = self.toolbar.addLine)
93 tool = self.toolbar.OnAddLine
95 self.toolbar.OnTool(event)
100 not self.toolbar.GetLayer():
104 self.digit.GetDisplay().UpdateRegion()
109 self.pdcVector.RemoveAll()
112 item = self.tree.FindItemByData(
'maplayer', self.toolbar.GetLayer())
116 if item
and self.tree.IsItemChecked(item):
118 self.digit.GetDisplay().DrawMap()
121 if self.toolbar.GetAction() ==
'moveLine' and \
122 hasattr(self,
"moveInfo"):
126 self.pdcTmp.TranslateId(id,
132 """!Left mouse button pressed - add new feature
135 mapLayer = self.toolbar.GetLayer().GetName()
139 if self.toolbar.GetAction(
'type')
in [
'point',
'centroid']:
142 nfeat, fids = self.digit.AddFeature(self.toolbar.GetAction(
'type'), [(east, north)])
149 if UserSettings.Get(group =
'vdigit', key =
"addRecord", subkey =
'enabled'):
152 UserSettings.Get(group =
'vdigit', key =
"layer", subkey =
'value') :
153 (UserSettings.Get(group =
'vdigit', key =
"category", subkey =
'value'), )
159 addRecordDlg = DisplayAttributesDialog(parent = self, map = mapLayer,
162 action =
"add", ignoreError =
True)
164 if self.toolbar.GetAction(
'type') ==
'centroid':
167 self.
_geomAttrb(fid, addRecordDlg,
'perimeter')
169 if addRecordDlg.mapDBInfo
and \
170 addRecordDlg.ShowModal() == wx.ID_OK:
171 sqlfile = tempfile.NamedTemporaryFile(mode =
"w")
172 for sql
in addRecordDlg.GetSQLString():
173 sqlfile.file.write(sql +
";\n")
179 input = sqlfile.name)
181 if addRecordDlg.mapDBInfo:
184 elif self.toolbar.GetAction(
'type')
in [
"line",
"boundary",
"area"]:
186 self.polycoords.append(self.
Pixel2Cell(event.GetPositionTuple()[:]))
189 def _geomAttrb(self, fid, dialog, attrb):
190 """!Define geometry attributes
192 mapLayer = self.toolbar.GetLayer()
193 item = self.tree.FindItemByData(
'maplayer', mapLayer)
194 vdigit = self.tree.GetPyData(item)[0][
'vdigit']
196 'geomAttr' not in vdigit
or \
197 attrb
not in vdigit[
'geomAttr']:
201 if attrb ==
'length':
202 val = self.digit.GetLineLength(fid)
204 elif attrb ==
'area':
205 val = self.digit.GetAreaSize(fid)
207 elif attrb ==
'perimeter':
208 val = self.digit.GetAreaPerimeter(fid)
212 layer = int(UserSettings.Get(group =
'vdigit', key =
"layer", subkey =
'value'))
213 column = vdigit[
'geomAttr'][attrb][
'column']
214 val = UnitsConvertValue(val, type, vdigit[
'geomAttr'][attrb][
'units'])
215 dialog.SetColumnValue(layer, column, val)
218 def _geomAttrbUpdate(self, fids):
219 """!Update geometry atrributes of currently selected features
221 @param fid list feature id
223 mapLayer = self.parent.toolbars[
'vdigit'].GetLayer()
224 vectorName = mapLayer.GetName()
225 item = self.tree.FindItemByData(
'maplayer', mapLayer)
226 vdigit = self.tree.GetPyData(item)[0][
'vdigit']
228 if vdigit
is None or 'geomAttr' not in vdigit:
232 sqlfile = tempfile.NamedTemporaryFile(mode =
"w")
234 for layer, cats
in self.digit.GetLineCats(fid).iteritems():
235 table = dbInfo.GetTable(layer)
236 for attrb, item
in vdigit[
'geomAttr'].iteritems():
238 if attrb ==
'length':
239 val = self.digit.GetLineLength(fid)
241 elif attrb ==
'area':
242 val = self.digit.GetAreaSize(fid)
244 elif attrb ==
'perimeter':
245 val = self.digit.GetAreaPerimeter(fid)
250 val = UnitsConvertValue(val, type, item[
'units'])
253 sqlfile.write(
'UPDATE %s SET %s = %f WHERE %s = %d;\n' % \
254 (table, item[
'column'], val,
255 dbInfo.GetKeyColumn(layer), cat))
261 input = sqlfile.name)
263 def _updateATM(self):
264 """!Update open Attribute Table Manager
266 @todo: use AddDataRow() instead
269 digitVector = self.toolbar.GetLayer().GetName()
271 for atm
in self.lmgr.dialogs[
'atm']:
272 atmVector = atm.GetVectorName()
273 if atmVector == digitVector:
274 layer = UserSettings.Get(group =
'vdigit', key =
"layer", subkey =
'value')
279 """!Left mouse button pressed - edit linear feature - add new
283 self.
moveInfo[
'id'].append(wx.NewId())
287 """!Left mouse button pressed - vector digitizer move
288 feature/vertex, edit linear feature
297 if self.toolbar.GetAction()
in [
"moveVertex",
"editLine"]:
298 pcolor = UserSettings.Get(group =
'vdigit', key =
"symbol",
299 subkey = [
"highlight",
"color"])
301 width = 2, style = wx.SHORT_DASH)
302 self.pdcTmp.SetPen(self.
polypen)
305 """!Left mouse button pressed - vector digitizer display categories
309 mapLayer = self.toolbar.GetLayer().GetName()
316 self.digit.GetDisplay().SetSelected([])
320 self.digit.GetDisplay().SelectLineByPoint(coords)
322 if not self.digit.GetDisplay().GetSelected():
323 for key
in (
'attributes',
'category'):
324 if self.parent.dialogs[key]
and \
325 self.parent.dialogs[key].IsShown():
326 self.parent.dialogs[key].Hide()
327 self.
UpdateMap(render =
False, renderVector =
True)
330 if UserSettings.Get(group =
'vdigit', key =
'checkForDupl',
332 lines = self.digit.GetDisplay().GetSelected()
334 lines = (self.digit.GetDisplay().GetSelected()[0],)
337 cats[line] = self.digit.GetLineCats(line)
342 if self.toolbar.GetAction() ==
"displayAttrs":
344 if self.parent.dialogs[
'attributes']
is None:
345 self.parent.dialogs[
'attributes'] = \
346 DisplayAttributesDialog(parent = self, map = mapLayer,
351 self.parent.dialogs[
'attributes'].
UpdateDialog(cats = cats)
353 if self.parent.dialogs[
'attributes']
and \
354 self.parent.dialogs[
'attributes'].mapDBInfo:
355 if len(cats.keys()) > 0:
357 if not self.parent.dialogs[
'attributes'].IsShown():
358 self.parent.dialogs[
'attributes'].Show()
360 if self.parent.dialogs[
'attributes']
and \
361 self.parent.dialogs[
'attributes'].IsShown():
362 self.parent.dialogs[
'attributes'].Hide()
365 if self.parent.dialogs[
'category']
is None:
367 dlg = VDigitCategoryDialog(parent = self,
368 vectorName = mapLayer,
371 title = _(
"Update categories"))
372 self.parent.dialogs[
'category'] = dlg
375 self.parent.dialogs[
'category'].
UpdateDialog(cats = cats)
377 if self.parent.dialogs[
'category']:
378 if len(cats.keys()) > 0:
380 if not self.parent.dialogs[
'category'].IsShown():
381 self.parent.dialogs[
'category'].Show()
383 if self.parent.dialogs[
'category'].IsShown():
384 self.parent.dialogs[
'category'].Hide()
386 self.
UpdateMap(render =
False, renderVector =
True)
389 """!Left mouse button pressed - vector digitizer copy
390 categories or attributes action
392 if not hasattr(self,
"copyCatsList"):
396 self.
mouse[
'box'] =
'box'
399 """!Left mouse button pressed - vector digitizer copy lines
402 if not hasattr(self,
"copyIds"):
407 """!Left mouse button pressed - vector digitizer label 3D
413 self.polycoords.append(self.
Pixel2Cell(event.GetPositionTuple()[:]))
424 """!Left mouse button pressed with control key - vector
425 digitizer undo functionality
430 action = self.toolbar.GetAction()
431 if (action ==
"addLine" and \
432 self.toolbar.GetAction(
'type')
in [
"line",
"boundary",
"area"])
or \
433 action ==
"editLine":
436 removed = self.polycoords.pop()
437 Debug.msg(4,
"BufferedWindow.OnMiddleDown(): polycoords_poped=%s" % \
443 if action ==
"editLine":
448 self.
UpdateMap(render =
False, renderVector =
False)
450 elif action
in [
"deleteLine",
"moveLine",
"splitLine",
451 "addVertex",
"removeVertex",
"moveVertex",
452 "copyCats",
"flipLine",
"mergeLine",
453 "snapLine",
"connectLine",
"copyLine",
454 "queryLine",
"breakLine",
"typeConv"]:
456 self.digit.GetDisplay().SetSelected([])
457 if action
in [
"moveLine",
"moveVertex",
"editLine"]
and \
458 hasattr(self,
"moveInfo"):
461 elif action ==
"copyCats":
465 except AttributeError:
468 elif action ==
"copyLine":
472 self.
UpdateMap(render =
True, renderVector =
False)
478 elif action ==
"zbulkLine":
481 self.digit.GetDisplay().SetSelected([])
485 self.
UpdateMap(render =
False, renderVector =
False)
487 def _onLeftDown(self, event):
488 """!Left mouse button donw - vector digitizer various actions
491 mapLayer = self.toolbar.GetLayer().GetName()
493 GMessage(parent = self,
494 message = _(
"No vector map selected for editing."))
498 action = self.toolbar.GetAction()
501 GMessage(parent = self,
502 message = _(
"Nothing to do. "
503 "Choose appropriate tool from digitizer toolbar."))
507 if action
not in (
"moveVertex",
512 self.
pen = wx.Pen(colour = UserSettings.Get(group =
'vdigit', key =
'symbol',
513 subkey = [
'newSegment',
'color']),
514 width = 2, style = wx.SHORT_DASH)
515 self.
polypen = wx.Pen(colour = UserSettings.Get(group =
'vdigit', key =
'symbol',
516 subkey = [
'newLine',
'color']),
517 width = 2, style = wx.SOLID)
519 if action
in (
"addVertex",
523 self.digit.GetDisplay().SetSelected([])
525 if action ==
"addLine":
528 elif action ==
"editLine" and \
529 hasattr(self,
"moveInfo"):
532 elif action
in (
"moveLine",
"moveVertex",
"editLine")
and \
533 not hasattr(self,
"moveInfo"):
536 elif action
in (
"displayAttrs"
540 elif action
in (
"copyCats",
544 elif action ==
"copyLine":
547 elif action ==
"zbulkLine":
551 """!Left mouse button released - vector digitizer various
558 action = self.toolbar.GetAction()
560 if action
in (
"moveVertex",
562 if len(self.digit.GetDisplay().GetSelected()) == 0:
563 nselected = self.digit.GetDisplay().SelectLineByPoint(pos1)[
'point']
565 if action ==
"editLine":
567 selVertex = self.digit.GetDisplay().GetSelectedVertex(pos1)[0]
573 ids = self.digit.GetDisplay().GetSelected(grassId =
False)
578 e, n = self.
Pixel2Cell(self.pdcVector.GetIdBounds(id)[0:2])
579 self.polycoords.append((e, n))
580 self.digit.GetDisplay().DrawSelected(
False)
582 if selVertex < ids[-1] / 2:
585 self.polycoords.reverse()
588 self.digit.GetDisplay().SetSelected([])
593 elif action
in (
"copyCats",
595 if not hasattr(self,
"copyCatsIds"):
597 nselected = self.digit.GetDisplay().SelectLineByPoint(pos1)[
'point']
599 self.
copyCatsList = self.digit.GetDisplay().GetSelected()
602 self.digit.GetDisplay().SetSelected([])
604 nselected = self.digit.GetDisplay().SelectLinesByBox((pos1, pos2))
606 if self.digit.GetDisplay().SelectLineByPoint(pos1)
is not None:
610 self.
copyCatsIds = self.digit.GetDisplay().GetSelected()
612 elif action ==
"queryLine":
613 selected = self.digit.SelectLinesByQuery(bbox = (pos1, pos2))
614 nselected = len(selected)
616 self.digit.GetDisplay().SetSelected(selected)
620 if action ==
'moveLine' and \
621 len(self.digit.GetDisplay().GetSelected()) > 0:
624 if action ==
'moveLine':
629 nselected = self.digit.GetDisplay().SelectLinesByBox(bbox = (pos1, pos2),
632 if self.digit.GetDisplay().SelectLineByPoint(pos1)
is not None:
636 if action
in (
"moveLine",
"moveVertex")
and \
637 hasattr(self,
"moveInfo"):
639 if action ==
"moveLine":
641 self.
moveInfo[
'id'] = self.digit.GetDisplay().GetSelected(grassId =
False)
643 self.
moveInfo[
'id'] = self.digit.GetDisplay().GetSelectedVertex(pos1)
645 self.digit.GetDisplay().SetSelected([])
650 if UserSettings.Get(group =
'vdigit', key =
'checkForDupl', subkey =
'enabled'):
651 dupl = self.digit.GetDisplay().GetDuplicates()
658 dlg = VDigitDuplicatesDialog(parent = self, data = dupl, pos = posWindow)
660 if dlg.ShowModal() == wx.ID_OK:
661 self.digit.GetDisplay().UnSelect(dlg.GetUnSelected())
665 if action !=
"editLine":
670 if not (action
in (
"moveLine",
672 hasattr(self,
"moveInfo")
and \
675 self.
UpdateMap(render =
False, renderVector =
False)
678 """!Left mouse button released - vector digitizer split line,
679 add/remove vertex action
683 pointOnLine = self.digit.GetDisplay().SelectLineByPoint(pos1)[
'point']
687 if self.toolbar.GetAction()
in [
"splitLine",
"addVertex"]:
694 id = self.digit.GetDisplay().GetSelectedVertex(pos1)[0]
699 x, y = self.pdcVector.GetIdBounds(id)[0:2]
700 self.pdcVector.RemoveId(id)
706 self.digit.GetDisplay().SetSelected([])
710 """!Left mouse button released - vector digitizer copy feature
716 if UserSettings.Get(group =
'vdigit', key =
'bgmap',
717 subkey =
'value', internal =
True) ==
'':
719 nselected = self.bdigit.GetDisplay().SelectLinesByBox((pos1, pos2))
725 self.
UpdateMap(render =
False, renderVector =
False)
728 self.
copyIds = self.digit.SelectLinesFromBackgroundMap(bbox = (pos1, pos2))
730 color = UserSettings.Get(group =
'vdigit', key =
'symbol',
731 subkey = [
'highlight',
'color'])
732 colorStr = str(color[0]) +
":" + str(color[1]) +
":" + str(color[2])
733 dVectTmp = [
'd.vect',
734 'map=%s' % UserSettings.Get(group =
'vdigit', key =
'bgmap',
735 subkey =
'value', internal =
True),
738 'color=%s' % colorStr,
739 'fcolor=%s' % colorStr,
740 'type=point,line,boundary,centroid',
744 self.
layerTmp = self.Map.AddLayer(type =
'vector',
748 self.layerTmp.SetCmd(dVectTmp)
754 self.
UpdateMap(render =
True, renderVector =
True)
757 """!Left mouse button released - vector digitizer z-bulk line
763 nselected = self.digit.GetDisplay().SelectLinesByBox((pos1, pos2))
770 self.
UpdateMap(render =
False, renderVector =
False)
773 """!Left mouse button released - vector digitizer connect line
776 if len(self.digit.GetDisplay().GetSelected()) > 0:
779 def _onLeftUp(self, event):
780 """!Left mouse button released"""
781 if hasattr(self,
"moveInfo"):
782 if len(self.digit.GetDisplay().GetSelected()) == 0:
788 action = self.toolbar.GetAction()
789 if action
in (
"deleteLine",
804 elif action
in (
"splitLine",
809 elif action ==
"copyLine":
812 elif action ==
"zbulkLine" and \
816 elif action ==
"connectLine":
819 if len(self.digit.GetDisplay().GetSelected()) > 0:
822 def _onRightDown(self, event):
824 action = self.toolbar.GetAction()
825 if action
in (
"moveLine",
"moveVertex")
and \
826 hasattr(self,
"moveInfo"):
828 pTo = self.
Pixel2Cell(event.GetPositionTuple())
830 move = (pTo[0] - pFrom[0],
833 if action ==
"moveLine":
835 if self.digit.MoveSelectedLines(move) < 0:
837 elif action ==
"moveVertex":
839 fid = self.digit.MoveSelectedVertex(pFrom, move)
847 def _onRightUp(self, event):
848 """!Right mouse button released (confirm action)
850 action = self.toolbar.GetAction()
851 if action ==
"addLine" and \
852 self.toolbar.GetAction(
'type')
in [
"line",
"boundary",
"area"]:
855 mapName = self.toolbar.GetLayer().GetName()
858 GError(parent = self,
859 message = _(
"No vector map selected for editing."))
862 if self.toolbar.GetAction(
'type') ==
'line':
870 nfeat, fids = self.digit.AddFeature(self.toolbar.GetAction(
'type'), self.
polycoords)
881 if UserSettings.Get(group =
'vdigit', key =
"addRecord", subkey =
'enabled')
and \
883 (
not line
and nfeat > 0)):
884 posWindow = self.ClientToScreen((position[0] + self.
dialogOffset,
889 UserSettings.Get(group =
'vdigit', key =
"layer", subkey =
'value') :
890 (UserSettings.Get(group =
'vdigit', key =
"category", subkey =
'value'), )
893 addRecordDlg = DisplayAttributesDialog(parent = self, map = mapName,
896 action =
"add", ignoreError =
True)
902 self.
_geomAttrb(fid, addRecordDlg,
'perimeter')
905 if addRecordDlg.mapDBInfo
and \
906 addRecordDlg.ShowModal() == wx.ID_OK:
907 sqlfile = tempfile.NamedTemporaryFile(mode =
"w")
908 for sql
in addRecordDlg.GetSQLString():
909 sqlfile.file.write(sql +
";\n")
914 input = sqlfile.name)
916 if addRecordDlg.mapDBInfo:
919 elif action ==
"deleteLine":
921 if self.digit.DeleteSelectedLines() < 0:
924 elif action ==
"splitLine":
928 elif action ==
"addVertex":
933 elif action ==
"removeVertex":
939 elif action
in (
"copyCats",
"copyAttrs"):
940 if action ==
'copyCats':
954 elif action ==
"editLine" and \
955 hasattr(self,
"moveInfo"):
956 line = self.digit.GetDisplay().GetSelected()[0]
957 if self.digit.EditLine(line, self.
polycoords) < 0:
962 elif action ==
"flipLine":
963 if self.digit.FlipLine() < 0:
965 elif action ==
"mergeLine":
966 if self.digit.MergeLine() < 0:
968 elif action ==
"breakLine":
969 if self.digit.BreakLine() < 0:
971 elif action ==
"snapLine":
972 if self.digit.SnapLine() < 0:
974 elif action ==
"connectLine":
975 if len(self.digit.GetDisplay().GetSelected()) > 1:
976 if self.digit.ConnectLine() < 0:
978 elif action ==
"copyLine":
979 if self.digit.CopyLine(self.
copyIds) < 0:
984 self.
UpdateMap(render =
True, renderVector =
False)
987 elif action ==
"zbulkLine" and len(self.
polycoords) == 2:
991 selected = self.digit.GetDisplay().GetSelected()
992 dlg = VDigitZBulkDialog(parent = self, title = _(
"Z bulk-labeling dialog"),
993 nselected = len(selected))
994 if dlg.ShowModal() == wx.ID_OK:
995 if self.digit.ZBulkLines(pos1, pos2, dlg.value.GetValue(),
996 dlg.step.GetValue()) < 0:
999 elif action ==
"typeConv":
1003 if self.digit.TypeConvForSelectedLines() < 0:
1006 if action !=
"addLine":
1008 self.digit.GetDisplay().SetSelected([])
1012 def _onMouseMoving(self, event):
1013 self.
mouse[
'end'] = event.GetPositionTuple()[:]
1015 Debug.msg (5,
"BufferedWindow.OnMouseMoving(): coords=%f,%f" % \
1016 (self.
mouse[
'end'][0], self.
mouse[
'end'][1]))
1018 action = self.toolbar.GetAction()
1019 if action ==
"addLine" and \
1020 self.toolbar.GetAction(
'type')
in [
"line",
"boundary",
"area"]:
1024 elif action
in [
"moveLine",
"moveVertex",
"editLine"] \
1025 and hasattr(self,
"moveInfo"):
1026 dx = self.
mouse[
'end'][0] - self.
mouse[
'begin'][0]
1027 dy = self.
mouse[
'end'][1] - self.
mouse[
'begin'][1]
1030 if action ==
"moveLine" and \
1034 self.pdcTmp.TranslateId(id, dx, dy)
1035 elif action
in [
"moveVertex",
"editLine"]:
1041 if action ==
"moveVertex" and \
1044 self.pdcTmp.RemoveId(self.
moveInfo[
'id'][0])
1047 self.pdcTmp.RemoveId(self.
moveInfo[
'id'][1] + 1)
1048 self.polycoords.append((x, y))
1053 self.pdcTmp.RemoveId(self.
moveInfo[
'id'][2]-1)
1054 self.polycoords.append((x, y))
1059 if action ==
"editLine":
1066 elif action ==
"zbulkLine":
1071 def _zoom(self, event):
1072 tmp1 = self.
mouse[
'end']
1074 dx = tmp1[0] - tmp2[0]
1075 dy = tmp1[1] - tmp2[1]
1076 self.
moveInfo[
'beginDiff'] = (dx, dy)
1078 self.pdcTmp.RemoveId(id)
def _geomAttrb
Define geometry attributes.
def DrawLines
Draw polyline in PseudoDC.
A Buffered window extended for vector digitizer.
def OnLeftDownCopyLine
Left mouse button pressed - vector digitizer copy lines action.
def ListOfCatsToRange
Convert list of category number to range(s)
def OnLeftDownMoveLine
Left mouse button pressed - vector digitizer move feature/vertex, edit linear feature.
def OnLeftDownAddLine
Left mouse button pressed - add new feature.
def OnLeftUpVarious
Left mouse button released - vector digitizer various actions.
def SetToolbar
Set up related toolbar.
redrawAll
self.OnSize(None)
def DrawCross
Draw cross in PseudoDC.
def _updateATM
Update open Attribute Table Manager.
def OnLeftUpCopyLine
Left mouse button released - vector digitizer copy feature action.
def OnLeftUpModifyLine
Left mouse button released - vector digitizer split line, add/remove vertex action.
def UpdateMap
Updates the canvas anytime there is a change to the underlaying images or to the geometry of the canv...
def _geomAttrbUpdate
Update geometry atrributes of currently selected features.
def OnLeftDownCopyCA
Left mouse button pressed - vector digitizer copy categories or attributes action.
wxGUI vector digitizer dialogs
def OnLeftUpBulkLine
Left mouse button released - vector digitizer z-bulk line action.
def OnLeftDownUndo
Left mouse button pressed with control key - vector digitizer undo functionality. ...
Misc utilities for wxGUI.
def OnLeftDownBulkLine
Left mouse button pressed - vector digitizer label 3D vector lines.
def OnLeftDownDisplayCA
Left mouse button pressed - vector digitizer display categories or attributes action.
Map display canvas - buffered window.
Global variables used by wxGUI.
def OnLeftDownEditLine
Left mouse button pressed - edit linear feature - add new vertex.
def Distance
Calculete distance.
def MouseDraw
Mouse box or line from 'begin' to 'end'.
def OnLeftUpConnectLine
Left mouse button released - vector digitizer connect line action.
Class providing information about attribute tables linked to a vector map.
def OnKeyDown
Key pressed.
A Buffered window class (2D view mode)
def RunCommand
Run GRASS command.
def ClearLines
Clears temporary drawn lines from PseudoDC.