consider both lines & polygons nearby