// Load the terrain data
var terrain = ee.Image('USGS/SRTMGL1_003');
// Select an area of interest
var aoi = ee.Geometry.Rectangle([lon1, lat1, lon2, lat2]);
// Clip the terrain data to the area of interest
var clippedTerrain = terrain.clip(aoi);
// Define the visualization parameters for the elevation data
var visParams = {
min: 0,
max: 4000,
palette: ['blue', 'green', 'yellow', 'red']
};
// Display the clipped elevation data on the map
Map.addLayer(clippedTerrain, visParams, 'Elevation');
// Export the clipped terrain data as a GeoTIFF image
Export.image.toDrive({
image: clippedTerrain,
description: 'elevation_data',
scale: 30,
region: aoi
});