[R-sig-Geo] Displaying CIR images and overlay shape files

Monica Pisica pisicandru at hotmail.com
Wed May 21 21:07:38 CEST 2008


I am still struggling to understand how to display images in R …. I have a CIR 3 band file (geotiff format with projection imbedded) and a polygon shape file with same projection. I want to display the CIR image and overlay on top only the contour of the poly shape file, and I want to display coordinate axes ….

Up to now I was able to display the CIR without coordinates (now I know that using displayDataset suppresses axes – but I was not able to display correctly the CIR with "image" ….) and I can overlay the contour of my poly shape file but this one comes shifted horizontally and vertically …. And I don't know why. My code is:

x <- GDAL.open("e:/JELA_veg/shapefiles/jela_cir_bigger3.tif")
dx <- RGB2PCT(x, band=1:3)
  park<- readShapePoly("e:/JELA_veg/shapefiles/jela_park.shp", proj4string= CRS("+proj=tmerc +lat_0=0.00000000000 +lon_0=-93.00000000000 +k=0.99960000 +x_0=500000.000000 +y_0=0.0000000 +datum=NAD83 +units=m +tonad83=0,0,0"))

  park_lines <- as(park, "SpatialLines")
plot(park_lines, col = "green", lwd = 2, add = T)

I suppose that somehow I can use spplot, but I have to recognize that I don't know how to use it to display the CIR image …..

Any help is very much appreciated, thanks,


Change the world with e-mail. Join the i’m Initiative from Microsoft.


More information about the R-sig-Geo mailing list