Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. Map.setCenter(9.5, 0.2, 10)
  2.  
  3. var MaxMangrove = Mangroves.max()
  4. print('Pixel Size = ', MaxMangrove.projection().nominalScale())
  5.  
  6. Map.addLayer(MaxMangrove, {min:0,max:1}, 'Max Mangrove Value')
  7.  
  8. // not sure if it wants res in m or degrees here
  9. var MangroveProj = MaxMangrove.setDefaultProjection('EPSG:4326', null, 30)
  10.  
  11. var PixelArea = MangroveProj.multiply(ee.Image.pixelArea())
  12.  
  13. // This runs fine and displays the image I want - an image where the
  14. // pixel value is the pixel area. This should change with latitude
  15. // but it changes with zoom
  16. Map.addLayer(PixelArea, {min:0,max:100}, 'Pixel Area')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement