I am struggling with a semi-efficient way to do the following. Ideally through MySQL.
Each search that is performed for this system includes a geo coordinate and a range for that individual. (So essentially a radius and center point).
I want to be able to do a search for another coordinate, and get back a count of how many of those searches included that area.
What is the best way to store the data to make this possible? And how would I structure a query to get that result?
Example:
DATA
Search 1 [-56.1, 43.2], 100 mile radius
Search 2 [-78.23, 45.1], 250 mile radius
Search 3 [-80.1, 44], 10 mile radius
Search 4 [-81.2, 44.4], 50 mile radius
How many searches covered point [-80.1, 44]