GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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. More...
 
def AddToolbar
 Add defined toolbar to the window. More...
 
def OnUpdateProgress
 
def OnFocus
 
def OnDraw
 Re-display current map composition. More...
 
def OnRender
 Re-render map composition (each map layer) More...
 
def OnPointer
 Pointer button clicked. More...
 
def OnZoomIn
 
def OnZoomOut
 
def OnPan
 
def OnErase
 
def OnZoomRegion
 
def OnAlignRegion
 
def SaveToFile
 Save map to image. More...
 
def PrintMenu
 
def FormatDist
 Format length numbers and units in a nice way, as a function of length. More...
 
def OnZoomToRaster
 Set display extents to match selected raster map (ignore NULLs) More...
 
def OnZoomToSaved
 Set display geometry to match extents in saved region file. More...
 
def OnDisplayToWind
 Set computational region (WIND file) to match display extents. More...
 
def SaveDisplayRegion
 Save display extents to named region file. More...
 
def OnZoomMenu
 Popup Zoom menu. More...
 
def IsStandalone
 Check if Map display is standalone. More...
 
def GetLayerManager
 Get reference to Layer Manager. More...
 
def GetSrcWindow
 
def GetTgtWindow
 
def GetShowTarget
 
def GetMapToolbar
 Returns toolbar with zooming tools. More...
 

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 502 of file mapdisplay.py.

References round.

Referenced by frame.MapFrame.MeasureDist().

def mapdisplay.MapFrame.GetLayerManager (   self)

Get reference to Layer Manager.

Returns
window reference
None (if standalone)

Definition at line 611 of file mapdisplay.py.

References mapdisplay.MapFrame._layerManager.

def mapdisplay.MapFrame.GetShowTarget (   self)

Definition at line 625 of file mapdisplay.py.

References mapdisplay.MapFrame.show_target, and manager.GCP.show_target.

def mapdisplay.MapFrame.GetSrcWindow (   self)

Definition at line 619 of file mapdisplay.py.

References mapdisplay.MapFrame.SrcMapWindow.

def mapdisplay.MapFrame.GetTgtWindow (   self)

Definition at line 622 of file mapdisplay.py.

References mapdisplay.MapFrame.TgtMapWindow.

def mapdisplay.MapFrame.IsStandalone (   self)

Check if Map display is standalone.

Definition at line 604 of file mapdisplay.py.

References mapdisplay.MapFrame._layerManager.

Referenced by frame.MapFrame.OnQuery().

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

Definition at line 425 of file mapdisplay.py.

def mapdisplay.MapFrame.OnDisplayToWind (   self,
  event 
)

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

Definition at line 560 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.OnErase (   self,
  event 
)
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.OnPointer (   self,
  event 
)
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.OnUpdateProgress (   self,
  event 
)
def mapdisplay.MapFrame.OnZoomRegion (   self,
  event 
)
Zoom to region

Definition at line 416 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 548 of file mapdisplay.py.

def mapdisplay.MapFrame.OnZoomToSaved (   self,
  event 
)

Set display geometry to match extents in saved region file.

Definition at line 554 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 478 of file mapdisplay.py.

def mapdisplay.MapFrame.SaveDisplayRegion (   self,
  event 
)

Save display extents to named region file.

Definition at line 566 of file mapdisplay.py.

Referenced by mapdisplay.MapFrame.OnZoomMenu().

def mapdisplay.MapFrame.SaveToFile (   self,
  event 
)

Save map to image.

Definition at line 435 of file mapdisplay.py.

References dialogs.GetImageHandlers().

Field Documentation

mapdisplay.MapFrame.activemap

Definition at line 74 of file mapdisplay.py.

mapdisplay.MapFrame.decorationDialog

Definition at line 204 of file mapdisplay.py.

mapdisplay.MapFrame.layerbook

Definition at line 67 of file mapdisplay.py.

mapdisplay.MapFrame.list
mapdisplay.MapFrame.printopt

Definition at line 182 of file mapdisplay.py.

mapdisplay.MapFrame.show_target
mapdisplay.MapFrame.SrcMap

Definition at line 77 of file mapdisplay.py.

Referenced by manager.GCP.OnUpdateActive(), and manager.GCP.OnZoomToTarget().

mapdisplay.MapFrame.statusbarManager

Definition at line 101 of file mapdisplay.py.

mapdisplay.MapFrame.TgtMap

Definition at line 78 of file mapdisplay.py.

Referenced by manager.GCP.OnUpdateActive(), and manager.GCP.OnZoomToSource().


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