/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/Model/data.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/Model/data.py

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

revision 1593 by bh, Fri Aug 15 14:10:27 2003 UTC revision 1921 by bh, Mon Nov 3 18:42:27 2003 UTC
# Line 45  RAW_PYTHON = "RAW_PYTHON" Line 45  RAW_PYTHON = "RAW_PYTHON"
45  # raw data.  # raw data.
46  RAW_SHAPEFILE = "RAW_SHAPEFILE"  RAW_SHAPEFILE = "RAW_SHAPEFILE"
47    
48    # Raw data in well-known text format
49    RAW_WKT = "RAW_WKT"
50    
51    
52  class ShapefileShape:  class ShapefileShape:
53    
# Line 203  class ShapefileStore: Line 206  class ShapefileStore:
206          form (minx, miny, maxx, maxy) in the coordinate system of the          form (minx, miny, maxx, maxy) in the coordinate system of the
207          shape store.          shape store.
208          """          """
209            # Bind a few globals to locals to make it a bit faster
210            cls = ShapefileShape
211            shapefile = self.shapefile
212    
213          left, bottom, right, top = bbox          left, bottom, right, top = bbox
214          for i in self.shapetree.find_shapes((left, bottom), (right, top)):          for i in self.shapetree.find_shapes((left, bottom), (right, top)):
215              yield ShapefileShape(self.shapefile, i)              yield cls(shapefile, i)
216    
217      def AllShapes(self):      def AllShapes(self):
218          """Return an iterable over the shapes in the shape store."""          """Return an iterable over the shapes in the shape store."""

Legend:
Removed from v.1593  
changed lines
  Added in v.1921

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26