[R-sig-Geo] Question raster package

Robert Hijmans r.hijmans at gmail.com
Mon Jun 22 17:23:19 CEST 2009


Peter,

You can create a separate RasterLayer object for each band:

fn <- 'myfile.ext'
r1 <- raster(fn, band=1)
r2 <- raster(fn, band=2)
r3 <- raster(fn, band=3)


you can also first create a RasterStack of all bands
s <- stack(fn, bands=-1)
and then extract a RasterLayer whenever you want it
r <- raster(s, layer=1)

Robert



2009/6/22 Peter van Horssen <p.w.van.horssen at buwa.nl>:
> I have a raster object with 3 bands:
> (How) Can I obtain the info for each different band ?
> Can I use a command like reclass on all three bands (with different
> classification definitions
> for each band) ?
>
> thanks in advance,
>
> Peter
>
>
> --
> ================================
> Peter van Horssen
> Bureau Waardenburg bv
> Adviseurs voor ecologie & milieu
> Postbus 365
> 4100 AJ Culemborg
> Tel: 0345-512710
> Fax: 0345-519849
> e-mail: p.w.van.horssen at buwa.nl
> ================================
>
> ---------------------------- DISCLAIMER -------------------------- De
> informatie verzonden met dit e-mail bericht is uitsluitend bestemd voor de
> geadresseerde. Openbaarmaking, vermenigvuldiging, verspreiding en/of
> verstrekking aan derden is niet toegestaan. Gebruik van deze informatie door
> anderen dan de geadresseerde is verboden. U wordt verzocht bij onjuiste
> adressering de afzender direct te informeren door het bericht te
> retourneren.
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



More information about the R-sig-Geo mailing list