Commits

Josh Livni  committed cac7ed9

cleanup

  • Participants
  • Parent commits 152fde6

Comments (0)

Files changed (1)

File shapes/forms.py

                 shapefiles.append(shapefile)
                 print 's',shapefiles
 
+        # get the datasource name without extension
+        ds_name = os.path.splitext(zfile.namelist()[0])[0]
+        print 'ds',ds_name
+
         # ogr needs the full path to the unpacked 'file.shp'
-        ds = gdal.DataSource(shapefile)
+        ds = gdal.DataSource('%s%s%s.shp' % (tmp_dir,os.path.sep,ds_name))
+        print 'x - %s%s%s.shp' % (tmp_dir,os.path.sep,ds_name)
 
         # shapefiles have just one layer, so grab the first...
         layer = ds[0]