Closed LanesGood closed 6 months ago
@vgeorge do you think these guards should also be above the uploaded area checks? Currently they follow the area checks:
else if (geojson.features.length > 1) {
setWarning(`GeoJSON file must contain a single feature.`);
return;
} else if (!geojsonValidation.isPolygon(aoiGeometry)) {
setWarning(
`GeoJSON file must contain a feature of type 'Polygon' (MultiPolygon and other types are not supported).`
);
return;
@LanesGood I believe it is ok to leave where it is for the moment, it will surface at some point. I think the best solution would be to list all the observable errors to the user to avoid back and forth, but this looks like an enhancement. Can you please check if my changes work? Here are the files I used:
@vgeorge thanks for the changes and the well-labeled sample files. Everything is working well! I'm going to merge.
This PR: