Extracting boundaries and creating polygons. Another way.