Michael Entin
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.

--

--

Michael Entin
Michael Entin

Written by Michael Entin

Hi, I'm TL of BigQuery Geospatial project. Posting small recipes and various notes for BQ Geospatial users.

No responses yet