the dem data is easy to come by
for the earth there are many sources , like the strm 2.1
http://dds.cr.usgs.gov/srtm/version2_1/

for mars there is the gridded MOLA data
http://pds-geosciences.wustl.edu/mis...mgs/megdr.html