shawnlaffan / biodiverse

A tool for the spatial analysis of diversity
http://shawnlaffan.github.io/biodiverse/
GNU General Public License v3.0
74 stars 19 forks source link

Basedata: use GetFeatureCount in shapefile imports #885

Closed shawnlaffan closed 10 months ago

shawnlaffan commented 10 months ago

The progress dialogue in the shapefile imports calculates the number of features by iterating over the entire data set. This slows down the import of large data sets since we double iterate.

This approach is a leftover from when GDAL did not support this method for shapefiles, instead returning -1.

Support in GDAL was added some time ago so we should start using it.