Update SetPolygons to deal with points and lines