[R-sig-Geo] raster() and projection

Agustin Lobo alobolistas at gmail.com
Wed Dec 2 22:38:44 CET 2009


Hi!

Why is it that when we "read" a raster i.e.
dem <- raster("/media/Transcend/MONTSENY2008/MONTSENY_GEODATA/mde10mny.tif")

(where the tif file is a geotif file with correct projection informatio)
we actually do not get the projection information?

 > projection(dem)
[1] "NA"

By now I solve it thanks to a SPDF:
 > delme <- 
readOGR(dsn="/media/Transcend/MONTSENY2008/MONTSENY_GEODATA/Limitparcplaespecial", 
layer="AmbitPlaEspecial")
 > projection(dem) <- projection(delme)

Am I doing something wrong?

Thanks

Agus



More information about the R-sig-Geo mailing list