GRASS Programmer's Manual  6.4.2(2012)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
gui_modules.gcpmapdisp.MapFrame Class Reference

Main frame for map display window. More...

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 OnZoomBack
def OnPan
def OnErase
def OnZoomRegion
def OnAlignRegion
def OnToggleRender
def OnToggleShowRegion
def OnToggleResolution
def OnToggleStatus
def OnChangeMapScale
def OnGoTo
def StatusbarUpdate
 Update statusbar content.
def StatusbarEnableLongHelp
 Enable/disable toolbars long help.
def StatusbarReposition
 Reposition checkbox in statusbar.
def SaveToFile
 Save map to image.
def PrintMenu
def GetRender
 Returns current instance of render.Map()
def GetWindow
 Get map window.
def FormatDist
 Format length numbers and units in a nice way, as a function of length.
def OnZoomToMap
 Set display extents to match selected raster (including NULLs) or vector map.
def OnZoomToRaster
 Set display extents to match selected raster map (ignore NULLs)
def OnZoomToWind
 Set display geometry to match computational region settings (set with g.region)
def OnZoomToDefault
 Set display geometry to match default region settings.
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 SetProperties
 Set properies of map display window.
def IsStandalone
 Check if Map display is standalone.
def GetLayerManager
 Get reference to Layer Manager.

Data Fields

 Map
 tree
 page
 layerbook
 parent
 cursors
 iconsize
 toolbars
 activemap
 SrcMap
 TgtMap
 statusbar
 statusbarWin
 SrcMapWindow
 TgtMapWindow
 MapWindow
 list
 printopt
 digit
 dialogs
 decorationDialog
 show_target
 height
 mapScaleValue
 ppm
 screen X region problem user should specify ppm

Detailed Description

Main frame for map display window.

Drawing takes place in child double buffered drawing window.

Definition at line 67 of file gcpmapdisp.py.


Constructor & Destructor Documentation

