Skip to content
Prev 24340 / 29559 Next

best practice for reading large shapefiles?

On 26/04/16 22:33, Vinh Nguyen wrote:
Roger said the bottleneck would most likely still occur, but couldn't
make much of a recommendation because you had not revealed the purpose
of reading this data in R.
Messages that certain things do not work are often helpful, leading to
improvement in the software. With your report, however, we can't do
really much.
Using PostGIS for this use case may make sense, since PostGIS creates
and stores spatial indexes with its geometry data, and does everything
in database, rather than in memory. In R, you'd probably do
intersections with rgeos::gIntersects, which creates a spatial index on
the fly but doesn't store this index. Only experimentation can tell you
the magnitude of this difference.
(see my 2nd comment)

Best regards,