/[thuban]/trunk/thuban/Thuban/Model/layer.py
ViewVC logotype

Diff of /trunk/thuban/Thuban/Model/layer.py

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

revision 723 by bh, Thu Apr 24 15:31:53 2003 UTC revision 771 by jonathan, Tue Apr 29 14:34:02 2003 UTC
# Line 66  class BaseLayer(TitledObject, Modifiable Line 66  class BaseLayer(TitledObject, Modifiable
66    
67      """Base class for the layers."""      """Base class for the layers."""
68    
69      def __init__(self, title, visible = 1):      def __init__(self, title, visible = True):
70          """Initialize the layer.          """Initialize the layer.
71    
72          title -- the title          title -- the title
# Line 106  class Layer(BaseLayer): Line 106  class Layer(BaseLayer):
106                   fill = Color.Transparent,                   fill = Color.Transparent,
107                   stroke = Color.Black,                   stroke = Color.Black,
108                   lineWidth = 1,                   lineWidth = 1,
109                   visible = 1):                   visible = True):
110          """Initialize the layer.          """Initialize the layer.
111    
112          title -- the title          title -- the title
# Line 250  class Layer(BaseLayer): Line 250  class Layer(BaseLayer):
250          left, bottom, right, top = box          left, bottom, right, top = box
251          return self.shapetree.find_shapes((left, bottom), (right, top))          return self.shapetree.find_shapes((left, bottom), (right, top))
252    
253        def GetProjection(self):
254            return self.projection
255    
256      def SetProjection(self, projection):      def SetProjection(self, projection):
257          """Set the layer's projection"""          """Set the layer's projection"""
258          self.projection = projection          self.projection = projection
# Line 305  class Layer(BaseLayer): Line 308  class Layer(BaseLayer):
308              items.append(_("Extent (lat-lon):"))              items.append(_("Extent (lat-lon):"))
309          items.append(_("Shapetype: %s") % shapetype_names[self.ShapeType()])          items.append(_("Shapetype: %s") % shapetype_names[self.ShapeType()])
310    
311            if self.projection and len(self.projection.params) > 0:
312                items.append((_("Projection"),
313                            [str(param) for param in self.projection.params]))
314    
315          items.append(self.__classification)          items.append(self.__classification)
316    
317          return (_("Layer '%s'") % self.Title(), items)          return (_("Layer '%s'") % self.Title(), items)
318    
319    

Legend:
Removed from v.723  
changed lines
  Added in v.771

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26