Mike M. answered 10/18/25
Data Scientist | 20+ Yrs in ML, Python, SQL, and Real-World Modeling
Yes—use a distance-based join instead of exact intersection. Such as the following:
SELECT a.*, b.id AS b_id,
ST_Distance(a.the_geom::geography, b.the_geom::geography) AS dist_m
FROM a
JOIN b
ON ST_DWithin(a.the_geom::geography, b.the_geom::geography, 20); -- 20 m tolerance