fast retrieval of SELECT statement with GPS coordinates in MySQL
问题 I have a table in MySQL db which two of it's columns are the latitude and the longitude of a given geo-point. it's defined as Float(2,6). I want to select only the records within a specific radius from a given point. I found the following code in Java, that checks the distance between to geo-points: public class Location { private int latitudeE6; private int longitudeE6; ... } public static double CalculateDistance(Location StartP, Location EndP) { double lat1 = StartP.getLatitudeE6()/1E6;