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
readMeta fails to read Landsat MSS metadata (*MTL.txt) files #7
Comments
Hi Andras, thanks for reporting. I think it should work now if you install the current Github version. Out of interest: where did you download this data from? I wasn't aware that USGS are now offering reflectance scaling coefficients for MSS data, which is pretty cool. I tried to find it on EarthExplorer but couldn't. Let me know if it works |
Hi, Thank you for your work to provide the update. For example:
Explicitly setting the bands for As for your question, I downloaded the MSS data from the USGS's bulk data downloader: And for the Data Set: "Landsat Archive:L1-5 MSS" |
There was a look-up mismatch with the haze look-up tables which expected bands 1 to 4, but in Landsat 1-3 these bands are designated bands 4 to 7... |
It works great now. Thank you very much! |
I have tried installing RStoolbox as a zip file from github and it installed but when I load the MTL file I get an empty "" FILE. Iam using R version 3.3.4 in windows 10. Please help |
Could you please provide the MTL file which doesn't work or are you referring to the one in this issue? |
Hi
Thanx for your response. Attached are the 2 MTL files I have tried
Kind regards
On Mon, Jan 30, 2017 at 2:51 PM, Benjamin Leutner ***@***.***> wrote:
Could you please provide the MTL file which doesn't work or are you
referring to the one in this issue?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYLcX604ChT2PJBTUbF6CxKQTeJAES66ks5rXdzYgaJpZM4Im_GE>
.
GROUP = L1_METADATA_FILE
GROUP = METADATA_FILE_INFO
ORIGIN = "Image courtesy of the U.S. Geological Survey"
REQUEST_ID = "0501506192654_00064"
LANDSAT_SCENE_ID = "LC81710742015170LGN00"
FILE_DATE = 2015-06-19T15:47:57Z
STATION_ID = "LGN"
PROCESSING_SOFTWARE_VERSION = "LPGS_2.5.1"
END_GROUP = METADATA_FILE_INFO
GROUP = PRODUCT_METADATA
DATA_TYPE = "L1T"
ELEVATION_SOURCE = "GLS2000"
OUTPUT_FORMAT = "GEOTIFF"
SPACECRAFT_ID = "LANDSAT_8"
SENSOR_ID = "OLI_TIRS"
WRS_PATH = 171
WRS_ROW = 74
NADIR_OFFNADIR = "NADIR"
TARGET_WRS_PATH = 171
TARGET_WRS_ROW = 74
DATE_ACQUIRED = 2015-06-19
SCENE_CENTER_TIME = "08:06:13.1718013Z"
CORNER_UL_LAT_PRODUCT = -19.17947
CORNER_UL_LON_PRODUCT = 27.22066
CORNER_UR_LAT_PRODUCT = -19.16369
CORNER_UR_LON_PRODUCT = 29.41701
CORNER_LL_LAT_PRODUCT = -21.29669
CORNER_LL_LON_PRODUCT = 27.22367
CORNER_LR_LAT_PRODUCT = -21.27901
CORNER_LR_LON_PRODUCT = 29.44993
CORNER_UL_PROJECTION_X_PRODUCT = 523200.000
CORNER_UL_PROJECTION_Y_PRODUCT = -2120700.000
CORNER_UR_PROJECTION_X_PRODUCT = 754200.000
CORNER_UR_PROJECTION_Y_PRODUCT = -2120700.000
CORNER_LL_PROJECTION_X_PRODUCT = 523200.000
CORNER_LL_PROJECTION_Y_PRODUCT = -2355000.000
CORNER_LR_PROJECTION_X_PRODUCT = 754200.000
CORNER_LR_PROJECTION_Y_PRODUCT = -2355000.000
PANCHROMATIC_LINES = 15621
PANCHROMATIC_SAMPLES = 15401
REFLECTIVE_LINES = 7811
REFLECTIVE_SAMPLES = 7701
THERMAL_LINES = 7811
THERMAL_SAMPLES = 7701
FILE_NAME_BAND_1 = "LC81710742015170LGN00_B1.TIF"
FILE_NAME_BAND_2 = "LC81710742015170LGN00_B2.TIF"
FILE_NAME_BAND_3 = "LC81710742015170LGN00_B3.TIF"
FILE_NAME_BAND_4 = "LC81710742015170LGN00_B4.TIF"
FILE_NAME_BAND_5 = "LC81710742015170LGN00_B5.TIF"
FILE_NAME_BAND_6 = "LC81710742015170LGN00_B6.TIF"
FILE_NAME_BAND_7 = "LC81710742015170LGN00_B7.TIF"
FILE_NAME_BAND_8 = "LC81710742015170LGN00_B8.TIF"
FILE_NAME_BAND_9 = "LC81710742015170LGN00_B9.TIF"
FILE_NAME_BAND_10 = "LC81710742015170LGN00_B10.TIF"
FILE_NAME_BAND_11 = "LC81710742015170LGN00_B11.TIF"
FILE_NAME_BAND_QUALITY = "LC81710742015170LGN00_BQA.TIF"
METADATA_FILE_NAME = "LC81710742015170LGN00_MTL.txt"
BPF_NAME_OLI = "LO8BPF20150619072700_20150619081108.02"
BPF_NAME_TIRS = "LT8BPF20150619072303_20150619081203.02"
CPF_NAME = "L8CPF20150401_20150630.03"
RLUT_FILE_NAME = "L8RLUT20150303_20431231v11.h5"
END_GROUP = PRODUCT_METADATA
GROUP = IMAGE_ATTRIBUTES
CLOUD_COVER = 0.00
CLOUD_COVER_LAND = 0.00
IMAGE_QUALITY_OLI = 9
IMAGE_QUALITY_TIRS = 9
TIRS_SSM_POSITION_STATUS = "NOMINAL"
ROLL_ANGLE = -0.001
SUN_AZIMUTH = 35.71310933
SUN_ELEVATION = 37.22810550
EARTH_SUN_DISTANCE = 1.0161032
GROUND_CONTROL_POINTS_VERSION = 2
GROUND_CONTROL_POINTS_MODEL = 515
GEOMETRIC_RMSE_MODEL = 6.107
GEOMETRIC_RMSE_MODEL_Y = 4.357
GEOMETRIC_RMSE_MODEL_X = 4.280
GROUND_CONTROL_POINTS_VERIFY = 194
GEOMETRIC_RMSE_VERIFY = 2.909
END_GROUP = IMAGE_ATTRIBUTES
GROUP = MIN_MAX_RADIANCE
RADIANCE_MAXIMUM_BAND_1 = 736.16266
RADIANCE_MINIMUM_BAND_1 = -60.79255
RADIANCE_MAXIMUM_BAND_2 = 753.83954
RADIANCE_MINIMUM_BAND_2 = -62.25232
RADIANCE_MAXIMUM_BAND_3 = 694.65668
RADIANCE_MINIMUM_BAND_3 = -57.36497
RADIANCE_MAXIMUM_BAND_4 = 585.77362
RADIANCE_MINIMUM_BAND_4 = -48.37338
RADIANCE_MAXIMUM_BAND_5 = 358.46426
RADIANCE_MINIMUM_BAND_5 = -29.60209
RADIANCE_MAXIMUM_BAND_6 = 89.14680
RADIANCE_MINIMUM_BAND_6 = -7.36177
RADIANCE_MAXIMUM_BAND_7 = 30.04725
RADIANCE_MINIMUM_BAND_7 = -2.48131
RADIANCE_MAXIMUM_BAND_8 = 662.93457
RADIANCE_MINIMUM_BAND_8 = -54.74535
RADIANCE_MAXIMUM_BAND_9 = 140.09596
RADIANCE_MINIMUM_BAND_9 = -11.56917
RADIANCE_MAXIMUM_BAND_10 = 22.00180
RADIANCE_MINIMUM_BAND_10 = 0.10033
RADIANCE_MAXIMUM_BAND_11 = 22.00180
RADIANCE_MINIMUM_BAND_11 = 0.10033
END_GROUP = MIN_MAX_RADIANCE
GROUP = MIN_MAX_REFLECTANCE
REFLECTANCE_MAXIMUM_BAND_1 = 1.210700
REFLECTANCE_MINIMUM_BAND_1 = -0.099980
REFLECTANCE_MAXIMUM_BAND_2 = 1.210700
REFLECTANCE_MINIMUM_BAND_2 = -0.099980
REFLECTANCE_MAXIMUM_BAND_3 = 1.210700
REFLECTANCE_MINIMUM_BAND_3 = -0.099980
REFLECTANCE_MAXIMUM_BAND_4 = 1.210700
REFLECTANCE_MINIMUM_BAND_4 = -0.099980
REFLECTANCE_MAXIMUM_BAND_5 = 1.210700
REFLECTANCE_MINIMUM_BAND_5 = -0.099980
REFLECTANCE_MAXIMUM_BAND_6 = 1.210700
REFLECTANCE_MINIMUM_BAND_6 = -0.099980
REFLECTANCE_MAXIMUM_BAND_7 = 1.210700
REFLECTANCE_MINIMUM_BAND_7 = -0.099980
REFLECTANCE_MAXIMUM_BAND_8 = 1.210700
REFLECTANCE_MINIMUM_BAND_8 = -0.099980
REFLECTANCE_MAXIMUM_BAND_9 = 1.210700
REFLECTANCE_MINIMUM_BAND_9 = -0.099980
END_GROUP = MIN_MAX_REFLECTANCE
GROUP = MIN_MAX_PIXEL_VALUE
QUANTIZE_CAL_MAX_BAND_1 = 65535
QUANTIZE_CAL_MIN_BAND_1 = 1
QUANTIZE_CAL_MAX_BAND_2 = 65535
QUANTIZE_CAL_MIN_BAND_2 = 1
QUANTIZE_CAL_MAX_BAND_3 = 65535
QUANTIZE_CAL_MIN_BAND_3 = 1
QUANTIZE_CAL_MAX_BAND_4 = 65535
QUANTIZE_CAL_MIN_BAND_4 = 1
QUANTIZE_CAL_MAX_BAND_5 = 65535
QUANTIZE_CAL_MIN_BAND_5 = 1
QUANTIZE_CAL_MAX_BAND_6 = 65535
QUANTIZE_CAL_MIN_BAND_6 = 1
QUANTIZE_CAL_MAX_BAND_7 = 65535
QUANTIZE_CAL_MIN_BAND_7 = 1
QUANTIZE_CAL_MAX_BAND_8 = 65535
QUANTIZE_CAL_MIN_BAND_8 = 1
QUANTIZE_CAL_MAX_BAND_9 = 65535
QUANTIZE_CAL_MIN_BAND_9 = 1
QUANTIZE_CAL_MAX_BAND_10 = 65535
QUANTIZE_CAL_MIN_BAND_10 = 1
QUANTIZE_CAL_MAX_BAND_11 = 65535
QUANTIZE_CAL_MIN_BAND_11 = 1
END_GROUP = MIN_MAX_PIXEL_VALUE
GROUP = RADIOMETRIC_RESCALING
RADIANCE_MULT_BAND_1 = 1.2161E-02
RADIANCE_MULT_BAND_2 = 1.2453E-02
RADIANCE_MULT_BAND_3 = 1.1475E-02
RADIANCE_MULT_BAND_4 = 9.6766E-03
RADIANCE_MULT_BAND_5 = 5.9216E-03
RADIANCE_MULT_BAND_6 = 1.4726E-03
RADIANCE_MULT_BAND_7 = 4.9636E-04
RADIANCE_MULT_BAND_8 = 1.0951E-02
RADIANCE_MULT_BAND_9 = 2.3143E-03
RADIANCE_MULT_BAND_10 = 3.3420E-04
RADIANCE_MULT_BAND_11 = 3.3420E-04
RADIANCE_ADD_BAND_1 = -60.80471
RADIANCE_ADD_BAND_2 = -62.26477
RADIANCE_ADD_BAND_3 = -57.37645
RADIANCE_ADD_BAND_4 = -48.38306
RADIANCE_ADD_BAND_5 = -29.60802
RADIANCE_ADD_BAND_6 = -7.36324
RADIANCE_ADD_BAND_7 = -2.48181
RADIANCE_ADD_BAND_8 = -54.75630
RADIANCE_ADD_BAND_9 = -11.57148
RADIANCE_ADD_BAND_10 = 0.10000
RADIANCE_ADD_BAND_11 = 0.10000
REFLECTANCE_MULT_BAND_1 = 2.0000E-05
REFLECTANCE_MULT_BAND_2 = 2.0000E-05
REFLECTANCE_MULT_BAND_3 = 2.0000E-05
REFLECTANCE_MULT_BAND_4 = 2.0000E-05
REFLECTANCE_MULT_BAND_5 = 2.0000E-05
REFLECTANCE_MULT_BAND_6 = 2.0000E-05
REFLECTANCE_MULT_BAND_7 = 2.0000E-05
REFLECTANCE_MULT_BAND_8 = 2.0000E-05
REFLECTANCE_MULT_BAND_9 = 2.0000E-05
REFLECTANCE_ADD_BAND_1 = -0.100000
REFLECTANCE_ADD_BAND_2 = -0.100000
REFLECTANCE_ADD_BAND_3 = -0.100000
REFLECTANCE_ADD_BAND_4 = -0.100000
REFLECTANCE_ADD_BAND_5 = -0.100000
REFLECTANCE_ADD_BAND_6 = -0.100000
REFLECTANCE_ADD_BAND_7 = -0.100000
REFLECTANCE_ADD_BAND_8 = -0.100000
REFLECTANCE_ADD_BAND_9 = -0.100000
END_GROUP = RADIOMETRIC_RESCALING
GROUP = TIRS_THERMAL_CONSTANTS
K1_CONSTANT_BAND_10 = 774.8853
K1_CONSTANT_BAND_11 = 480.8883
K2_CONSTANT_BAND_10 = 1321.0789
K2_CONSTANT_BAND_11 = 1201.1442
END_GROUP = TIRS_THERMAL_CONSTANTS
GROUP = PROJECTION_PARAMETERS
MAP_PROJECTION = "UTM"
DATUM = "WGS84"
ELLIPSOID = "WGS84"
UTM_ZONE = 35
GRID_CELL_SIZE_PANCHROMATIC = 15.00
GRID_CELL_SIZE_REFLECTIVE = 30.00
GRID_CELL_SIZE_THERMAL = 30.00
ORIENTATION = "NORTH_UP"
RESAMPLING_OPTION = "CUBIC_CONVOLUTION"
END_GROUP = PROJECTION_PARAMETERS
END_GROUP = L1_METADATA_FILE
END
GROUP = L1_METADATA_FILE
GROUP = METADATA_FILE_INFO
ORIGIN = "Image courtesy of the U.S. Geological Survey"
REQUEST_ID = "0101405281170_00389"
LANDSAT_SCENE_ID = "LT51710752005158JSA00"
FILE_DATE = 2014-05-29T10:26:19Z
STATION_ID = "JSA"
PROCESSING_SOFTWARE_VERSION = "LPGS_12.4.1"
DATA_CATEGORY = "NOMINAL"
END_GROUP = METADATA_FILE_INFO
GROUP = PRODUCT_METADATA
DATA_TYPE = "L1T"
DATA_TYPE_L0RP = "TMR_L0RP"
ELEVATION_SOURCE = "GLS2000"
OUTPUT_FORMAT = "GEOTIFF"
EPHEMERIS_TYPE = "DEFINITIVE"
SPACECRAFT_ID = "LANDSAT_5"
SENSOR_ID = "TM"
SENSOR_MODE = "BUMPER"
WRS_PATH = 171
WRS_ROW = 075
DATE_ACQUIRED = 2005-06-07
SCENE_CENTER_TIME = 07:54:48.3550440Z
CORNER_UL_LAT_PRODUCT = -20.71125
CORNER_UL_LON_PRODUCT = 26.83674
CORNER_UR_LAT_PRODUCT = -20.69812
CORNER_UR_LON_PRODUCT = 29.13241
CORNER_LL_LAT_PRODUCT = -22.61400
CORNER_LL_LON_PRODUCT = 26.83458
CORNER_LR_LAT_PRODUCT = -22.59954
CORNER_LR_LON_PRODUCT = 29.16053
CORNER_UL_PROJECTION_X_PRODUCT = 483000.000
CORNER_UL_PROJECTION_Y_PRODUCT = -2290200.000
CORNER_UR_PROJECTION_X_PRODUCT = 722100.000
CORNER_UR_PROJECTION_Y_PRODUCT = -2290200.000
CORNER_LL_PROJECTION_X_PRODUCT = 483000.000
CORNER_LL_PROJECTION_Y_PRODUCT = -2500800.000
CORNER_LR_PROJECTION_X_PRODUCT = 722100.000
CORNER_LR_PROJECTION_Y_PRODUCT = -2500800.000
REFLECTIVE_LINES = 7021
REFLECTIVE_SAMPLES = 7971
THERMAL_LINES = 7021
THERMAL_SAMPLES = 7971
FILE_NAME_BAND_1 = "LT51710752005158JSA00_B1.TIF"
FILE_NAME_BAND_2 = "LT51710752005158JSA00_B2.TIF"
FILE_NAME_BAND_3 = "LT51710752005158JSA00_B3.TIF"
FILE_NAME_BAND_4 = "LT51710752005158JSA00_B4.TIF"
FILE_NAME_BAND_5 = "LT51710752005158JSA00_B5.TIF"
FILE_NAME_BAND_6 = "LT51710752005158JSA00_B6.TIF"
FILE_NAME_BAND_7 = "LT51710752005158JSA00_B7.TIF"
GROUND_CONTROL_POINT_FILE_NAME = "LT51710752005158JSA00_GCP.txt"
REPORT_VERIFY_FILE_NAME = "LT51710752005158JSA00_VER.txt"
BROWSE_VERIFY_FILE_NAME = "LT51710752005158JSA00_VER.jpg"
METADATA_FILE_NAME = "LT51710752005158JSA00_MTL.txt"
CPF_NAME = "L5CPF20050401_20050630.11"
END_GROUP = PRODUCT_METADATA
GROUP = IMAGE_ATTRIBUTES
CLOUD_COVER = 0.00
IMAGE_QUALITY = 9
SUN_AZIMUTH = 37.92663515
SUN_ELEVATION = 35.13912566
GROUND_CONTROL_POINTS_MODEL = 208
GEOMETRIC_RMSE_MODEL = 4.029
GEOMETRIC_RMSE_MODEL_Y = 2.745
GEOMETRIC_RMSE_MODEL_X = 2.949
GROUND_CONTROL_POINTS_VERIFY = 2828
GEOMETRIC_RMSE_VERIFY = 0.187
GEOMETRIC_RMSE_VERIFY_QUAD_UL = 0.116
GEOMETRIC_RMSE_VERIFY_QUAD_UR = 0.142
GEOMETRIC_RMSE_VERIFY_QUAD_LL = 0.257
GEOMETRIC_RMSE_VERIFY_QUAD_LR = 0.262
END_GROUP = IMAGE_ATTRIBUTES
GROUP = MIN_MAX_RADIANCE
RADIANCE_MAXIMUM_BAND_1 = 193.000
RADIANCE_MINIMUM_BAND_1 = -1.520
RADIANCE_MAXIMUM_BAND_2 = 365.000
RADIANCE_MINIMUM_BAND_2 = -2.840
RADIANCE_MAXIMUM_BAND_3 = 264.000
RADIANCE_MINIMUM_BAND_3 = -1.170
RADIANCE_MAXIMUM_BAND_4 = 221.000
RADIANCE_MINIMUM_BAND_4 = -1.510
RADIANCE_MAXIMUM_BAND_5 = 30.200
RADIANCE_MINIMUM_BAND_5 = -0.370
RADIANCE_MAXIMUM_BAND_6 = 15.303
RADIANCE_MINIMUM_BAND_6 = 1.238
RADIANCE_MAXIMUM_BAND_7 = 16.500
RADIANCE_MINIMUM_BAND_7 = -0.150
END_GROUP = MIN_MAX_RADIANCE
GROUP = MIN_MAX_PIXEL_VALUE
QUANTIZE_CAL_MAX_BAND_1 = 255
QUANTIZE_CAL_MIN_BAND_1 = 1
QUANTIZE_CAL_MAX_BAND_2 = 255
QUANTIZE_CAL_MIN_BAND_2 = 1
QUANTIZE_CAL_MAX_BAND_3 = 255
QUANTIZE_CAL_MIN_BAND_3 = 1
QUANTIZE_CAL_MAX_BAND_4 = 255
QUANTIZE_CAL_MIN_BAND_4 = 1
QUANTIZE_CAL_MAX_BAND_5 = 255
QUANTIZE_CAL_MIN_BAND_5 = 1
QUANTIZE_CAL_MAX_BAND_6 = 255
QUANTIZE_CAL_MIN_BAND_6 = 1
QUANTIZE_CAL_MAX_BAND_7 = 255
QUANTIZE_CAL_MIN_BAND_7 = 1
END_GROUP = MIN_MAX_PIXEL_VALUE
GROUP = PRODUCT_PARAMETERS
CORRECTION_GAIN_BAND_1 = "CPF"
CORRECTION_GAIN_BAND_2 = "CPF"
CORRECTION_GAIN_BAND_3 = "CPF"
CORRECTION_GAIN_BAND_4 = "CPF"
CORRECTION_GAIN_BAND_5 = "CPF"
CORRECTION_GAIN_BAND_6 = "INTERNAL_CALIBRATION"
CORRECTION_GAIN_BAND_7 = "CPF"
CORRECTION_BIAS_BAND_1 = "CPF"
CORRECTION_BIAS_BAND_2 = "CPF"
CORRECTION_BIAS_BAND_3 = "CPF"
CORRECTION_BIAS_BAND_4 = "CPF"
CORRECTION_BIAS_BAND_5 = "CPF"
CORRECTION_BIAS_BAND_6 = "CPF"
CORRECTION_BIAS_BAND_7 = "CPF"
END_GROUP = PRODUCT_PARAMETERS
GROUP = RADIOMETRIC_RESCALING
RADIANCE_MULT_BAND_1 = 0.766
RADIANCE_MULT_BAND_2 = 1.448
RADIANCE_MULT_BAND_3 = 1.044
RADIANCE_MULT_BAND_4 = 0.876
RADIANCE_MULT_BAND_5 = 0.120
RADIANCE_MULT_BAND_6 = 0.055
RADIANCE_MULT_BAND_7 = 0.066
RADIANCE_ADD_BAND_1 = -2.28583
RADIANCE_ADD_BAND_2 = -4.28819
RADIANCE_ADD_BAND_3 = -2.21398
RADIANCE_ADD_BAND_4 = -2.38602
RADIANCE_ADD_BAND_5 = -0.49035
RADIANCE_ADD_BAND_6 = 1.18243
RADIANCE_ADD_BAND_7 = -0.21555
END_GROUP = RADIOMETRIC_RESCALING
GROUP = PROJECTION_PARAMETERS
MAP_PROJECTION = "UTM"
DATUM = "WGS84"
ELLIPSOID = "WGS84"
UTM_ZONE = 35
GRID_CELL_SIZE_REFLECTIVE = 30.00
GRID_CELL_SIZE_THERMAL = 30.00
ORIENTATION = "NORTH_UP"
RESAMPLING_OPTION = "CUBIC_CONVOLUTION"
MAP_PROJECTION_L0RA = "NA"
END_GROUP = PROJECTION_PARAMETERS
END_GROUP = L1_METADATA_FILE
END
|
I wish I could open these in Rstudio and start working on my analysis |
Both files are read just fine, even on R-devel in Windows. |
Iam not sure but it did not install using the library(devtools) and the
github script I had to download it from the website as a zip file. OK let
me try to install again . I also want to confirm the library, should it be
an external one or can work on C-
Regards
…On Jan 30, 2017 16:40, "Benjamin Leutner" ***@***.***> wrote:
Both files are read just fine, even on R-devel in Windows.
Something must be wrong with your installation. Are you sure you followed
the installation instructions <https://github.com/bleutner/RStoolbox>
correctly?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYLcX-_6gNS_zS_7MRBLQvlWFO8slyKrks5rXfZVgaJpZM4Im_GE>
.
|
I don't understand your last question. Why don't you use the regular release of R (3.2.2)? Then you can install directly from CRAN, i.e. with install.packages(RStoolbox), without needing to compile it yourself. |
I got information from github that R version should be 3.3. for RStoolbox
to work properly. Ok thank you let me install it from CRAN and see.
Regards
…On Mon, Jan 30, 2017 at 5:43 PM, Benjamin Leutner ***@***.***> wrote:
I don't understand your last question.
Why don't you use the regular release of R (3.2.2)? Then you can install
directly from CRAN, i.e. with install.packages(RStoolbox), without needing
to compile it yourself.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYLcX7ClrZE9N8URWFPboNHAwGFhZ4BVks5rXgU-gaJpZM4Im_GE>
.
|
oh sorry, thats what I meant. 3.3.2 |
In this 3.3.2 version there is RStoolbox version 0.1.7.9 was giving an
empty MTL file . Let me re install and try again.
…On Mon, Jan 30, 2017 at 5:57 PM, Benjamin Leutner ***@***.***> wrote:
oh sorry, thats what I meant. 3.3.2
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYLcX1u5782_ERf5S0JDyvQxfDaqXjgxks5rXghugaJpZM4Im_GE>
.
|
My you please check my scripts
mtlFile<-system.file("external/landsat/LC81710742015170LGN00/LC81710742015170LGN00_MTL.txt",package="RStoolbox")
metaData<-readMeta(mtlFile)
Error: Metadata file does not exist. Looking for:
Iam thinking it is the path that has a problem
…On Mon, Jan 30, 2017 at 5:57 PM, Benjamin Leutner ***@***.***> wrote:
oh sorry, thats what I meant. 3.3.2
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYLcX1u5782_ERf5S0JDyvQxfDaqXjgxks5rXghugaJpZM4Im_GE>
.
|
I was saying maybe the problem is the path to the file
…On Mon, Jan 30, 2017 at 5:43 PM, Benjamin Leutner ***@***.***> wrote:
I don't understand your last question.
Why don't you use the regular release of R (3.2.2)? Then you can install
directly from CRAN, i.e. with install.packages(RStoolbox), without needing
to compile it yourself.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYLcX7ClrZE9N8URWFPboNHAwGFhZ4BVks5rXgU-gaJpZM4Im_GE>
.
|
I see. The system.file function is only needed to load the built-in example file. All you have to do is provide the path to your file without the system.file function: |
ok thanx so much let me try
Regards
…On Tue, Jan 31, 2017 at 10:38 AM, Benjamin Leutner ***@***.*** > wrote:
I see. The system.file function is only needed to load the built-in
example file.
What happened was that you were requesting a file which did not exist in
the installation directory and hence system.file returned an empty
character: ""
All you have to do is provide the path to your file without the
system.file function:
readMeta("path/to/your/file_MTL.txt")
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYLcX9O52gGSXbzDeFecFJXSM9b9GSIKks5rXvMEgaJpZM4Im_GE>
.
|
Morning Leutner
sorry to bother you, I have tried that;
mtlFile<-readMeta<-("C:/Users/Sethi/Documents/R/Landsat/June
images/LC81710742015170LGN00/LC81710742015170LGN00_MTL.txt")
readMeta<-(mtlFile)
print(mtlFile)
[1] "C:/Users/Sethi/Documents/R/Landsat/June
images/LC81710742015170LGN00/LC81710742015170LGN00_MTL.txt"
summary(mtlFile)
Length Class Mode
1 character character
I do not know where Iam getting it wrong
…On Tue, Jan 31, 2017 at 10:38 AM, Benjamin Leutner ***@***.*** > wrote:
I see. The system.file function is only needed to load the built-in
example file.
What happened was that you were requesting a file which did not exist in
the installation directory and hence system.file returned an empty
character: ""
All you have to do is provide the path to your file without the
system.file function:
readMeta("path/to/your/file_MTL.txt")
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYLcX9O52gGSXbzDeFecFJXSM9b9GSIKks5rXvMEgaJpZM4Im_GE>
.
|
readMeta("C:/Users/Sethi/Documents/R/Landsat/Juneimages/LC81710742015170LGN00/LC81710742015170LGN00_MTL.txt") |
Thanx it has imported |
Hi Leutner
Thank you so much, God BLESS YOU
Regards
…On Tue, Jan 31, 2017 at 11:47 AM, Benjamin Leutner ***@***.*** > wrote:
readMeta("C:/Users/Sethi/Documents/R/Landsat/Juneimages/LC81710742015170LGN00/LC81710742015170LGN00_MTL.txt")
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYLcXyPBIYrHRY2MS9u_IAT6k5Fnzpmiks5rXwNNgaJpZM4Im_GE>
.
|
Dear Leutner
Hope you are well, I want your help, i was classifying my images using
RStoolbox and got a system report error, that I need to restart the whole
session and an automatic closure of the session. When I restarted the
package RStoolbox is reporting that it has been corrupted, what could be
the problem and how can I solve it, so stressed.
Kind regards
Sethi
…On Tue, Jan 31, 2017 at 11:47 AM, Benjamin Leutner ***@***.*** > wrote:
readMeta("C:/Users/Sethi/Documents/R/Landsat/Juneimages/LC81710742015170LGN00/LC81710742015170LGN00_MTL.txt")
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYLcXyPBIYrHRY2MS9u_IAT6k5Fnzpmiks5rXwNNgaJpZM4Im_GE>
.
|
Please open a new issue. Every issue should address only one single problem. |
Dear Bleutner, i can read the MTL file perfecctly but when i would like to read the mtlfile so these error happen Error: Metadata file does not exist. Looking for:
Error in .local(.Object, ...) : Error in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer", : Cannot create a RasterLayer object from this file. (file does not exist)
Error in inherits(file, "ImageMetaData") : object 'MTL.txt' not found
Error in .local(.Object, ...) : Error in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer", : |
Hello everyone I am using the latest R version 3.5.1 in window. Thank you. library(raster)
|
I downloaded your metadata file. The following works for me to import it in R version 3.4.1:
|
Dear Aszeitz Thank you very much indeed. Now i am able to import the meta data using the step you mentioned even in 3,5,1 version. I think the error is when i use the system.file function as i put in my earlier post. Now it is okay to import. Following this i was able to execute the radiometric correction using the command below but could not able to export the corrected stacked landSat image for later use in like in Arcgis ... Here is the step i went through and please kindly help me on how to export the final output as raster dataset to be able to use it outside R. rm(list = ls()) library(raster) #Set the working directory metaData <- readMeta("./LC08_L1TP_168050_20161225_20170315_01_T1_MTL.txt") #To stack the different bands (layer stacking) #Radiometric correction writeGDAL(lsat_radcor, "G:/LandSat_processing_practice_in_R/lsat.tif", drivername="GTiff") Thank you very much. |
To quote bleutner from Feb 2017:
Your problem with exporting the raster stack does not belong in this thread, which refers specifically to issues in loading metadata. Furthermore, your issue with |
Hi, mtlFile <- readMeta("./LC08_L2SP_142051_20180107_20200902_02_T1_MTL.txt"), throws a POSIXct Error. Installed (RStoolbox) and (raster) packages. Error seems to point to ACQUISITION_DATE field of MTL.txt. Can someone help? Error Message: Error in as.POSIXct.default(if (!legacy) meta$PRODUCT_METADATA["DATE_ACQUIRED", : |
I got the same error of beulahevelyn trying to read metadata of Landsat8. I think this error is due to NASA reconfiguration of this file sequence and some terms used. |
Hi,
Thanks bleutner for this package, it has been very helpful so far in processing Landsat scenes!
An issue I have encountered is that
readMeta
fails to properly load the *MTL.txt metadata files from the various Landsat MSS scenes I have tried to process.Here is a basic example of trying to load the metadata and the error it throws:
and if I use the example you provide in the documentation, readMeta throws a different error because mtlFile is only an empty character vector.
I have attached one of the metadata .txt files as obtained when the MSS scene was downloaded from the USGS. Any suggestions on how to get around this issue if I am trying to run
radCor
andtopCor
on the MSS data?LM30520251978217PAC03_MTL.txt
Thanks,
Andras
The text was updated successfully, but these errors were encountered: