Skip to content

[Dependency: Quadtree] Remove unused code from cache controller #3163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,14 @@
@Singleton
public class CacheController {

private final GpsCategoryModel gpsCategoryModel;
private final QuadTree<List<String>> quadTree;
private double x, y;
private double xMinus, xPlus, yMinus, yPlus;

private static final int EARTH_RADIUS = 6378137;

@Inject
CacheController(GpsCategoryModel gpsCategoryModel) {
this.gpsCategoryModel = gpsCategoryModel;
CacheController() {
quadTree = new QuadTree<>(-180, -90, +180, +90);
}

Expand All @@ -36,17 +34,6 @@ public void setQtPoint(double decLongitude, double decLatitude) {
Timber.d("X (longitude) value: %f, Y (latitude) value: %f", x, y);
}

public void cacheCategory() {
List<String> pointCatList = new ArrayList<>();
if (gpsCategoryModel.getGpsCatExists()) {
pointCatList.addAll(gpsCategoryModel.getCategoryList());
Timber.d("Categories being cached: %s", pointCatList);
} else {
Timber.d("No categories found, so no categories cached");
}
quadTree.set(x, y, pointCatList);
}

public List<String> findCategory() {
Point<List<String>>[] pointsFound;
//Convert decLatitude and decLongitude to a coordinate offset range
Expand Down