Open pascaloettli opened 6 years ago
I think this is the same issue I am having.
Thx for the feedback. I think I identified the issue; there's some sub-optimal logic involved if you're intersecting a very large raster with a small polygon collection. For the time being, check whether the legacy = TRUE
option helps you out (which prompts velox to use 0.1.0 code). I'll have a go at the main issue in the mean time.
Thanks hunzikp. I have really liked the performance gains I've gotten from velox since using it before it was on cran, I'm just glad I figured out to get them back again! Cheers.
@hunzikp Yes, using legacy = TRUE
helps for now. Thank you for the suggestion.
Hello,
While recently re-running a script utilizing the incredible power of
velox
, I noticed a dramatic slow down in the execution of this script. It appears that in-between the packagevelox
has been update from version0.1.0
to0.2.0
.Basically, the script takes a raster of Digital Elevation Model (DEM) in GeoTIFF format and extract the mean elevation in 9 squared windows around stations. As a result, a matrix of Nx9 mean elevations.
Please find below an simple example summarizing the problem. I hope it might help you to solve this issue.
velox
version0.1.0
The extraction of 9 polygons takes ~40ms to run.
velox
version0.2.0
The extraction of 9 polygons takes ~16000ms to run, due to
boost
,boost.VeloxRaster
,boostFactory$makePointGrid
and.External
taking long time to run.