Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Processing time for large Sentinel-2 images #20

Closed
nklaudy opened this issue Aug 4, 2023 · 2 comments
Closed

Processing time for large Sentinel-2 images #20

nklaudy opened this issue Aug 4, 2023 · 2 comments

Comments

@nklaudy
Copy link

nklaudy commented Aug 4, 2023

Hello,

I am working with tile-sized Sentinel-2 images that are around 1.7Gb in size (GeoTIFF format). I proceeded according to the tutorial and got to the PCA and dimensionality reduction section, then ran the perform_PCA function. This has now been running for the last 6 hours and is still on the part [1] "Extract pixels from the images to perform PCA on a subset". As I have only little experience with large remote sensed images, I was wondering if this is an acceptable amount of time or if I may have done something wrong?

I hope that this is the right place to ask this!

Thanks in advance,
Nikolas

@jbferet
Copy link
Owner

jbferet commented Aug 7, 2023

Dear Nikolas,
it seems that you may have a problem with the processing, as this step should not take hours.
you should have a header file associated with your image, in order to provide information on the spectral bands. It seems that the incomplete description of image metadata associated with tiff files is often the cause of difficulties to process images with biodivMapR.
I would suggest that you convert your TIFF image using the ENVI driver with gdal (using R packages such as raster, terra or stars), and that you make sure that the header file produced with this ENVI conversion includes the 'wavelength' attribute as in the following template:
https://github.com/jbferet/biodivMapR/blob/master/inst/extdata/HDR/SENTINEL_2.hdr

It is possible to use your tiff image directly if you produce a proper header file, but you need to make sure it is correctly documented. I will try to fix the issue related to tiff images in a next version.

best regards,
Jean-Baptiste

@nklaudy
Copy link
Author

nklaudy commented Aug 8, 2023

Dear Jean-Baptiste,

Thank you for the answer, I decided to download the data again, now in ENVI format and everything ran smoothly.

Thanks for the help and kind regards,
Nikolas

@nklaudy nklaudy closed this as completed Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants