Data Mask in eoLearn-slovenia Land Cover Classification script


we want in the LC-Classification-Script only working and downloading for special areas like agricultural areas, to avoid unnecessary calculations and downloads. Is it possible to integrate in the eolearn-moduls a mask for a working-area?
Or can we use our polygon-Layer agricultural areas instead of the country_shape (slovenia.json-file) as input-data. We have >100.000 polygons agricultural areas.
Thank you in advance.


Hi Kevin!

I would need a bit more information to make sure I give the best advice, since you are focusing on agricultural land only, I’m guessing you’re not doing land-cover but some other usecase and the approach shown in this notebook might not be the most suitable one for you.

It i possible to provide the polygon-layer instead of the country shape and the eopatches will then cover only areas where there is some polygons intersecting the bboxes. If bboxes have too much empty space, you can even decrease the size of the bbox to fit them better to the distribution of polygons.

I would point you to this location in the examples where you can see a similar thing being done, which is also used in the eo-learn LC example:

Let us know if this helps or if you need further assistance!

Kind regards,

HI Matic,

thank you for your reply. We will try it with agricultural areas as country-layer.

We want to detect agricultural areas with artifical cover like plastic foil, and others. So we have only 2 or 3 classes. We want to download and calculate minimal data because we only want to classify agricultural areas. The investigation area is 21.000 km2.

Kind regards,

Yes, then such an approach with eolearn makes sense :slight_smile: Good luck!

Hello Matic,
can you help us with this error:


From what I can see, it seems that the test labels contain a label which was not seen during training. In particular, this refers to label 1388