GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
Virtual class which stores information about layers (map layers and overlays) of the map composition. More...
Public Member Functions | |
def | __init__ |
def | __del__ |
def | Render |
Render layer to image. More... | |
def | GetCmd |
Get GRASS command as list of string. More... | |
def | GetType |
Get map layer type. More... | |
def | GetElement |
Get map element type. More... | |
def | GetOpacity |
def | GetName |
Get map layer name. More... | |
def | IsActive |
Check if layer is activated for rendering. More... | |
def | SetType |
Set layer type. More... | |
def | SetName |
Set layer name. More... | |
def | SetActive |
Active or deactive layer. More... | |
def | SetHidden |
Hide or show map layer in Layer Manager. More... | |
def | SetOpacity |
Set opacity value. More... | |
def | SetCmd |
Set new command for layer. More... | |
Data Fields | |
type | |
name | |
cmd | |
active | |
hidden | |
opacity | |
force_render | |
mapfile | |
maskfile | |
Virtual class which stores information about layers (map layers and overlays) of the map composition.
For map layer use MapLayer class. For overlays use Overlay class.
def render.Layer.__init__ | ( | self, | |
type, | |||
cmd, | |||
name = None , |
|||
active = True , |
|||
hidden = False , |
|||
opacity = 1.0 |
|||
) |
type | layer type ('raster', 'vector', 'overlay', 'command', etc.) |
cmd | GRASS command to render layer, given as list, e.g. ['d.rast', 'map=elevation'] |
name | layer name, e.g. 'elevation' (for layer tree) |
active | layer is active, will be rendered only if True |
hidden | layer is hidden, won't be listed in Layer Manager if True |
opacity | layer opacity <0;1> |
def render.Layer.__del__ | ( | self | ) |
Definition at line 101 of file render.py.
References render.Layer.GetCmd(), and render.Layer.name.
def render.Layer.GetCmd | ( | self, | |
string = False |
|||
) |
Get GRASS command as list of string.
string | get command as string if True otherwise as list |
Definition at line 211 of file render.py.
References render.Layer.cmd, gcmd.Command.cmd, gcmd.CommandThread.cmd, utils.GetCmdString(), and render.Layer.type.
Referenced by render.Layer.__del__(), wxnviz.ImageTexture.Corresponds(), dialogs.ModelSearchDialog.OnOk(), render.Layer.Render(), and render.Layer.SetCmd().
def render.Layer.GetElement | ( | self | ) |
Get map element type.
Definition at line 234 of file render.py.
References render.Layer.type.
Referenced by dialogs.MapsetDialog.GetMapset(), dialogs.NewVectorDialog.GetName(), dialogs.LocationDialog.GetValues(), and dialogs.ModelDataDialog.OnOK().
def render.Layer.GetName | ( | self, | |
fullyQualified = True |
|||
) |
Get map layer name.
fullyQualified | True to return fully qualified name as a string 'name' otherwise directory { 'name', 'mapset' } is returned |
Definition at line 253 of file render.py.
References render.Layer.name.
Referenced by dialogs.ItemCheckListCtrl.OnCheckItem(), widgets.SingleSymbolPanel.OnDoubleClick(), and widgets.SingleSymbolPanel.OnLeftDown().
def render.Layer.GetOpacity | ( | self, | |
float = False |
|||
) |
Get layer opacity level @param float get opacity level in <0,1> otherwise <0,100> @return opacity level
Definition at line 240 of file render.py.
References render.Layer.opacity.
Referenced by dialogs.SetOpacityDialog.OnApply().
def render.Layer.GetType | ( | self | ) |
Get map layer type.
Definition at line 230 of file render.py.
References render.Layer.type.
Referenced by dialogs.ModelDataDialog.OnOK().
def render.Layer.IsActive | ( | self | ) |
Check if layer is activated for rendering.
Definition at line 272 of file render.py.
References render.Layer.active.
def render.Layer.Render | ( | self | ) |
Render layer to image.
Definition at line 105 of file render.py.
References render.Layer.cmd, gcmd.Command.cmd, gcmd.CommandThread.cmd, render.Layer.force_render, render.Layer.GetCmd(), render.Layer.mapfile, render.Layer.maskfile, render.Layer.name, gcmd.RunCommand(), and render.Layer.type.
def render.Layer.SetActive | ( | self, | |
enable = True |
|||
) |
def render.Layer.SetCmd | ( | self, | |
cmd | |||
) |
Set new command for layer.
Definition at line 308 of file render.py.
References render.Layer.cmd, gcmd.Command.cmd, gcmd.CommandThread.cmd, utils.CmdToTuple(), render.Layer.force_render, render.Layer.GetCmd(), and render.Layer.type.
def render.Layer.SetHidden | ( | self, | |
enable = False |
|||
) |
Hide or show map layer in Layer Manager.
Definition at line 295 of file render.py.
References render.Layer.hidden.
def render.Layer.SetName | ( | self, | |
name | |||
) |
Set layer name.
Definition at line 287 of file render.py.
References render.Layer.name.
Referenced by goutput.GMConsole.__init__(), widgets.SingleSymbolPanel.__init__(), gselect.DriverSelect.__init__(), gselect.DatabaseSelect.__init__(), gselect.TableSelect.__init__(), gselect.LocationSelect.__init__(), gselect.SubGroupSelect.__init__(), gselect.FormatSelect.__init__(), gselect.ProjSelect.__init__(), and gselect.ElementSelect.__init__().
def render.Layer.SetOpacity | ( | self, | |
value | |||
) |
def render.Layer.SetType | ( | self, | |
type | |||
) |
render.Layer.active |
Definition at line 78 of file render.py.
Referenced by render.Layer.IsActive(), wxnviz.Texture.IsActive(), render.Layer.SetActive(), and wxnviz.Texture.SetActive().
render.Layer.cmd |
Definition at line 72 of file render.py.
Referenced by render.Layer.GetCmd(), forms.GUI.GetCmd(), wxnviz.ImageTexture.GetCmd(), vclean.VectorCleaningFrame.OnCleaningRun(), vclean.VectorCleaningFrame.OnCopy(), vclean.VectorCleaningFrame.OnHelp(), mcalc_builder.MapCalcFrame.OnHelp(), mcalc_builder.MapCalcFrame.OnMCalcRun(), dialogs.DecorationDialog.OnOptions(), render.Layer.Render(), and render.Layer.SetCmd().
render.Layer.force_render |
Definition at line 82 of file render.py.
Referenced by render.Layer.Render(), and render.Layer.SetCmd().
render.Layer.hidden |
Definition at line 79 of file render.py.
Referenced by render.Layer.SetHidden().
render.Layer.mapfile |
Definition at line 96 of file render.py.
Referenced by render.Map.Clean(), mapwindow.BufferedWindow.GetImage(), render.Layer.Render(), render.Map.Render(), histogram.BufferedWindow.UpdateHist(), mapwindow.BufferedWindow.UpdateMap(), and colorrules.BufferedWindow.UpdatePreview().
render.Layer.maskfile |
Definition at line 99 of file render.py.
Referenced by render.Layer.Render().
render.Layer.name |
Definition at line 69 of file render.py.
Referenced by render.Layer.__del__(), python.task.grassTask.get_cmd(), python.task.grassTask.get_name(), render.MapLayer.GetMapset(), render.Layer.GetName(), dialogs.DecorationDialog.GetOptData(), dialogs.DecorationDialog.OnCancel(), dialogs.DecorationDialog.OnOptions(), render.Layer.Render(), and render.Layer.SetName().
render.Layer.opacity |
Definition at line 80 of file render.py.
Referenced by render.Layer.GetOpacity(), and render.Layer.SetOpacity().
render.Layer.type |
Definition at line 68 of file render.py.
Referenced by render.Layer.GetCmd(), render.Layer.GetElement(), gselect.TreeCtrlComboPopup.GetElementList(), render.Layer.GetType(), gselect.TreeCtrlComboPopup.GetType(), gselect.TreeCtrlComboPopup.OnPopup(), render.Layer.Render(), render.Layer.SetCmd(), gselect.TreeCtrlComboPopup.SetData(), render.Layer.SetType(), and widgets.BaseValidator.Validate().