Last active
March 12, 2021 04:12
-
-
Save soiqualang/cd312816ea7c52996355bbc2b5830970 to your computer and use it in GitHub Desktop.
GEE - Extract value from image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var img = ee.Image('LANDSAT/LC08/C01/T1/LC08_044034_20140318'); | |
var dem = ee.Image('USGS/SRTMGL1_003'); | |
var arr1 = ee.FeatureCollection(ee.List([])); | |
var xy = ee.Geometry.Point([86.9250, 27.9881]); | |
var p1 = ee.Geometry.Point([142.36083984375, -37.466138602344046]) | |
var p2 = ee.Geometry.Point([143.23974609375, -37.04640889969956]) | |
var pts = ee.FeatureCollection(ee.List([ee.Feature(p1),ee.Feature(p2)])) | |
print(dem); | |
print(img); | |
var date = img.date().format(); | |
print(date); | |
//var value = img.reduceRegion(ee.Reducer.first(), xy, 30).get('B1') | |
var value = dem.reduceRegion(ee.Reducer.first(), xy, 30).get('elevation') | |
print(value); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
GEE add map
https://krstn.eu/analyze-Sentinel-1-time-series-in-Google-Earth-Engine/