14 |
private static final long serialVersionUID = 1L; |
private static final long serialVersionUID = 1L; |
15 |
|
|
16 |
//South-West corner= 54.0, 7.0 |
//South-West corner= 54.0, 7.0 |
17 |
//North-East corner= 58.0, 16.0 |
//North-East corner= 58.0, 13.0 |
18 |
//Latitude span=4.0 |
//Latitude span=4.0 |
19 |
//Longitude span=9.0 |
//Longitude span=6.0 |
20 |
void testFindNearest(int count) throws SQLException { |
void testFindNearest(int count) throws SQLException { |
21 |
Random r = new Random(); |
Random r = new Random(); |
22 |
|
|
25 |
|
|
26 |
for (int i=0; i<count; i++) { |
for (int i=0; i<count; i++) { |
27 |
float lat = (r.nextFloat()*4.0F) + 54.0F; |
float lat = (r.nextFloat()*4.0F) + 54.0F; |
28 |
float lng = (r.nextFloat()*9.0F) + 7.0F; |
float lng = (r.nextFloat()*6.0F) + 7.0F; |
29 |
db.getByLocation(lat, lng); |
db.getByLocation(lat, lng); |
30 |
} |
} |
31 |
|
|