def gui_modules.gcpmapdisp.MapFrame.__init__ (   self,
  parent = None,
  id = wx.ID_ANY,
  title = _("GRASS GIS Manage Ground Control Points"),
  style = wx.DEFAULT_FRAME_STYLE,
  toolbars = ["gcpdisp"],
  tree = None,
  notebook = None,
  lmgr = None,
  page = None,
  Map = None,
  auimgr = None,
  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 74 of file gcpmapdisp.py.

References gui_modules.gcpmapdisp.MapFrame._layerManager.


Member Function Documentation

def gui_modules.gcpmapdisp.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
  • 'georect' - georectifier
  • 'nviz' - 3D view mode

Definition at line 331 of file gcpmapdisp.py.

References gui_modules.colorrules.ColorTable.Map, gui_modules.gcpmapdisp.MapFrame.Map, gui_modules.gcpmanager.GCPWizard.Map, gui_modules.colorrules.BufferedWindow.Map, gui_modules.gcpmanager.GCP.Map, and gui_modules.gcpmapdisp.MapFrame.toolbars.

def gui_modules.gcpmapdisp.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 960 of file gcpmapdisp.py.

References round.

Referenced by gui_modules.mapdisp.MapFrame.MeasureDist().

def gui_modules.gcpmapdisp.MapFrame.GetLayerManager (   self)

Get reference to Layer Manager.

Returns:
window reference
None (if standalone)

Definition at line 1097 of file gcpmapdisp.py.

References gui_modules.gcpmapdisp.MapFrame._layerManager.

def gui_modules.gcpmapdisp.MapFrame.GetRender (   self)
def gui_modules.gcpmapdisp.MapFrame.GetWindow (   self)
def gui_modules.gcpmapdisp.MapFrame.IsStandalone (   self)

Check if Map display is standalone.

Definition at line 1090 of file gcpmapdisp.py.

References gui_modules.gcpmapdisp.MapFrame._layerManager.

Referenced by gui_modules.mapdisp.MapFrame.OnQuery(), and gui_modules.mapdisp.MapFrame.QueryMap().

def gui_modules.gcpmapdisp.MapFrame.OnAlignRegion (   self,
  event 
)
Align region

Definition at line 572 of file gcpmapdisp.py.

def gui_modules.gcpmapdisp.MapFrame.OnChangeMapScale (   self,
  event 
)
def gui_modules.gcpmapdisp.MapFrame.OnDisplayToWind (   self,
  event 
)

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

Definition at line 1036 of file gcpmapdisp.py.

Referenced by gui_modules.gcpmapdisp.MapFrame.OnZoomMenu(), and gui_modules.mapdisp.MapFrame.OnZoomMenu().

def gui_modules.gcpmapdisp.MapFrame.OnDraw (   self,
  event 
)

Re-display current map composition.

Definition at line 426 of file gcpmapdisp.py.

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

Definition at line 406 of file gcpmapdisp.py.

References gui_modules.gcpmapdisp.MapFrame._layerManager, gui_modules.gcpmapdisp.MapFrame.OnPointer(), and gui_modules.gcpmapdisp.MapFrame.page.

def gui_modules.gcpmapdisp.MapFrame.OnGoTo (   self,
  event 
)
def gui_modules.gcpmapdisp.MapFrame.OnPointer (   self,
  event 
)

Pointer button clicked.

Definition at line 446 of file gcpmapdisp.py.

References gui_modules.gcpmapdisp.MapFrame.cursors.

Referenced by gui_modules.gcpmapdisp.MapFrame.OnFocus(), and gui_modules.mapdisp.MapFrame.OnFocus().

def gui_modules.gcpmapdisp.MapFrame.OnToggleRender (   self,
  event 
)
Enable/disable auto-rendering

Definition at line 582 of file gcpmapdisp.py.

References gui_modules.gcpmapdisp.MapFrame.OnRender(), and gui_modules.gcpmapdisp.MapFrame.statusbarWin.

def gui_modules.gcpmapdisp.MapFrame.OnToggleResolution (   self,
  event 
)
Use resolution of computation region settings
for redering image instead of display resolution

Definition at line 603 of file gcpmapdisp.py.

References gui_modules.gcpmapdisp.MapFrame.OnRender(), and gui_modules.gcpmapdisp.MapFrame.statusbarWin.

def gui_modules.gcpmapdisp.MapFrame.OnToggleShowRegion (   self,
  event 
)
Show/Hide extent in map canvas

Definition at line 589 of file gcpmapdisp.py.

References gui_modules.gcpmapdisp.MapFrame.OnRender(), and gui_modules.gcpmapdisp.MapFrame.statusbarWin.

def gui_modules.gcpmapdisp.MapFrame.OnToggleStatus (   self,
  event 
)
Toggle status text

Definition at line 612 of file gcpmapdisp.py.

References gui_modules.gcpmapdisp.MapFrame.StatusbarUpdate().

def gui_modules.gcpmapdisp.MapFrame.OnUpdateProgress (   self,
  event 
)
Update progress bar info

Definition at line 398 of file gcpmapdisp.py.

References gui_modules.gcpmapdisp.MapFrame.statusbarWin.

def gui_modules.gcpmapdisp.MapFrame.OnZoomBack (   self,
  event 
)
Zoom last (previously stored position)

Definition at line 517 of file gcpmapdisp.py.

def gui_modules.gcpmapdisp.MapFrame.OnZoomIn (   self,
  event 
)
def gui_modules.gcpmapdisp.MapFrame.OnZoomOut (   self,
  event 
)
def gui_modules.gcpmapdisp.MapFrame.OnZoomRegion (   self,
  event 
)
def gui_modules.gcpmapdisp.MapFrame.OnZoomToDefault (   self,
  event 
)

Set display geometry to match default region settings.

Definition at line 1025 of file gcpmapdisp.py.

Referenced by gui_modules.gcpmapdisp.MapFrame.OnZoomMenu(), and gui_modules.mapdisp.MapFrame.OnZoomMenu().

def gui_modules.gcpmapdisp.MapFrame.OnZoomToMap (   self,
  event 
)

Set display extents to match selected raster (including NULLs) or vector map.

Definition at line 1006 of file gcpmapdisp.py.

def gui_modules.gcpmapdisp.MapFrame.OnZoomToRaster (   self,
  event 
)

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

Definition at line 1013 of file gcpmapdisp.py.

def gui_modules.gcpmapdisp.MapFrame.OnZoomToSaved (   self,
  event 
)

Set display geometry to match extents in saved region file.

Definition at line 1030 of file gcpmapdisp.py.

Referenced by gui_modules.gcpmapdisp.MapFrame.OnZoomMenu(), and gui_modules.mapdisp.MapFrame.OnZoomMenu().

def gui_modules.gcpmapdisp.MapFrame.OnZoomToWind (   self,
  event 
)

Set display geometry to match computational region settings (set with g.region)

Definition at line 1019 of file gcpmapdisp.py.

Referenced by gui_modules.gcpmapdisp.MapFrame.OnZoomMenu(), and gui_modules.mapdisp.MapFrame.OnZoomMenu().

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

Definition at line 927 of file gcpmapdisp.py.

def gui_modules.gcpmapdisp.MapFrame.SaveDisplayRegion (   self,
  event 
)

Save display extents to named region file.

Definition at line 1042 of file gcpmapdisp.py.

Referenced by gui_modules.gcpmapdisp.MapFrame.OnZoomMenu(), and gui_modules.mapdisp.MapFrame.OnZoomMenu().

def gui_modules.gcpmapdisp.MapFrame.SaveToFile (   self,
  event 
)

Save map to image.

Definition at line 884 of file gcpmapdisp.py.

def gui_modules.gcpmapdisp.MapFrame.SetProperties (   self,
  render = False,
  mode = 0,
  showCompExtent = False,
  constrainRes = False,
  projection = False 
)

Set properies of map display window.

Definition at line 1080 of file gcpmapdisp.py.

References gui_modules.gcpmapdisp.MapFrame.StatusbarUpdate(), and gui_modules.gcpmapdisp.MapFrame.statusbarWin.

Referenced by gui_modules.gcpmapdisp.MapFrame.OnZoomMenu().

def gui_modules.gcpmapdisp.MapFrame.StatusbarEnableLongHelp (   self,
  enable = True 
)

Enable/disable toolbars long help.

Definition at line 839 of file gcpmapdisp.py.

def gui_modules.gcpmapdisp.MapFrame.StatusbarReposition (   self)

Reposition checkbox in statusbar.

Definition at line 845 of file gcpmapdisp.py.

References gui_modules.gcpmapdisp.MapFrame.statusbarWin.


Field Documentation

gui_modules.gcpmapdisp.MapFrame.activemap

Definition at line 135 of file gcpmapdisp.py.

gui_modules.gcpmapdisp.MapFrame.decorationDialog

Definition at line 329 of file gcpmapdisp.py.

gui_modules.gcpmapdisp.MapFrame.iconsize
gui_modules.gcpmapdisp.MapFrame.layerbook

Definition at line 91 of file gcpmapdisp.py.

gui_modules.gcpmapdisp.MapFrame.mapScaleValue
gui_modules.gcpmapdisp.MapFrame.ppm

screen X region problem user should specify ppm

Definition at line 700 of file gcpmapdisp.py.

Referenced by gui_modules.gcpmapdisp.MapFrame.OnChangeMapScale(), and gui_modules.mapdisp.MapFrame.OnChangeMapScale().

gui_modules.gcpmapdisp.MapFrame.printopt

Definition at line 307 of file gcpmapdisp.py.

gui_modules.gcpmapdisp.MapFrame.show_target
gui_modules.gcpmapdisp.MapFrame.SrcMap
gui_modules.gcpmapdisp.MapFrame.statusbar

Definition at line 144 of file gcpmapdisp.py.

gui_modules.gcpmapdisp.MapFrame.TgtMap

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