as.polygons function

Convert a raster to a polygons vector