feature/jaeyoung #46

Merged
LEE_JAEYOUNG merged 58 commits from feature/jaeyoung into dev 2025-05-21 13:53:44 +09:00
Showing only changes of commit 976396cd78 - Show all commits

View File

@ -304,9 +304,19 @@ export function removeDuplicatePolygons(polygons) {
}
})
uniquePolygons = uniquePolygons.filter((polygon) => {
return isValidPoints(polygon)
})
//uniquePolygons중 isValidPoints의 조건을 만족하는 카운트 계산
const validCount = uniquePolygons.reduce((acc, polygon) => {
if (!isValidPoints(polygon)) {
return acc + 1
}
return acc
}, 0)
if (validCount > 1) {
uniquePolygons = uniquePolygons.filter((polygon) => {
return isValidPoints(polygon)
})
}
return uniquePolygons
}