function updateScores(featureCollection) {
featureCollection.features.forEach((feature) => {
const P_D = turf.length(turf.polygonToLine(feature)) * 1000;
const A_D = turf.area(feature);
feature.properties.score =
1 / (P_D / (2 * Math.PI * Math.sqrt(A_D / Math.PI)));
feature.properties.roundedScore = feature.properties.score.toFixed(2);
});
return featureCollection;
}