GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
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 | |
Definition at line 62 of file wxdisplay.py.
def wxdisplay.DisplayDriver.__init__ | ( | self, | |
device, | |||
deviceTmp, | |||
mapObj, | |||
window, | |||
glog, | |||
gprogress | |||
) |
Display driver used by vector digitizer.
device | wx.PseudoDC device where to draw vector objects |
deviceTmp | wx.PseudoDC device where to draw temporary vector objects |
mapOng | Map Object (render.Map) |
windiow | parent window for dialogs |
glog | logging device (None to discard messages) |
gprogress | progress bar device (None to discard message) |
Definition at line 63 of file wxdisplay.py.
References G_set_error_routine(), and G_set_percent_routine().
def wxdisplay.DisplayDriver.__del__ | ( | self | ) |
Close currently open vector map.
Definition at line 150 of file wxdisplay.py.
References wxdisplay.DisplayDriver.CloseMap(), wxdigit.IVDigit.CloseMap(), G_unset_error_routine(), G_unset_percent_routine(), wxdisplay.DisplayDriver.poCats, wxdigit.IVDigit.poCats, wxdisplay.DisplayDriver.poMapInfo, wxdigit.IVDigit.poMapInfo, wxdisplay.DisplayDriver.poPoints, wxdigit.IVDigit.poPoints, Vect_destroy_cats_struct(), and Vect_destroy_line_struct().
def wxdisplay.DisplayDriver.CloseMap | ( | self | ) |
Close vector map.
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.DrawMap | ( | self, | |
force = False |
|||
) |
Draw content of the vector map to the device.
force | force drawing |
Definition at line 429 of file wxdisplay.py.
References wxdisplay.DisplayDriver._drawObject(), wxdisplay.DisplayDriver._getDrawFlag(), wxdisplay.DisplayDriver._getRegionBox(), wxdisplay.DisplayDriver._resetTopology(), wxdisplay.DisplayDriver.dc, wxdisplay.DisplayDriver.dcTmp, max, wxdisplay.DisplayDriver.poMapInfo, wxdigit.IVDigit.poMapInfo, tools.range, wxdisplay.DisplayDriver.region, render.Map.region, wxdisplay.DisplayDriver.selected, vclean.VectorCleaningFrame.selected, widgets.SingleSymbolPanel.selected, dialogs.MapFramePanel.selected, gis_set.GListBox.selected, manager.GCPList.selected, dialogs.SymbolDialog.selected, Vect_get_num_lines(), and Vedit_render_map().
def wxdisplay.DisplayDriver.DrawSelected | ( | self, | |
flag | |||
) |
Draw selected features.
flag | True to draw selected features |
Definition at line 816 of file wxdisplay.py.
References wxdisplay.DisplayDriver._drawSelected.
def wxdisplay.DisplayDriver.GetDuplicates | ( | self | ) |
Return ids of (selected) duplicated vector features.
Definition at line 963 of file wxdisplay.py.
References wxdisplay.DisplayDriver._getCatString(), wxdisplay.DisplayDriver._isDuplicated(), wxdisplay.DisplayDriver.poCats, wxdigit.IVDigit.poCats, wxdisplay.DisplayDriver.poMapInfo, wxdigit.IVDigit.poMapInfo, tools.range, wxdisplay.DisplayDriver.selected, vclean.VectorCleaningFrame.selected, widgets.SingleSymbolPanel.selected, dialogs.MapFramePanel.selected, gis_set.GListBox.selected, manager.GCPList.selected, dialogs.SymbolDialog.selected, Vect_destroy_line_struct(), Vect_line_check_duplicate(), Vect_new_line_struct(), and Vect_read_line().
Referenced by wxdisplay.DisplayDriver.SelectLineByPoint(), and wxdisplay.DisplayDriver.UnSelect().
def wxdisplay.DisplayDriver.GetMapBoundingBox | ( | self | ) |
Get bounding box of (opened) vector map layer.
Definition at line 884 of file wxdisplay.py.
References wxdisplay.DisplayDriver.poMapInfo, wxdigit.IVDigit.poMapInfo, and Vect_get_map_box().
def wxdisplay.DisplayDriver.GetRegionSelected | ( | self | ) |
Get minimal region extent of selected features.
Definition at line 788 of file wxdisplay.py.
References wxdisplay.DisplayDriver.poMapInfo, wxdigit.IVDigit.poMapInfo, wxdisplay.DisplayDriver.selected, vclean.VectorCleaningFrame.selected, widgets.SingleSymbolPanel.selected, dialogs.MapFramePanel.selected, gis_set.GListBox.selected, manager.GCPList.selected, dialogs.SymbolDialog.selected, Vect_box_copy(), Vect_box_extend(), Vect_get_area_box(), Vect_get_centroid_area(), Vect_get_line_box(), and Vect_get_num_areas().
def wxdisplay.DisplayDriver.GetSelected | ( | self, | |
grassId = True |
|||
) |
Get ids of selected objects.
grassId | True for feature id, False for PseudoDC id |
Definition at line 658 of file wxdisplay.py.
References wxdisplay.DisplayDriver._drawSegments, wxdisplay.DisplayDriver.poMapInfo, wxdigit.IVDigit.poMapInfo, wxdisplay.DisplayDriver.poPoints, wxdigit.IVDigit.poPoints, tools.range, wxdisplay.DisplayDriver.selected, vclean.VectorCleaningFrame.selected, widgets.SingleSymbolPanel.selected, dialogs.MapFramePanel.selected, gis_set.GListBox.selected, manager.GCPList.selected, dialogs.SymbolDialog.selected, and Vect_read_line().
def wxdisplay.DisplayDriver.GetSelectedIList | ( | self, | |
ilist = None |
|||
) |
Get list of selected objects as struct_ilist.
Returned IList must be freed by Vect_destroy_list().
Definition at line 646 of file wxdisplay.py.
References wxdisplay.DisplayDriver._listToIList(), wxdisplay.DisplayDriver.selected, vclean.VectorCleaningFrame.selected, widgets.SingleSymbolPanel.selected, dialogs.MapFramePanel.selected, gis_set.GListBox.selected, manager.GCPList.selected, and dialogs.SymbolDialog.selected.
def wxdisplay.DisplayDriver.GetSelectedVertex | ( | self, | |
pos | |||
) |
Get PseudoDC vertex id of selected line.
Set bounding box for vertices of line.
pos | position |
Definition at line 722 of file wxdisplay.py.
References wxdisplay.DisplayDriver._cell2Pixel(), wxdisplay.DisplayDriver._drawSegments, wxdisplay.DisplayDriver._validLine(), wxdisplay.DisplayDriver.GetThreshold(), wxdisplay.DisplayDriver.poCats, wxdigit.IVDigit.poCats, wxdisplay.DisplayDriver.poMapInfo, wxdigit.IVDigit.poMapInfo, wxdisplay.DisplayDriver.poPoints, wxdigit.IVDigit.poPoints, tools.range, wxdisplay.DisplayDriver.selected, vclean.VectorCleaningFrame.selected, widgets.SingleSymbolPanel.selected, dialogs.MapFramePanel.selected, gis_set.GListBox.selected, manager.GCPList.selected, dialogs.SymbolDialog.selected, Vect_points_distance(), and Vect_read_line().
def wxdisplay.DisplayDriver.GetThreshold | ( | self, | |
type = 'snapping' , |
|||
value = None , |
|||
units = None |
|||
) |
Return threshold value in map units.
type | snapping mode (node, vertex) |
value | threshold to be set up |
units | units (map, screen) |
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.
name | name of vector map to be open |
mapset | name of mapset where the vector map lives |
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.SelectLineByPoint | ( | self, | |
point, | |||
poMapInfo = None |
|||
) |
Select vector feature by given point in given threshold.
Only one vector object can be selected. Bounding boxes of all segments are stores.
point | points coordinates (x, y) |
poMapInfo | use external Map_info, None for self.poMapInfo |
Definition at line 565 of file wxdisplay.py.
References wxdisplay.DisplayDriver._drawSegments, wxdisplay.DisplayDriver._drawSelected, wxdisplay.DisplayDriver._getSelectType(), wxdisplay.DisplayDriver._isDuplicated(), wxdisplay.DisplayDriver._isSelected(), wxdisplay.DisplayDriver._validLine(), wxdisplay.DisplayDriver.GetDuplicates(), wxdisplay.DisplayDriver.GetThreshold(), wxdisplay.DisplayDriver.is3D, wxdisplay.DisplayDriver.poCats, wxdigit.IVDigit.poCats, wxdisplay.DisplayDriver.poMapInfo, wxdigit.IVDigit.poMapInfo, wxdisplay.DisplayDriver.poPoints, wxdigit.IVDigit.poPoints, tools.range, wxdisplay.DisplayDriver.selected, vclean.VectorCleaningFrame.selected, widgets.SingleSymbolPanel.selected, dialogs.MapFramePanel.selected, gis_set.GListBox.selected, manager.GCPList.selected, dialogs.SymbolDialog.selected, preferences.PreferencesBaseDialog.settings, wxdisplay.DisplayDriver.settings, instructions.Image.settings, preferences.DefaultFontDialog.settings, Vect_destroy_list(), Vect_find_line_list(), Vect_list_append(), Vect_new_list(), and Vect_read_line().
def wxdisplay.DisplayDriver.SelectLinesByBox | ( | self, | |
bbox, | |||
drawSeg = False , |
|||
poMapInfo = None |
|||
) |
Select vector objects by given bounding box.
If line id is already in the list of selected lines, then it will be excluded from this list.
bbox | bounding box definition |
drawSeg | True to draw segments of line |
poMapInfo | use external Map_info, None for self.poMapInfo |
Definition at line 493 of file wxdisplay.py.
References wxdisplay.DisplayDriver._drawSegments, wxdisplay.DisplayDriver._drawSelected, wxdisplay.DisplayDriver._getSelectType(), wxdisplay.DisplayDriver._isSelected(), wxdisplay.DisplayDriver._validLine(), wxdisplay.DisplayDriver.poMapInfo, wxdigit.IVDigit.poMapInfo, wxdisplay.DisplayDriver.poPoints, wxdigit.IVDigit.poPoints, tools.range, wxdisplay.DisplayDriver.selected, vclean.VectorCleaningFrame.selected, widgets.SingleSymbolPanel.selected, dialogs.MapFramePanel.selected, gis_set.GListBox.selected, manager.GCPList.selected, dialogs.SymbolDialog.selected, Vect_append_point(), Vect_destroy_line_struct(), Vect_destroy_list(), Vect_new_line_struct(), Vect_new_list(), Vect_point_in_poly(), Vect_read_line(), and Vect_select_lines_by_polygon().
def wxdisplay.DisplayDriver.SetSelected | ( | self, | |
ids, | |||
layer = -1 |
|||
) |
Set selected vector objects.
list | of ids (None to unselect features) |
layer | layer number for features selected based on category number |
Definition at line 683 of file wxdisplay.py.
References wxdisplay.DisplayDriver._drawSelected, wxdisplay.DisplayDriver.poCats, wxdigit.IVDigit.poCats, wxdisplay.DisplayDriver.poMapInfo, wxdigit.IVDigit.poMapInfo, tools.range, wxdisplay.DisplayDriver.selected, vclean.VectorCleaningFrame.selected, widgets.SingleSymbolPanel.selected, dialogs.MapFramePanel.selected, gis_set.GListBox.selected, manager.GCPList.selected, dialogs.SymbolDialog.selected, Vect_get_num_lines(), and Vect_line_alive().
def wxdisplay.DisplayDriver.UnSelect | ( | self, | |
lines | |||
) |
Unselect vector features.
lines | list of feature id(s) |
Definition at line 1019 of file wxdisplay.py.
References wxdisplay.DisplayDriver._isDuplicated(), wxdisplay.DisplayDriver._isSelected(), wxdisplay.DisplayDriver.GetDuplicates(), wxdisplay.DisplayDriver.selected, vclean.VectorCleaningFrame.selected, widgets.SingleSymbolPanel.selected, dialogs.MapFramePanel.selected, gis_set.GListBox.selected, manager.GCPList.selected, dialogs.SymbolDialog.selected, preferences.PreferencesBaseDialog.settings, wxdisplay.DisplayDriver.settings, instructions.Image.settings, and preferences.DefaultFontDialog.settings.
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 |
|||
) |
Update display driver settings.
color value for aplha channel
Definition at line 898 of file wxdisplay.py.
References preferences.PreferencesBaseDialog.settings, wxdisplay.DisplayDriver.settings, instructions.Image.settings, and preferences.DefaultFontDialog.settings.
Referenced by tools.NvizToolWindow.LoadSettings(), dialogs.TextDialog.OnApply(), dialogs.OptDialog.OnApply(), and dialogs.OptDialog.OnSetOpt().
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 |
Definition at line 84 of file wxdisplay.py.
Referenced by wxdisplay.DisplayDriver.OpenMap(), and wxdisplay.DisplayDriver.SelectLineByPoint().
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 |
Definition at line 82 of file wxdisplay.py.
Referenced by wxdisplay.DisplayDriver.CloseMap(), and wxdisplay.DisplayDriver.OpenMap().
wxdisplay.DisplayDriver.mapObj |
Definition at line 88 of file wxdisplay.py.
wxdisplay.DisplayDriver.poCats |
Definition at line 98 of file wxdisplay.py.
Referenced by wxdisplay.DisplayDriver.__del__(), wxdisplay.DisplayDriver.GetDuplicates(), wxdisplay.DisplayDriver.GetSelectedVertex(), wxdisplay.DisplayDriver.SelectLineByPoint(), and wxdisplay.DisplayDriver.SetSelected().
wxdisplay.DisplayDriver.poMapInfo |
Definition at line 83 of file wxdisplay.py.
Referenced by wxdisplay.DisplayDriver.__del__(), wxdisplay.DisplayDriver.CloseMap(), wxdisplay.DisplayDriver.DrawMap(), wxdisplay.DisplayDriver.GetDuplicates(), wxdisplay.DisplayDriver.GetMapBoundingBox(), wxdisplay.DisplayDriver.GetRegionSelected(), wxdisplay.DisplayDriver.GetSelected(), wxdisplay.DisplayDriver.GetSelectedVertex(), wxdisplay.DisplayDriver.OpenMap(), wxdisplay.DisplayDriver.SelectLineByPoint(), wxdisplay.DisplayDriver.SelectLinesByBox(), and wxdisplay.DisplayDriver.SetSelected().
wxdisplay.DisplayDriver.poPoints |
Definition at line 97 of file wxdisplay.py.
Referenced by wxdisplay.DisplayDriver.__del__(), wxdisplay.DisplayDriver.GetSelected(), wxdisplay.DisplayDriver.GetSelectedVertex(), wxdisplay.DisplayDriver.SelectLineByPoint(), and wxdisplay.DisplayDriver.SelectLinesByBox().
wxdisplay.DisplayDriver.region |
Definition at line 89 of file wxdisplay.py.
Referenced by wxdisplay.DisplayDriver.DrawMap(), wxdisplay.DisplayDriver.GetThreshold(), and wxdisplay.DisplayDriver.UpdateRegion().
wxdisplay.DisplayDriver.selected |
Definition at line 101 of file wxdisplay.py.
Referenced by wxdisplay.DisplayDriver.DrawMap(), wxdisplay.DisplayDriver.GetDuplicates(), wxdisplay.DisplayDriver.GetRegionSelected(), wxdisplay.DisplayDriver.GetSelected(), wxdisplay.DisplayDriver.GetSelectedIList(), wxdisplay.DisplayDriver.GetSelectedVertex(), wxdisplay.DisplayDriver.SelectLineByPoint(), wxdisplay.DisplayDriver.SelectLinesByBox(), wxdisplay.DisplayDriver.SetSelected(), and wxdisplay.DisplayDriver.UnSelect().
wxdisplay.DisplayDriver.settings |
Definition at line 109 of file wxdisplay.py.
Referenced by wxdisplay.DisplayDriver.SelectLineByPoint(), wxdisplay.DisplayDriver.UnSelect(), and wxdisplay.DisplayDriver.UpdateSettings().
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().