4

I would like to open a shapefile(shp) without loading the attributes(dbf), as I do not care about attributes and it takes about 25 minutes to load them. I am using Python Geopandas, so any Fiona or Osgeo solution is useful.

I want the results from below code, but not the waiting time!

geometry = GeoDataFrame.from_file('easyshapes_bigattributes.shp').geometry

4
  • You could just temporarily rename the .dbf file, so it will not be recognised as part of the shapefile, and therefore will not be loaded
    – Matt
    Commented Jun 8, 2016 at 13:28
  • awesome. works like a charm Commented Jun 8, 2016 at 13:42
  • Easy as long as you don't have loads of shapefiles!
    – Matt
    Commented Jun 8, 2016 at 13:44
  • I will rename the file with python :) Commented Jun 8, 2016 at 13:49

1 Answer 1

6

As in my comment, simply rename the .dbf file, so it will not be recognised as part of the shapefile, and therefore will not be loaded.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.