I have a set of 10 query points and I want to know how many of them are with distance within at most 4 meters of any LineString in a given table.
Note that if a point is within 4 meter distance to multiple LineString, this should only be counted once.
I understand how I can use
ST_DWithin to do the proximity checking of a query point to the LineStirng, but I am not sure as how to write an efficient SQL query to get the desired answer.
For now I can only think of 10 separate SQL statements, each either returning 0 or 1 but that is highly inefficient.
This is a clearer/cleaner version of my previous question: Preprocess OSM streets to see if query points fall "on" them