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

Virtual class which stores information about layers (map layers and overlays) of the map composition. More...

Inheritance diagram for render.Layer:
Collaboration diagram for render.Layer:

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


Detailed Description

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.

Definition at line 48 of file

Constructor & Destructor Documentation

def render.Layer.__init__ (   self,
  name = None,
  active = True,
  hidden = False,
  opacity = 1.0 
pass cmd as tuple instead of list
typelayer type ('raster', 'vector', 'overlay', 'command', etc.)
cmdGRASS command to render layer, given as list, e.g. ['d.rast', 'map=elevation']
namelayer name, e.g. 'elevation' (for layer tree)
activelayer is active, will be rendered only if True
hiddenlayer is hidden, won't be listed in Layer Manager if True
opacitylayer opacity <0;1>

Definition at line 56 of file

def render.Layer.__del__ (   self)

Definition at line 101 of file

References render.Layer.GetCmd(), and

Member Function Documentation

def render.Layer.GetCmd (   self,
  string = False 

Get GRASS command as list of string.

stringget command as string if True otherwise as list
command list/string

Definition at line 211 of file

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)
def render.Layer.GetName (   self,
  fullyQualified = True 

Get map layer name.

fullyQualifiedTrue to return fully qualified name as a string 'name' otherwise directory { 'name', 'mapset' } is returned
string / directory

Definition at line 253 of file


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

References render.Layer.opacity.

Referenced by dialogs.SetOpacityDialog.OnApply().

def render.Layer.GetType (   self)

Get map layer type.

Definition at line 230 of file

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


def render.Layer.Render (   self)
def render.Layer.SetActive (   self,
  enable = True 

Active or deactive layer.

Definition at line 291 of file


def render.Layer.SetCmd (   self,
def render.Layer.SetHidden (   self,
  enable = False 

Hide or show map layer in Layer Manager.

Definition at line 295 of file

References render.Layer.hidden.

def render.Layer.SetOpacity (   self,

Set opacity value.

Definition at line 299 of file

References render.Layer.opacity.

def render.Layer.SetType (   self,

Set layer type.

Definition at line 276 of file

References render.Layer.type.

Field Documentation

Definition at line 82 of file

Referenced by render.Layer.Render(), and render.Layer.SetCmd().


Definition at line 79 of file

Referenced by render.Layer.SetHidden().


Definition at line 99 of file

Referenced by render.Layer.Render().


Definition at line 80 of file

Referenced by render.Layer.GetOpacity(), and render.Layer.SetOpacity().

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