RE: Select coordinates which fall within a radius of a central point?

      dakachi Default Asked on January 17, 2021 in No Category.
      Add Comment
      2 Answers

        The SQL below should work:

        SELECT*FROM Table1 a 
                  acos(sin(a.Latitude *0.0175)* sin(YOUR_LATITUDE_X *0.0175)+ cos(a.Latitude *0.0175)* cos(YOUR_LATITUDE_X *0.0175)*    
                         cos((YOUR_LONGITUDE_Y *0.0175)-(a.Longitude *0.0175)))*3959<= YOUR_RADIUS_INMILES
        Default Answered on June 9, 2014.
        Add Comment

        Your Answer

        By posting your answer, you agree to the privacy policy and terms of service.