0

I'm trying to estimate the elevation at given point. Since the estimation has to happen in real-time, I'm willing to compromise in the resolution by having a min and max elevation returned instead. I thought that I would start by creating a dataset using Google Earth Engine by dividing the earth roughly into 10 by 5 degree chunks.

chunks

Then I iterated over each chunk and added min/max elevation to each chunk using SRTM Digital Elevation Data Version 4. What I noticed is that if the chunk contains large areas of water the min/max is missing from the result. For example the following code calculates the elevation around Norway

var elevation = ee.Image('CGIAR/SRTM90_V4').select('elevation');

var createRectangle = function(lon, lat, dLon, dLat) {
  var lon1 = ee.Number(lon).subtract(dLon / 2);
  var lat1 = ee.Number(lat).subtract(dLat / 2);
  var lon2 = ee.Number(lon).add(dLon / 2);
  var lat2 = ee.Number(lat).add(dLat / 2);
  return ee.Geometry.Rectangle([lon1, lat1, lon2, lat2]);
};

var rectangles = [];
var dLon = 10;
var dLat = 5;
for (var lon = 2; lon < 20; lon+=dLon) {
  for (var lat = 59; lat < 65; lat+=dLat) {
    rectangles.push(createRectangle(lon, lat, dLon, dLat));
  }
}

var elevationStats = ee.FeatureCollection(rectangles.map(function(rectangle) {
  var statistics = elevation.reduceRegion({
    reducer: ee.Reducer.minMax(),
    geometry: rectangle,
    scale: 30000
  });

  var minElevation = ee.Number(statistics.get('elevation_min'));  
  var maxElevation = ee.Number(statistics.get('elevation_max'));
  
  return ee.Feature(rectangle, { min: minElevation, max: maxElevation });
}))

Map.addLayer(elevationStats, {color: 'red'}, 'Elevation');

around norway

The 2 top most rectangles west coast of Norway have no elevation data where the bottom ones do. I figure that the SRTM90 does not have elevation for "ocean" but all of the chunks contain some land.

Am I using the Reducer wrong?

Edit 1: I just noticed that the SRTM Digital Elevation Data Version 4 does not contain data above latitude 15... "high-quality elevation data at near global scope" indeed

1 Answer 1

0

It seems that the data source SRTM Digital Elevation Data Version 4 does not contain data above latitude 15.

enter image description here

If switched to GTOPO30: Global 30 Arc-Second Elevation all is fine

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.