pramitghosh / sameSVD

(Self-)similarity and (self-)affinity measures for spatial vector data
https://pramitghosh.github.io/sameSVD/
MIT License
0 stars 0 forks source link

bcd() fails for POINT features #7

Open pramitghosh opened 4 years ago

pramitghosh commented 4 years ago

bcd() fails for sf obj with POINT geometry containing a single feature. Running

p = st_sf(st_sfc(st_point(c(0,0))))
bcd(p)

throws

Error in FUN(X[[i]], ...) : !anyNA(x) is not TRUE

Reason: overlay_grid() is not able to produce the required grid successfully using sf::st_make_grid(). Would be helpful if st_make_grid() returns NULL (or does something else) instead of throwing an error.