Updating EOPatch without loading entire content

Hello

I know you can use the features flag in LoadTask to load only the featuretyeps you are interested in, but when you save using SaveTask it deletes the content that was not loaded.

Is it possible to overcome this?
So that if I want to do a vector manipulation I don’t have to load all the bands and indices.

Maybe make a new copy with the same grid of eopatches and then merge them- can I merge a dateless eopatch with an eopatch that does have dates information?

Tnx

Hi @tonish,

It is possible. You can select a type of overwrite with a parameter overwrite_permission. There are 3 different options, which are documented in the documentation. I assume that you are using OverwritePermission.OVERWRITE_PATCH but you should use OverwritePermission.OVERWRITE_FEATURES. This will only overwrite features that you are saving and keep any other previously existing features on disk intact.

1 Like

Thanks! I missed that.

While on the subject, is it possible to load only 2 bands from an eopatch instead of all the bands?
For example, if I have 5 bands in my featuretype data but I want to load only 2 to create a normalized index.

While on the subject, is it possible to load only 2 bands from an eopatch instead of all the bands?
For example, if I have 5 bands in my featuretype data but I want to load only 2 to create a normalized index.

Currently eo-learn loading functionalities don’t support that. But because features are stored in simple numpy files you can implement your own loading. The loading function numpy.load has mmap_mode parameter which can be used to achieve exactly what you describe.

1 Like