Closed polygons for queries