Git Product home page Git Product logo

Comments (7)

bleutner avatar bleutner commented on September 15, 2024

there are some paths mixed up I think.
If you run the proper example it should work (I hope). Only your specification of the system.file was incorrect:

mtfile <- system.file("external/landsat/LT52240631988227CUB02_MTL.txt", package = "RStoolbox")
readMeta(mtfile)
stackMeta(mtfile)

Now for your own data.
Does the folder Z:/Band contain both the MTL file and the corresponding tifs?

from rstoolbox.

Romaysa avatar Romaysa commented on September 15, 2024

from rstoolbox.

Romaysa avatar Romaysa commented on September 15, 2024

Sir,
of course it contain all the bands.
see the picture.
metadata
image

from rstoolbox.

bleutner avatar bleutner commented on September 15, 2024

So the meta data file is read correctly.
Specify the path as character, then it should work: stackMeta("MTL.txt")

from rstoolbox.

Romaysa avatar Romaysa commented on September 15, 2024

Sir,
thanks a lot, working now i made a "lsat" file finally.

Regards

from rstoolbox.

Sandromakowski avatar Sandromakowski commented on September 15, 2024

Dear Prof. Bleutner,

I have the same issue as Romaysa. I followed your recommendations but it do not solved my problem. I am running windows 10 in a x64 system. I have tried to solve the problem myself in different ways with no results. The metada file is read correctly but the "stackMeta" function is not working properly. I also tried to run the code in another laptop with a ubuntu linux distribution but the same error persists: "Error in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer", :Cannot create a RasterLayer object from this file. (file does not exist).

here is the code i am running:

library('rgdal')
library("landsat")
library("RStoolbox")
library ("raster")

setwd("D:/Landsat1988")

dem <- raster('nasadem_filter_reprojected.tif')

mtlFile <- "D:/Landsat1988/1_raw/LT05_L1TP_004069_19880622_20170208_01_T1_MTL.txt"
metaData <- readMeta(mtlFile)
metaStack <- stackMeta(mtlFile)

I would be very greateful if you could help me to overcome this problem. Thank you in advance.

Many greetings,

Sandro

from rstoolbox.

Romaysa avatar Romaysa commented on September 15, 2024

from rstoolbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.