-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
st_intersect faster than geos_intersects_matrix() #66
Comments
Shouldn't you use a planar CRS (eg 2263)? It looks like the difference is even greater then.
I'm also not sure that system.time(trips.dt2 <- as_geos_strtree(trips.dt[, o_geom]))
#> user system elapsed
#> 4.88 0.02 4.89
system.time(geos_intersects_matrix(zones.dt[, geom], trips.dt2))
#> user system elapsed
#> 0.14 0.00 0.14 |
Thanks for this! I'm 99% certain that the difference is because of how accumulating potentially matching features (based on bbox) is implemented (in sf it's |
As per @paleolimbot 's suggestion, here is a reprex of a benchmark comparing spatial intersects with
sf
vsgeos
.st_intersects
does seem faster thangeos_intersects_matrix()
at the moment.Created on 2022-02-15 by the reprex package (v2.0.1)
The text was updated successfully, but these errors were encountered: