# Missing elevation in Google Earth Engine

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.

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 });
}))