mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Tidied CacheController code
This commit is contained in:
parent
33ec4e50f3
commit
1efc6e38ed
1 changed files with 2 additions and 8 deletions
|
|
@ -10,9 +10,7 @@ import fr.free.nrw.commons.upload.MwVolleyApi;
|
|||
|
||||
public class CacheController {
|
||||
|
||||
private Context context;
|
||||
private double x;
|
||||
private double y;
|
||||
private double x, y;
|
||||
private QuadTree quadTree;
|
||||
private Point[] pointsFound;
|
||||
private double xMinus, xPlus, yMinus, yPlus;
|
||||
|
|
@ -21,7 +19,6 @@ public class CacheController {
|
|||
quadTree = new QuadTree(-180, -90, +180, +90);
|
||||
}
|
||||
|
||||
|
||||
public void setQtPoint(double decLongitude, double decLatitude) {
|
||||
x = decLongitude;
|
||||
y = decLatitude;
|
||||
|
|
@ -29,7 +26,6 @@ public class CacheController {
|
|||
Log.d("Cache", "X (longitude) value: " + x + ", Y (latitude) value: " + y);
|
||||
}
|
||||
|
||||
|
||||
public void cacheCategory() {
|
||||
|
||||
List<String> pointCatList = new ArrayList<String>();
|
||||
|
|
@ -76,11 +72,9 @@ public class CacheController {
|
|||
|
||||
//Earth’s radius, sphere
|
||||
double radius=6378137;
|
||||
|
||||
//offsets in meters
|
||||
double offset = 100;
|
||||
|
||||
|
||||
//Coordinate offsets in radians
|
||||
double dLat = offset/radius;
|
||||
double dLon = offset/(radius*Math.cos(Math.PI*lat/180));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue