-
Notifications
You must be signed in to change notification settings - Fork 83
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
MTL file error #84
Comments
Try raw=TRUE, so it will read all info. looks like readMeta() has no LEVEL2 product included when you go default with raw=FALSE:
Then problem in line 100
Next thing, In level 2, there is no ANGLE tifs, so the MTL's PRODUCT_CONTENTS is different than those in the test folder. @bleutner including LEVEL 2 would be great!:) Btw. Landsat L2 SP is already atmospherically corrected (https://www.usgs.gov/landsat-missions/landsat-collection-2-surface-reflectance) |
I also had a similar issue when using Landsat 9 data, as it is only distributed as a level 2 product |
I am also having similar issues, when trying to replicate this workflow using a Landsat 5 image from 2004. I'm attaching the MTL file. How do I proceed? Errors:
|
Hello,
I am trying to do some atmospheric corrections on Landsat 8 data in Rstudio. Following previous code that I have seen I have run this so far.
install.packages("raster")
install.packages("rgdal")
install.packages("ggplot2")
install.packages("devtools")
install.packages("sf")
Define the multiple mutiple packages in a vector
PkgToLoad <- c("raster", "rgdal", "ggplot2", "devtools", "sf")
Load the packages
lapply(PkgToLoad, library, character.only = TRUE)
library(devtools)
The package 'devtools' is important in order to be able to import packages directly from the Github repository
Had to update all packages before this code would work
install_github("bleutner/RStoolbox")
library("RStoolbox")
#perform the radiometric correction
#Import meta-data and bands based on MTL file
readMeta("C:/Users/Allyson/University of Texas at El Paso/Microsoft forest SD project - General/ABP/PR_Trial/PuertoRicoL8USGS/LC08_L2SP_005047_20180616_20200831_02_T1_MTL.txt") #sep = '=', stringsAsFactors = F package = "RStoolbox")
-when I try to read the MTL file I get this error
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’
I attached the MTL text file. Can anyone give me input on how I can fix this?
LC08_L2SP_005047_20180616_20200831_02_T1_MTL.txt
The text was updated successfully, but these errors were encountered: