GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
wxdisplay.DisplayDriver Class Reference

Public Member Functions

def __init__
 Display driver used by vector digitizer. More...
 
def __del__
 Close currently open vector map. More...
 
def DrawMap
 Draw content of the vector map to the device. More...
 
def SelectLinesByBox
 Select vector objects by given bounding box. More...
 
def SelectLineByPoint
 Select vector feature by given point in given threshold. More...
 
def GetSelectedIList
 Get list of selected objects as struct_ilist. More...
 
def GetSelected
 Get ids of selected objects. More...
 
def SetSelected
 Set selected vector objects. More...
 
def GetSelectedVertex
 Get PseudoDC vertex id of selected line. More...
 
def GetRegionSelected
 Get minimal region extent of selected features. More...
 
def DrawSelected
 Draw selected features. More...
 
def CloseMap
 Close vector map. More...
 
def OpenMap
 Open vector map by the driver. More...
 
def GetMapBoundingBox
 Get bounding box of (opened) vector map layer. More...
 
def UpdateSettings
 Update display driver settings. More...
 
def UpdateRegion
 Update geographical region used by display driver. More...
 
def GetThreshold
 Return threshold value in map units. More...
 
def GetDuplicates
 Return ids of (selected) duplicated vector features. More...
 
def UnSelect
 Unselect vector features. More...
 

Data Fields

 mapInfo
 
 poMapInfo
 
 is3D
 
 dc
 
 dcTmp
 
 mapObj
 
 region
 
 window
 
 log
 
 firstNode
 
 lastNodeId
 
 poPoints
 
 poCats
 
 selected
 
 settings
 
 topology
 
 fisrtNode
 

Detailed Description

Definition at line 62 of file wxdisplay.py.

Constructor & Destructor Documentation

def wxdisplay.DisplayDriver.__init__ (   self,
  device,
  deviceTmp,
  mapObj,
  window,
  glog,
  gprogress 
)

Display driver used by vector digitizer.

Parameters
devicewx.PseudoDC device where to draw vector objects
deviceTmpwx.PseudoDC device where to draw temporary vector objects
mapOngMap Object (render.Map)
windiowparent window for dialogs
gloglogging device (None to discard messages)
gprogressprogress bar device (None to discard message)

Definition at line 63 of file wxdisplay.py.

References G_set_error_routine(), and G_set_percent_routine().

Member Function Documentation

def wxdisplay.DisplayDriver.CloseMap (   self)

Close vector map.

Returns
0 on success
non-zero on error

Definition at line 823 of file wxdisplay.py.

References wxdisplay.DisplayDriver.mapInfo, wxdisplay.DisplayDriver.poMapInfo, wxdigit.IVDigit.poMapInfo, Vect_build(), Vect_build_partial(), and Vect_close().

Referenced by wxdisplay.DisplayDriver.__del__().

def wxdisplay.DisplayDriver.DrawSelected (   self,
  flag 
)

Draw selected features.

Parameters
flagTrue to draw selected features

Definition at line 816 of file wxdisplay.py.

References wxdisplay.DisplayDriver._drawSelected.

def wxdisplay.DisplayDriver.GetMapBoundingBox (   self)

Get bounding box of (opened) vector map layer.

Returns
(w,s,b,e,n,t)

Definition at line 884 of file wxdisplay.py.

References wxdisplay.DisplayDriver.poMapInfo, wxdigit.IVDigit.poMapInfo, and Vect_get_map_box().

def wxdisplay.DisplayDriver.GetSelected (   self,
  grassId = True 
)
def wxdisplay.DisplayDriver.GetSelectedIList (   self,
  ilist = None 
)
def wxdisplay.DisplayDriver.GetThreshold (   self,
  type = 'snapping',
  value = None,
  units = None 
)

Return threshold value in map units.

Parameters
typesnapping mode (node, vertex)
valuethreshold to be set up
unitsunits (map, screen)
Returns
threshold value

Definition at line 938 of file wxdisplay.py.

References max, wxdisplay.DisplayDriver.region, and render.Map.region.

Referenced by wxdisplay.DisplayDriver.GetSelectedVertex(), and wxdisplay.DisplayDriver.SelectLineByPoint().

def wxdisplay.DisplayDriver.OpenMap (   self,
  name,
  mapset,
  update = True 
)

Open vector map by the driver.

Parameters
namename of vector map to be open
mapsetname of mapset where the vector map lives
Returns
map_info
None on error

Definition at line 842 of file wxdisplay.py.

References wxdisplay.DisplayDriver.is3D, wxdisplay.DisplayDriver.mapInfo, wxdisplay.DisplayDriver.poMapInfo, wxdigit.IVDigit.poMapInfo, Vect_build(), Vect_is_3d(), Vect_open_old(), Vect_open_update(), mapwindow.NvizThread.window, wxdisplay.DisplayDriver.window, and dialogs.ItemCheckListCtrl.window.

def wxdisplay.DisplayDriver.SelectLinesByBox (   self,
  bbox,
  drawSeg = False,
  poMapInfo = None 
)
def wxdisplay.DisplayDriver.SetSelected (   self,
  ids,
  layer = -1 
)
def wxdisplay.DisplayDriver.UpdateRegion (   self)

Update geographical region used by display driver.

Definition at line 933 of file wxdisplay.py.

References wxdisplay.DisplayDriver.region, and render.Map.region.

def wxdisplay.DisplayDriver.UpdateSettings (   self,
  alpha = 255 
)

Field Documentation

wxdisplay.DisplayDriver.dc

Definition at line 86 of file wxdisplay.py.

Referenced by wxdisplay.DisplayDriver.DrawMap().

wxdisplay.DisplayDriver.dcTmp

Definition at line 87 of file wxdisplay.py.

Referenced by wxdisplay.DisplayDriver.DrawMap().

wxdisplay.DisplayDriver.firstNode

Definition at line 93 of file wxdisplay.py.

wxdisplay.DisplayDriver.fisrtNode

Definition at line 273 of file wxdisplay.py.

wxdisplay.DisplayDriver.is3D
wxdisplay.DisplayDriver.lastNodeId

Definition at line 94 of file wxdisplay.py.

wxdisplay.DisplayDriver.log

Definition at line 91 of file wxdisplay.py.

wxdisplay.DisplayDriver.mapInfo
wxdisplay.DisplayDriver.mapObj

Definition at line 88 of file wxdisplay.py.

wxdisplay.DisplayDriver.region
wxdisplay.DisplayDriver.settings
wxdisplay.DisplayDriver.topology

Definition at line 164 of file wxdisplay.py.

wxdisplay.DisplayDriver.window

Definition at line 90 of file wxdisplay.py.

Referenced by wxdisplay.DisplayDriver.OpenMap().


The documentation for this class was generated from the following file: