Closed micha-silver closed 4 years ago
The content of zip files is automatically scanned recursively (if unroll_archives = TRUE
), i.e. it will find the .jp2 files in subdirectories. So, instead of the .SAFE directory, you need to pass the paths to the .jp2 files directly, e.g. by replacing the first line with:
S2_SAFE_list = list.files(path = S2_download_dir, pattern = ".jp2$", full.names = TRUE, recursive = TRUE)
Does this work for you?
body p { margin-bottom: 0cm; margin-top: 0pt; }
Hi Marius
On 02/12/2019 11:28, Marius Appel
wrote:
The content of zip files is automatically scanned recursively
(if unroll_archives = TRUE), i.e. it will find the
.jp2 files in subdirectories. So, instead of the .SAFE
directory, you need to pass the paths to the .jp2 files
directly, e.g. by replacing the first line with:
S2_SAFE_list = list.files(path = S2_download_dir, pattern = ".jp2$", full.names = TRUE, recursive = TRUE)
Now I've got it. Thanks.
Does this work for you?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
[
{ "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/appelmar/gdalcubes/issues/32?email_source=notifications\u0026email_token=AA5J52GZYMASQNEEJ7CFQD3QWTILDA5CNFSM4JTNMYC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFS2PLY#issuecomment-560310191", "url": "https://github.com/appelmar/gdalcubes/issues/32?email_source=notifications\u0026email_token=AA5J52GZYMASQNEEJ7CFQD3QWTILDA5CNFSM4JTNMYC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFS2PLY#issuecomment-560310191", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
--
Micha Silver Arava Drainage Authority +972-523-665918
I'm trying to read into an image collection a list of directories of (unzipped) Sentinel 2 data. I get an empty collection. However the same procedure run on zipped files works. My workflow begins with the R package
sen2r
to download the tiles, and this package automatically unzips the the downloaded file into a *.SAFE directory. So I need gdalcubes to read in the SAFE dir.Here's what happens:
Again, if I zip the SAFE directories, and make a list of the zipfiles, then create_image_collection() succeeds. Do I need to make any changes to the Sentinel_2A.json ?
Thanks, Micha