Skip to content
Prev 24339 / 29559 Next

best practice for reading large shapefiles?

So the trick I use is to load vector data into PostGIS or Spatialite.
Then do basic spatial filtering with queries in those DB (SQL). Once
I've subset and manipulated what I want, either create a new Table or
View with the results. Then read those results in R.

The bottleneck you have is likely the reading of everything into memory
in R, which usually takes more memory than the original file size. So
changing sources won't help, only subsetting prior to loading will help.

Enjoy,
Alex
On 04/26/2016 03:24 PM, Chris Reudenbach wrote: