buffer() of multipoint surrounds a single point
Closed this issue · 2 comments
AMBarbosa commented
I expected a buffer()
around a multipoint to surround the entire object, but it seems to refer to just one (and not even a central) point:
lux <- vect(system.file("ex/lux.shp", package="terra"))
multipoint <- aggregate(centroids(lux))
buf <- buffer(multipoint, width = 10000)
plot(multipoint, ext = ext(multipoint) + ext(buf))
plot(buf, add = TRUE)
Is this expected? Cheers!
rhijmans commented
Not expected. It is a bug for lonlat points as it seems to work OK for planar points
crs(multipoint) = "local"
buf <- buffer(multipoint, width = .1)
plot(buf); points(multipoint)
rhijmans commented