Closed jasonjb82 closed 10 years ago
Thanks very much for these notes, which are ideal in the sense that they help other users, help me to address this issue, and provide hints for wider improvements to oce.
I also get the same error from:
tirs1 <- l[["tirs1"]]
Error in .local(x, i, j, ...) :
can only index for bands (e.g. x[["band", 8]]) or metadata (e.g. x[["time"]]
It seems as though you've changed the accessor function for landsat
objects since the blog posting?
A useful citation that relates specifically to landsat 8:
Juan C. Jiménez-Muñoz, José A. Sobrino, Dražen Skokovic ́, Cristian Mattar, and Jordi Cristóbal, 2014. Land Surface Temperature Retrieval Methods From Landsat-8 Thermal Infrared Sensor Data. IEEE GEOSCIENCE AND REMOTE SENSING LETTERS, VOL. 11, NO. 10, OCTOBER 2014
This is available at academia.edu
@richardsc can you retry with develop
? I updated it a half hour ago so it should work properly in the blog posting. (I had coded it into the map-axes
branch by mistake ... would be nice to merge that back into develop
to avoid merge work.)
@dankelley Yes develop works on that issue now. I get some other warnings (for my image), but I'll stick them in a different issue when I get a chance.
Thanks. I think all images give those issues. The TIFF library is not understanding all the tags in geotiff files. I have half a mind to recode tiff reading if it's not too hard. I could also just hide the warnings because I don't think they matter -- I think it's just extra comments they put in about lat and lon etc but we get those from the header file anyhow so no need to try to get them from the actual tiff.
I removed the warnings because they were annoying and had confused some users.
Dan,
I came across this posting with code on how to derive surface temperatures with the older Landsat data and just thought I would share it on here
http://www.hakimabdi.com/20111030/estimating-land-surface-temperature-from-landsat-thermal-imagery/
That's a nice link -- also note that it references the landsat
package, which is on CRAN:
Another helpful link that came from the comments in the second link posted in the original comment is about correcting for total atmospheric water vapour:
Here's an interesting blog post summarizing various attempts to measure the emissivity of the ocean:
http://scienceofdoom.com/2010/12/27/emissivity-of-the-ocean/
Thanks for these references, which I've started adding these links into the help("landsat-class")
docs.
image[["tirs1"]]
now returns a matrix of integers, not floating-point numbers. The values are "counts", in the range from 0 to 2^16-1. This is consistent with other Landsat software. It also makes the matrix be 2X smaller than before, which might help on smallish computers.landsatAdd()
should be used to add new data "bands".decimate()
function now deals with landsat objects.These changes are improvements, but they are not really why the work was done. The real reason was to reduce the memory size of landsat objects. Previously, each pixel was stored as a floating-point number (8 bytes) but now each is stored as a two-byte pair, for a 4X reduction in memory demands.
I'm closing this since it seems to have been addressed, with no further comments in 5 days. Anyone can reopen it, if I understand the github interface correctly.
Dan,
My second try with the oce package from github
yields
And after tweaking the code slightly, I managed to get it the error to go away and proceed to the next lines of code. Please see below
Now I am able to get the data plotted but I have come across some information that might be useful to look into as the values that are finally mapped are only brightness temperatures. It seems to me that you will need to take into consideration the emissivity values of the land cover to derive the actual surface temperatures.
You can refer to the links below from a couple of people who have looked into surface temperature mapping using the Landsat 8 TIRS bands and comments that have come from USGS as well. Hopefully this can be useful in further enhancing the code.
http://geohackers.in/2013/08/using-data-from-the-landsat-8-tirs-instrument-to-estimate-surface-temperature/
http://fromgistors.blogspot.com/2014/01/estimation-of-land-surface-temperature.html
Regards, Jason