Guest User

Untitled

a guest
Nov 21st, 2017
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. //__author__ = "Petr Sevcik"
  2. //__copyright__ = "Petr Sevcik as S.cartography"
  3. //__credits__ = ["Petr Sevcik"]
  4. //__license__ = "GPL"
  5. //__version__ = "1.0"
  6. //__maintainer__ = "Petr Sevcik"
  7. //__email__ = "sevcik.cartography@gmail.com"
  8. //__status__ = "Alpha"
  9.  
  10.  
  11. //Select all Sentinel-1 products from of 2016 and 2017, HH and HV polarization
  12. var collection_HH = ee.ImageCollection('COPERNICUS/S1_GRD')
  13. .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'HH'))
  14. .select('HH')
  15. .filterDate('2016-10-01', '2017-09-30')
  16. ;
  17.  
  18.  
  19. var collection_HV = ee.ImageCollection('COPERNICUS/S1_GRD')
  20. .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'HV'))
  21. .select('HV')
  22. .filterDate('2016-10-01', '2017-09-30')
  23. ;
  24.  
  25.  
  26. //HH and HV polarization imagery
  27. var HV = ee.ImageCollection(collection_HV.reduce(ee.Reducer.intervalMean(65, 70))).mosaic();
  28. var HH = ee.ImageCollection(collection_HH.reduce(ee.Reducer.intervalMean(70, 75))).mosaic();
  29.  
  30.  
  31. //Generate the blue component as a non-absolute difference
  32. var db_difference = HH.subtract(HV)
  33.  
  34. //Build RGB Composites for better understanding
  35. var RGB = ee.Image.cat([
  36. HH,
  37. HV,
  38. db_difference
  39. ]);
  40.  
  41.  
  42. // Display map
  43. // Default location
  44. var pt = ee.Geometry.Point(0.0,0.0);
  45. Map.centerObject(pt, 3);
  46.  
  47. //Add the mosaic layer as a RGB composite with RGB values streching from 'min' to 'max' of the decibel values
  48. Map.addLayer(RGB, {min: [-20, -25, 0], max: [0, -5, 15]}, 'SAR HH HV RGB World 2016-2017');
  49.  
  50.  
  51. // Export the image, specifying scale and region.
  52. Export.image.toDrive({
  53. image: RGB,
  54. description: 'ARCTIC Sentinel-1 HH HV RGB 2016-2017',
  55. scale: 2500,
  56. region: geometry,
  57. });
Add Comment
Please, Sign In to add comment