Feb 3, 2021
Don’t take centroid in this case, just ST_DWithin(line, point, distance)
is probably more correct here. In this case it computes shortest distance between the point and location on the line closest to that point.
Using centroids has different semantics and might give incorrect result here.