Skip to content

Plot (image( )) Real RGB Colors of an Imported GeoTIFF (readGDAL( ))

4 messages · Rodrigo Aluizio, Robert J. Hijmans, Edzer Pebesma

#
Rodrigo, you can try plotRGB in raster. Robert
On Tue, Jun 22, 2010 at 6:57 AM, Rodrigo Aluizio <r.aluizio at gmail.com> wrote:
#
Asssuming r g and b are on a 0 - 255 scale and form the first, second
and third band in obj, which was read through readGDAL, you could use

image(obj, red = 1, green = 2, blue = 3)

which is image { sp } and not image { graphics }. See also

library(sp)
?image.SpatialGridDataFrame
On 06/22/2010 03:57 PM, Rodrigo Aluizio wrote:

  
    
#
Excelent!
Sorry for asking such a simple question. But, I was blind for such obvious
thing.

Rodrigo.

-----Mensagem original-----
De: r-sig-geo-bounces at stat.math.ethz.ch
[mailto:r-sig-geo-bounces at stat.math.ethz.ch] Em nome de Edzer Pebesma
Enviada em: ter?a-feira, 22 de junho de 2010 13:28
Para: r-sig-geo at stat.math.ethz.ch
Assunto: Re: [R-sig-Geo] Plot (image( )) Real RGB Colors of an Imported
GeoTIFF (readGDAL( ))

Asssuming r g and b are on a 0 - 255 scale and form the first, second
and third band in obj, which was read through readGDAL, you could use

image(obj, red = 1, green = 2, blue = 3)

which is image { sp } and not image { graphics }. See also

library(sp)
?image.SpatialGridDataFrame
On 06/22/2010 03:57 PM, Rodrigo Aluizio wrote:
the
BC<-readGDAL('C:/Users/Rodrigo/Documents/Shapefiles/Campos/BaciaCampos-GE-SA
C:/Users/Rodrigo/Documents/Shapefiles/Campos/BaciaCampos-GE-SAD69-LongLat.ti