I have table with Polygon
geometries. I'd like to filter the table to include rows that are at a certain distance from a Point
coordinate.
Here's a fiddle link for table schema, data etc.
https://dbfiddle.uk/?rdbms=mysql_8.0&fiddle=2c3c5863af9fe855491e4ef71f21a64b
Filter query based on proximity and distance.
select *
from geo
where st_distance(geometry, Point({lat},{lng})) <= {dist};
Basically, I'd to calculate the distance between a Polygon
and Point
and filter rows. Time it takes the query to run matters, so I am looking for a time-efficient solution.
st_distance
calculate the distance between apolygon
andpoint
geometries? The so link is for calc. dist betweenpoints
.