searchcoordinatesgeospatialspatial-index

Geospatial search: varying radius receptors and fixed event point


Therms of the problem:

I want to calculate in linear time all the receptors having a reception area which includes the event point.

Since clustering seems a solution, I would to like to know how various solution like, MongoDB GeoSpatial, Postgres GIS, MySQL Geospatial and other DBMS handle this problem.

Do them use clustering internally?

In any case: Which is the best "out of the box" solution for this problem?


Solution

  • The answer to your 'what is the best solution?' question is "It depends".

    For SQL Server, a good overview of the spatial data features is https://msdn.microsoft.com/en-us/library/bb933790.aspx

    And relevant to your question is spatial indexes: https://msdn.microsoft.com/en-us/library/bb895265.aspx

    For the example given, a rough idea is to store a geography type for your Receptors and EventPoint then use the STContains function in the where clause. https://msdn.microsoft.com/en-us/library/ff929274.aspx

    Some pseudo-SQL might be:

    DECLARE EventPoint Geography = ...
    SELECT * FROM Receptors R WHERE R.Receptor.STContains(EventPoint)
    

    Hope this is of use.