Skip to content

converting csv to image file

4 messages · Belay Gebregiorgis, Simon Knapp, Michael Sumner

#
provided you get the call to read.table (or perhaps read.csv) right
and presuming that file contains only the image data, you should
be able to say:

r <- raster(as.matrix(read.csv("file.csv")))
extent(r) <- extent(xmin, xmax, ymin, ymax)

and not worry about the projection (if it is plain old decimal degrees)

Regards,
Simon
On Sat, May 19, 2012 at 7:49 PM, Belay Gebregiorgis <belayg12 at gmail.com> wrote: