Thursday, 27 December 2018

Google Earth Engine - Error downloading cloudfree Sentinel image


I got the following error message after trying to import cloud-free Sentinel-2 imagery for a polygon area covering the entire Tiwi Islands, Australia.




true-colour image: Layer error: internal error



// Filter to only include images intersecting Tiwi.

var polygon = ee.Geometry.Polygon({
coords: [[
[129.90415998438357,-12.027354108834277], [131.63999982813357,-12.027354108834277],
[131.63999982813357,-11.101721188177093], [129.90415998438357,-11.101721188177093],
[129.90415998438357,-12.027354108834277]]],

geodesic: false
});

// Define the image collection we are working with by writing this command
var image = ee.Image(sent2

// filter to get only images in the date range we are interested in
.filterDate("2018-09-01", "2018-11-30")

// sort the collection by a metadata property, in our case cloud cover is a very useful one

.sort("CLOUD_COVERAGE_ASSESSMENT")

// select the first image out of this collection - i.e. the most cloud free image in the date range
.first());

// print the image to the console.
print("A Sentinel-2 scene:", image);

// Define visualization parameters in a JavaScript dictionary for true colour rendering. Bands 4,3 and 2 needed for RGB.
var trueColour = {

bands: ["B4", "B3", "B2"],
min: 0,
max: 3000
};

// Add the image to the map, using the visualization parameters.
Map.addLayer(image, trueColour, "true-colour image");


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...