Thursday, December 31, 2015

Create Elevation Map of Cambodia

(1) download elevation raster (choose country mask) from http://www.diva-gis.org/gdata

(2) expand it to the same directory as your R script (What is R?)

(3) Run this script to create image file ("cambodia_elevation.tif")

library(raster)

r <-raster("KHM_msk_alt/KHM_msk_alt.grd")
tiff(file="cambodia_elevation.tif",width=6,height=6, unit="in",res=300)
plot(r)
dev.off()




No comments:

Post a Comment