Skip to content
Prev 6459 / 29559 Next

DEMs

Hello Abe,

my thoughts to your questions are listed inline...
On Sunday 13 September 2009 15:05:04 Aben Woha wrote:
As coarse as possible, since you only appear to need elevations at each 1x1 
degree interval (note that many of these locations are nearby or identical for 
extremely high and low latitudes, due to convergence of longitudes at the 
poles). This question is more complicated if what you really want are average 
elevations per 1-degree 'chunk', or you want to calculate aspect, slope, or 
some other derivative.

I would check out GTOPO30, a 30-arc second global DEM:
http://eros.usgs.gov/products/elevation/gtopo30/gtopo30.html

The accuracy of this depends on the source data, which is reported at the site 
listed above. There are other possibilities, but I don't know if the sources 
are as recent or whether you'd get much in the way of accuracy statistics, 
etc. See:
http://dss.ucar.edu/catalogs/ranges/range750.html
for more possibilities.
Yes, check out the rgdal library. You can also use gdal (and maybe the python 
bindings) to preprocess the dataset outside of R - perhaps to thin it to just 
the lat-lons you need - prior to importing. I have used PyGDAL to access (and 
sample from) 10s of gigabytes of tiled (e.g. in separate files) elevation data, 
which I subsequently loaded into R. I think others here have done the same 
from within GIS as well.
GTOPO30 comes in maybe 3 dozen tiles, ranging in size from 5-25 MB zipped. On 
modern hardware it's not really that big, and R can probably load it all 
without problem if you have enough RAM. My personal preference would probably 
be to extract the elevations I wanted in home-brewed Python, write to some 
sort of comma-delimited file, and read that into R - and I have no problems on 
my 2 year old pc loading 64,000 records of xyz data, or actually many times 
that number. There are surely simpler solutions that wouldn't involve much if 
any coding, but I have direct experience with that approach.

Good luck!

Ashton