Given a set of lines I want to filter lines based on their distances to different points. Since there can be potentially many lines, I don't want to calculate the distance between a given point and each line. I'd prefer to somehow filter out those lines that are far away anyway. I thought about using a quadtree which is good to prefilter nearby points to a given point. However it seems inconvinient to build a quadtree containing lines since every leaf in the tree has to contain all lines that cut the leaf's corresponding quad in the plane. Have some of you had a similar problem? Do you know common solutions for similar problems?
Thanks in advance!