--- android/TrainInfoService/src/dk/thoerup/traininfoservice/StationDAO.java 2010/06/27 15:48:24 927 +++ android/TrainInfoService/src/dk/thoerup/traininfoservice/StationDAO.java 2010/06/27 16:55:36 928 @@ -106,8 +106,8 @@ return result; } - //the "hack" with max 0.5 degrees latitude and 0.9 degrees longitude is only valid since we only service danish trains, - // in denmark 0.5dg latitude ~ 55km, 0.9dg longitude ~ 57km + //the "hack" with max 0.4 degrees latitude and 0.75 degrees longitude is only valid since we only service danish trains, + // in denmark 0.4dg latitude ~ 44km, 0.75dg longitude ~ 47km // the ultra fast method (and only slightly inaccurate as long as we only cover a limited geographically area) // is using an aproximation of the length of 1 latitude degree and 1 longitude degree and just use pythagoras to @@ -116,7 +116,7 @@ public List getByLocationWorker(double latitude, double longitude, boolean geolimit) throws SQLException { - String limitExpression = geolimit == true ? "AND abs(latitude-?)<0.5 AND abs(longitude-?)<0.9 " : ""; + String limitExpression = geolimit == true ? "AND abs(latitude-?)<0.4 AND abs(longitude-?)<0.75 " : ""; String SQL = "SELECT id,name,latitude,longitude,stationcode_fjrn,stationcode_stog, stationcode_metro, address, " + "earth_distance( earth_coord, ll_to_earth(?,?))::int AS calcdist " +