Etienne,
Maybe you could give it a try with raster library as it is can read from
disc instead of loading in memory the whole image.
library(raster)
r2=raster(img/TM.burnpix.pnsc.2000-2006.freq.tif)
plot(r2)
Etienne (B. Racine)
On Mon, Mar 28, 2011 at 9:47 PM, Etienne etienne...@yahoo.com
Brad,
If you have a raster with your single band, you could try something like:
install.packages(raster, rgdal)
library(raster)
# load raster
r - raster(band_7.tif) # (otherwise, use brick() instead of raster(),
so you can pick your layer)
flare - which(r[] 99)
p - xyFromCell(r, flare,
I'd like to extract celle numbers from a raster using a line, but it seems
the cellnumbers=TRUE option isn't working with lines in raster::extract.
simple example :
library(raster)
r - raster(matrix(1:20, nrow=4))
l - SpatialLines(list(Lines(list(Line(list(x=c(0, 1), y=c(0, 1, ID=1)))
#
It is not working because cellnumbers is currently only an argument for
extracting values from a Raster* for polygons. That's what the docs say.
But
I'll also implement if for lines.
I did notice that, but there was no ==line== section in the doc I have. Is
my package outdated ?
In your
Thanks Robert, that's exactly the hack I needed.
Etienne
On Sun, Mar 13, 2011 at 7:48 PM, Robert Hijmans r.hijm...@gmail.com wrote:
Etienne,
What you are doing makes sense to me. To avoid border problems, perhaps you
can first 'expand' the input raster by adding sufficient rows and columns
Komine,
You're passing a path to crop, but you should pass your raster object. (see
?crop)
Try :
library(raster)
myobject -
raster(C:\\Users\\komine\\Desktop\\MODIS\\MYD09GQ.A2010280.h16v07.005.2010282160347.sur_refl_b01_1.tif)
e - extent(-90, -32, -60, 15)
r - crop(myobject,e)
plot(r)
Etienne
Hi list,
I'd like to vary the size of my window on a moving window filter. The size
of the radius is set by a function of the center pixel (the current pixel
processed). I picked the raster package, but as focal() is using a fix
radius for the analysis, I thought I could use a large radius and
Package gglot2::coord_flip() could be of help.
Etienne
2011/2/1 ldec...@comcast.net
i'd suggest using table() to generate the frequencies then displaying as a
barplot(..., horiz = T) .
Lee De Cola, PhD, MCP.
DATA to Insight
ldec...@comcast.net
Reston, Virginia
571 315 0577