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

  • 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 Jun 8 '16 at 13:28
  • awesome. works like a charm – Laurens Koppenol Jun 8 '16 at 13:42
  • Easy as long as you don't have loads of shapefiles! – Matt Jun 8 '16 at 13:44
  • I will rename the file with python :) – Laurens Koppenol Jun 8 '16 at 13:49
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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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