Make an invalid geometry valid
lwgeom_make_valid(x)
x
object of class sfc
sfc
Bindings to Selected 'liblwgeom' Functions for Simple Features
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.