developmentseed / pearl-frontend

PEARL (Planetary Computer Land Cover Mapping) Frontend
https://landcover.io
MIT License
18 stars 6 forks source link

Include minimum size for upload, reorder aoi limit checks #150

Closed LanesGood closed 6 months ago

LanesGood commented 6 months ago

This PR:

LanesGood commented 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;
vgeorge commented 6 months ago

@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:

geojson-samples.zip

LanesGood commented 6 months ago

@vgeorge thanks for the changes and the well-labeled sample files. Everything is working well! I'm going to merge.