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

      ZoomBangla Answer Default Asked on April 17, 2025 in No Category.
      Add Comment
      2 Answers

        The SQL below should work:

        SELECT*FROM Table1 a 
        WHERE(
                  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
              )
        Professor Answered on June 9, 2014.
        Add Comment

        Your Answer

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