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 |
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 |
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 |
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 |
|
|