Converting shapefile data to polygons