176 |
maxdepth) |
maxdepth) |
177 |
if self.__classification is not None: |
if self.__classification is not None: |
178 |
fieldname = self.__classification.GetField() |
fieldname = self.__classification.GetField() |
179 |
if not self.store.Table().field_info_by_name(fieldname): |
if fieldname is not None and \ |
180 |
|
not self.store.Table().field_info_by_name(fieldname): |
181 |
self.SetClassification(None) |
self.SetClassification(None) |
182 |
self.changed(LAYER_CHANGED, self) |
self.changed(LAYER_CHANGED, self) |
183 |
|
|
245 |
def ShapesInRegion(self, box): |
def ShapesInRegion(self, box): |
246 |
"""Return the ids of the shapes that overlap the box. |
"""Return the ids of the shapes that overlap the box. |
247 |
|
|
248 |
Box is a tuple (left, bottom, right, top) in the coordinate |
Box is a tuple (left, bottom, right, top) in unprojected coordinates. |
|
system used by the layer's shapefile. |
|
249 |
""" |
""" |
250 |
left, bottom, right, top = box |
left, bottom, right, top = box |
251 |
|
|
252 |
|
if self.projection is not None: |
253 |
|
left, bottom = self.projection.Forward(left, bottom) |
254 |
|
right, top = self.projection.Forward(right, top) |
255 |
|
|
256 |
return self.shapetree.find_shapes((left, bottom), (right, top)) |
return self.shapetree.find_shapes((left, bottom), (right, top)) |
257 |
|
|
258 |
def GetProjection(self): |
def GetProjection(self): |