Skip to content

Commit

Permalink
Fix for project's area / center
Browse files Browse the repository at this point in the history
  • Loading branch information
emi420 committed Dec 14, 2023
1 parent 9cb3dff commit 5ca8a63
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions frontend/src/views/projectLiveMonitoring.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,18 @@ export function ProjectLiveMonitoring() {
const bbox = [
[project.aoiBBOX[0], project.aoiBBOX[1]],
[project.aoiBBOX[0], project.aoiBBOX[3]],
[project.aoiBBOX[1], project.aoiBBOX[3]],
[project.aoiBBOX[1], project.aoiBBOX[1]],
[project.aoiBBOX[2], project.aoiBBOX[3]],
[project.aoiBBOX[2], project.aoiBBOX[1]],
[project.aoiBBOX[0], project.aoiBBOX[1]],
]
setCoords(centroid({
type: "MultiPolygon",
coordinates: [[bbox]]
}).geometry.coordinates.reverse());
}).geometry.coordinates);
console.log(centroid({
type: "MultiPolygon",
coordinates: [[bbox]]
}))
setAreaOfInterest([
bbox[0].join(" "),
bbox[1].join(" "),
Expand Down

0 comments on commit 5ca8a63

Please sign in to comment.