16
16
@ Singleton
17
17
public class CacheController {
18
18
19
- private final GpsCategoryModel gpsCategoryModel ;
20
19
private final QuadTree <List <String >> quadTree ;
21
20
private double x , y ;
22
21
private double xMinus , xPlus , yMinus , yPlus ;
23
22
24
23
private static final int EARTH_RADIUS = 6378137 ;
25
24
26
25
@ Inject
27
- CacheController (GpsCategoryModel gpsCategoryModel ) {
28
- this .gpsCategoryModel = gpsCategoryModel ;
26
+ CacheController () {
29
27
quadTree = new QuadTree <>(-180 , -90 , +180 , +90 );
30
28
}
31
29
@@ -36,17 +34,6 @@ public void setQtPoint(double decLongitude, double decLatitude) {
36
34
Timber .d ("X (longitude) value: %f, Y (latitude) value: %f" , x , y );
37
35
}
38
36
39
- public void cacheCategory () {
40
- List <String > pointCatList = new ArrayList <>();
41
- if (gpsCategoryModel .getGpsCatExists ()) {
42
- pointCatList .addAll (gpsCategoryModel .getCategoryList ());
43
- Timber .d ("Categories being cached: %s" , pointCatList );
44
- } else {
45
- Timber .d ("No categories found, so no categories cached" );
46
- }
47
- quadTree .set (x , y , pointCatList );
48
- }
49
-
50
37
public List <String > findCategory () {
51
38
Point <List <String >>[] pointsFound ;
52
39
//Convert decLatitude and decLongitude to a coordinate offset range
0 commit comments