/[thuban]/branches/WIP-pyshapelib-bramz/Extensions/wms/wms.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Extensions/wms/wms.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/thuban/Extensions/wms/wms.py revision 2361 by joey, Fri Oct 1 17:54:13 2004 UTC branches/WIP-pyshapelib-bramz/Extensions/wms/wms.py revision 2734 by bramz, Thu Mar 1 12:42:59 2007 UTC
# Line 1  Line 1 
1  # Copyright (C) 2003, 2004 by Intevation GmbH  # Copyright (C) 2003, 2004 by Intevation GmbH
2  # Authors:  # Authors:
3  # Jan-Oliver Wagner <[email protected]>  # Jan-Oliver Wagner <[email protected]> (2003, 2004)
4    # Bernhard Herzog <[email protected]> (2004)
5    # Martin Schulze <[email protected]> (2004)
6  #  #
7  # This program is free software under the GPL (>=v2)  # This program is free software under the GPL (>=v2)
8  # Read the file COPYING coming with Thuban for details.  # Read the file COPYING coming with Thuban for details.
# Line 31  from Thuban.UI.command import registry, Line 33  from Thuban.UI.command import registry,
33  from Thuban.UI.mainwindow import main_menu, layer_properties_dialogs  from Thuban.UI.mainwindow import main_menu, layer_properties_dialogs
34  from Thuban import _  from Thuban import _
35  import Thuban.UI.baserenderer  import Thuban.UI.baserenderer
 from Thuban.UI.extensionregistry import ExtensionDesc, ext_registry  
36    
37  from layer import WMSLayer  from layer import WMSLayer
38    
 ext_registry.add(ExtensionDesc(  
     name = 'WMS',  
     version = '0.1.0',  
     authors= [ 'Jan-Oliver Wagner' ],  
     copyright = '2003, 2004 Intevation GmbH',  
     desc = _("Provide layers via OGC WMS.")))  
   
39    
40  class WMSExtension(Extension):  class WMSExtension(Extension):
41      def TreeInfo(self):      def TreeInfo(self):
# Line 60  def render_wms_layer(renderer, layer): Line 54  def render_wms_layer(renderer, layer):
54      ymax = (offy - 0) / scale      ymax = (offy - 0) / scale
55    
56      img, format = layer.GetMapImg(width, height, (xmin, ymin, xmax, ymax))      img, format = layer.GetMapImg(width, height, (xmin, ymin, xmax, ymax))
57      renderer.draw_raster_data(img, format)  
58        data = (width, height, (img, None, None))
59    
60        renderer.draw_raster_data(layer, 0,0, data, format)
61    
62      return ()      return ()
63    

Legend:
Removed from v.2361  
changed lines
  Added in v.2734

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26