Skip to content

Commit

Permalink
removed cluster and getBoundingBox references
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielJDufour committed Jun 17, 2023
1 parent 261a856 commit 04c96fa
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions src/utils/utils.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,33 +40,6 @@ function runOnTableOfValues(table, noDataValue, runOnValues) {
}
}

function getBoundingBox(geometry) {
const [xmin, ymin, xmax, ymax] = calcBoundingBox(geometry);
return { xmin, ymin, xmax, ymax };
}

function cluster(items, newClusterTest) {
try {
const numberOfItems = items.length;
const clusters = [];
let cluster = [];
for (let i = 0; i < numberOfItems; i++) {
const item = items[i];
cluster.push(item);
if (newClusterTest(item)) {
clusters.push(cluster);
cluster = [];
}
}

if (cluster.length > 0) clusters.push(cluster);

return clusters;
} catch (error) {
console.error("[cluster]:", error);
}
}

const utils = {
// This function takes in an array with an even number of elements and
// returns an array that couples every two consecutive elements;
Expand Down Expand Up @@ -319,8 +292,6 @@ const utils = {

fetchJsons,

getBoundingBox,

// function to convert two points into a
// representation of a line
getLineFromPoints(startPoint, endPoint) {
Expand Down Expand Up @@ -377,8 +348,6 @@ const utils = {
}
},

cluster,

sum(values) {
return values.reduce((a, b) => a + b);
},
Expand Down

0 comments on commit 04c96fa

Please sign in to comment.