/[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 1921 by bh, Mon Nov 3 18:42:27 2003 UTC revision 1972 by bh, Mon Nov 24 19:23:08 2003 UTC
# Line 124  class ShapefileStore: Line 124  class ShapefileStore:
124          # safer to always work with absolute paths.          # safer to always work with absolute paths.
125          self.filename = os.path.abspath(filename)          self.filename = os.path.abspath(filename)
126    
         self.shapefile = shapelib.ShapeFile(self.filename)  
127          self.dbftable = table.DBFTable(filename)          self.dbftable = table.DBFTable(filename)
128          self.table = ShapeTable(self, session.TransientDB(), self.dbftable)          self.table = ShapeTable(self, session.TransientDB(), self.dbftable)
129            self._open_shapefile()
130    
131        def _open_shapefile(self):
132            self.shapefile = shapelib.ShapeFile(self.filename)
133          self.numshapes, shapetype, mins, maxs = self.shapefile.info()          self.numshapes, shapetype, mins, maxs = self.shapefile.info()
134          if self.numshapes:          if self.numshapes:
135              self.bbox = mins[:2] + maxs[:2]              self.bbox = mins[:2] + maxs[:2]

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26