Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Load a raw Landsat 5 ImageCollection for a single year.
- var collection = ee.ImageCollection('LANDSAT/LC08/C01/T1')
- .filterBounds(geometry).filterDate('2016-12-01', '2017-02-28');
- // Create a cloud-free composite with default parameters.
- var composite = ee.Algorithms.Landsat.simpleComposite(collection);
- // Create a cloud-free composite with custom parameters for
- // cloud score threshold and percentile.
- var customComposite = ee.Algorithms.Landsat.simpleComposite({
- collection: collection,
- percentile: 75,
- cloudScoreRange: 5
- });
- // Export a cloud-optimized GeoTIFF.
- Export.image.toDrive({
- image: composite,
- description: 'cloudFreeSpringTRUE',
- scale: 30,
- region: geometry,
- fileFormat: 'GeoTIFF',
- folder: 'Croatia',
- });
- // Display the composites.
- Map.setCenter(18.1166, 42.6509, 10);
- Map.addLayer(composite, {bands: ['B3', 'B2', 'B1'], max: 128}, 'Cloud free composite');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement