GRASS Programmer's Manual  6.5.svn(2012)-r51648
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
mapdisplay.MapFrame Class Reference

Main frame for map display window. More...

Inheritance diagram for mapdisplay.MapFrame:
Collaboration diagram for mapdisplay.MapFrame:

Public Member Functions

def __init__
 Main map display window with toolbars, statusbar and DrawWindow.
def AddToolbar
 Add defined toolbar to the window.
def OnUpdateProgress
def OnFocus
def OnDraw
 Re-display current map composition.
def OnRender
 Re-render map composition (each map layer)
def OnPointer
 Pointer button clicked.
def OnZoomIn
def OnZoomOut
def OnPan
def OnErase
def OnZoomRegion
def OnAlignRegion
def SaveToFile
 Save map to image.
def PrintMenu
def FormatDist
 Format length numbers and units in a nice way, as a function of length.
def OnZoomToRaster
 Set display extents to match selected raster map (ignore NULLs)
def OnZoomToSaved
 Set display geometry to match extents in saved region file.
def OnDisplayToWind
 Set computational region (WIND file) to match display extents.
def SaveDisplayRegion
 Save display extents to named region file.
def OnZoomMenu
 Popup Zoom menu.
def IsStandalone
 Check if Map display is standalone.
def GetLayerManager
 Get reference to Layer Manager.
def GetSrcWindow
def GetTgtWindow
def GetShowTarget
def GetMapToolbar
 Returns toolbar with zooming tools.

Data Fields

 tree
 page
 layerbook
 activemap
 SrcMap
 TgtMap
 statusbarItems
 statusbarManager
 SrcMapWindow
 TgtMapWindow
 MapWindow
 Map
 list
 printopt
 digit
 dialogs
 decorationDialog
 show_target

Detailed Description

Main frame for map display window.

Drawing takes place in child double buffered drawing window.

Definition at line 41 of file mapdisplay.py.


Constructor & Destructor Documentation

def mapdisplay.MapFrame.__init__ (   self,
  parent = None,
  title = _("GRASS GIS Manage Ground Control Points"),
  toolbars = ["gcpdisp"],
  tree = None,
  notebook = None,
  lmgr = None,
  page = None,
  Map = None,
  auimgr = None,
  name = 'GCPMapWindow',
  kwargs 
)

Main map display window with toolbars, statusbar and DrawWindow.

Parameters:
toolbarsarray of activated toolbars, e.g. ['map', 'digit']
treereference to layer tree
notebookcontrol book ID in Layer Manager
lmgrLayer Manager
pagenotebook page with layer tree
Mapinstance of render.Map
auimgsAUI manager
kwargswx.Frame attribures

Definition at line 47 of file mapdisplay.py.

References mapdisplay.MapFrame._layerManager.


Member Function Documentation

def mapdisplay.MapFrame.AddToolbar (   self,
  name 
)

Add defined toolbar to the window.

Currently known toolbars are:

  • 'map' - basic map toolbar
  • 'vdigit' - vector digitizer
  • 'gcpdisp' - GCP Manager, Display
  • 'gcpman' - GCP Manager, points management
  • 'nviz' - 3D view mode

Definition at line 206 of file mapdisplay.py.

References mapdisplay.MapFrame.Map, manager.GCPWizard.Map, manager.GCP.Map, mapdisp.MapFrameBase.toolbars, and frame.GMFrame.toolbars.

def mapdisplay.MapFrame.FormatDist (   self,
  dist 
)

Format length numbers and units in a nice way, as a function of length.

From code by Hamish Bowman Grass Development Team 2006

Definition at line 501 of file mapdisplay.py.

References round.

Referenced by frame.MapFrame.MeasureDist().

Get reference to Layer Manager.

Returns:
window reference
None (if standalone)

Definition at line 610 of file mapdisplay.py.

References mapdisplay.MapFrame._layerManager.

Definition at line 618 of file mapdisplay.py.

References mapdisplay.MapFrame.SrcMapWindow.

Definition at line 621 of file mapdisplay.py.

References mapdisplay.MapFrame.TgtMapWindow.

Check if Map display is standalone.

Definition at line 603 of file mapdisplay.py.

References mapdisplay.MapFrame._layerManager.

Referenced by frame.MapFrame.OnQuery(), and frame.MapFrame.QueryMap().

def mapdisplay.MapFrame.OnAlignRegion (   self,
  event 
)
Align region

Definition at line 424 of file mapdisplay.py.

def mapdisplay.MapFrame.OnDisplayToWind (   self,
  event 
)

Set computational region (WIND file) to match display extents.

Definition at line 559 of file mapdisplay.py.

Referenced by mapdisplay.MapFrame.OnZoomMenu(), and frame.MapFrame.OnZoomMenu().

def mapdisplay.MapFrame.OnDraw (   self,
  event 
)

Re-display current map composition.

Definition at line 284 of file mapdisplay.py.

def mapdisplay.MapFrame.OnFocus (   self,
  event 
)
Change choicebook page to match display.
Or set display for georectifying

Definition at line 264 of file mapdisplay.py.

References mapdisplay.MapFrame._layerManager, mapdisplay.MapFrame.OnPointer(), and mapdisplay.MapFrame.page.

def mapdisplay.MapFrame.OnRender (   self,
  event 
)

Re-render map composition (each map layer)

Definition at line 289 of file mapdisplay.py.

References mapdisplay.MapFrame.show_target, manager.GCP.show_target, and mapdisp.MapFrameBase.StatusbarUpdate().

def mapdisplay.MapFrame.OnZoomRegion (   self,
  event 
)
Zoom to region

Definition at line 415 of file mapdisplay.py.

References mapwindow.BufferedWindow.UpdateMap(), and mapwindow.GLWindow.UpdateMap().

def mapdisplay.MapFrame.OnZoomToRaster (   self,
  event 
)

Set display extents to match selected raster map (ignore NULLs)

Definition at line 547 of file mapdisplay.py.

def mapdisplay.MapFrame.OnZoomToSaved (   self,
  event 
)

Set display geometry to match extents in saved region file.

Definition at line 553 of file mapdisplay.py.

Referenced by mapdisplay.MapFrame.OnZoomMenu(), and frame.MapFrame.OnZoomMenu().

def mapdisplay.MapFrame.PrintMenu (   self,
  event 
)
Print options and output menu for map display

Definition at line 477 of file mapdisplay.py.

def mapdisplay.MapFrame.SaveDisplayRegion (   self,
  event 
)

Save display extents to named region file.

Definition at line 565 of file mapdisplay.py.

Referenced by mapdisplay.MapFrame.OnZoomMenu(), and frame.MapFrame.OnZoomMenu().

def mapdisplay.MapFrame.SaveToFile (   self,
  event 
)

Save map to image.

Definition at line 434 of file mapdisplay.py.

References dialogs.GetImageHandlers().


Field Documentation

Definition at line 74 of file mapdisplay.py.

Definition at line 67 of file mapdisplay.py.

Definition at line 182 of file mapdisplay.py.


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