Advertisement
Guest User

Untitled

a guest
May 19th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.90 KB | None | 0 0
  1. // Load a raw Landsat 5 ImageCollection for a single year.
  2. var collection = ee.ImageCollection('LANDSAT/LC08/C01/T1')
  3. .filterBounds(geometry).filterDate('2016-12-01', '2017-02-28');
  4.  
  5. // Create a cloud-free composite with default parameters.
  6. var composite = ee.Algorithms.Landsat.simpleComposite(collection);
  7.  
  8. // Create a cloud-free composite with custom parameters for
  9. // cloud score threshold and percentile.
  10. var customComposite = ee.Algorithms.Landsat.simpleComposite({
  11.   collection: collection,
  12.   percentile: 75,
  13.   cloudScoreRange: 5
  14. });
  15.  
  16. // Export a cloud-optimized GeoTIFF.
  17. Export.image.toDrive({
  18.   image: composite,
  19.   description: 'cloudFreeSpringTRUE',
  20.   scale: 30,
  21.   region: geometry,
  22.   fileFormat: 'GeoTIFF',
  23.   folder: 'Croatia',
  24. });
  25.  
  26. // Display the composites.
  27. Map.setCenter(18.1166, 42.6509, 10);
  28. Map.addLayer(composite, {bands: ['B3', 'B2', 'B1'], max: 128}, 'Cloud free composite');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement