Skip to content

Commit

Permalink
using cluster for nearby
Browse files Browse the repository at this point in the history
  • Loading branch information
DiaZork committed Jan 23, 2025
1 parent aa12f09 commit c2dc0cc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/java/eu/ec/doris/kohesio/controller/MapController.java
Original file line number Diff line number Diff line change
Expand Up @@ -336,22 +336,24 @@ private ResponseEntity<JSONObject> handleBoundingBox(

private BoundingBox findBoundingbox(List<double[]> features) {
double maxX = Double.MIN_VALUE;
double maxY = Double.MIN_VALUE;
double minX = Double.MAX_VALUE;
double maxY = Double.MIN_VALUE;
double minY = Double.MAX_VALUE;
for (double[] coords : features) {
if (coords[0] > maxX) {
maxX = coords[0];
} else if (coords[0] < minX) {
}
if (coords[0] < minX) {
minX = coords[0];
}
if (coords[1] > maxY) {
maxY = coords[1];
} else if (coords[1] < minY) {
}
if (coords[1] < minY) {
minY = coords[1];
}
}
return new BoundingBox(minY, minX, minY, maxX);
return new BoundingBox(minY, minX, maxY, maxX);
}

private HashMap<String, JSONObject> findLowerRegionCount(String region, String search, String language, int timeout) throws Exception {
Expand Down

0 comments on commit c2dc0cc

Please sign in to comment.