RStoolbox icon indicating copy to clipboard operation
RStoolbox copied to clipboard

Duplicate row.names are not allowed.

Open aterhorst opened this issue 3 years ago • 4 comments

I have an Apple Silicon MacBook.

p166r077 <- stackMeta("LC08_L2SP_166072_20210819_20210827_02_T1/LC08_L2SP_166072_20210819_20210827_02_T1_MTL.txt", ,quantity = "all", category = "image", allResolutions = FALSE)

returns the following error(s):

Error in `.rowNamesDF<-`(x, value = value) : 
  duplicate 'row.names' are not allowed
In addition: Warning message:
non-unique value when setting 'row.names': ‘QA_NA’ 

aterhorst avatar May 07 '22 08:05 aterhorst

I ran into the same issue on my windows machine. I tried a different Landsat 8 scene. No joy. I downloaded the data from EarthExplorer.

aterhorst avatar May 07 '22 11:05 aterhorst

Because it is Level2 product that readMeta() [which is inside stackMeta()] does not read properly when raw=FALSE as default. See #84

Rapsodia86 avatar Jun 27 '22 20:06 Rapsodia86

I am working with level1 products, but I have the same issue for some images.... please help! I really need to process dozens of images! I think it is because the processing level (this one is a Real Time product) but I hope it could work no matter what type of ancillary data it has. LC08_L1TP_019046_20220917_20220917_02_RT_MTL.txt

setwd(dir_image) meta_arch<-readMeta("LC08_L1TP_019046_20220917_20220917_02_RT_MTL.txt")

Error in .rowNamesDF<-(x, value = value) : duplicate 'row.names' are not allowed In addition: Warning message: non-unique values when setting 'row.names': ‘AUX_NA’, ‘QA_NA’_

If I set raw to TRUE, it fails in the stackMeta: setwd(dir_image) meta_arch<-readMeta("LC08_L1TP_019046_20220917_20220917_02_RT_MTL.txt", raw =T) lsMeta <- stackMeta(meta_arch)

Error in file.exists(file) : invalid 'file' argument

AbigailUribe avatar Sep 22 '22 22:09 AbigailUribe