Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var collectionFilter = ee.ImageCollection('LANDSAT/LC08/C01/T1_RT_TOA')
- .filterBounds(geometry)
- .filterMetadata('CLOUD_COVER','less_than',4)
- .map(app);
- print(collectionFilter)
- var app = function (image)
- {
- //indice de vegetação
- var ndvi = image.normalizedDifference(['B5', 'B4']);
- image=image.addBands (ndvi.rename('NDVI'));
- return image
- }
- Map.onClick(function(lonlat){
- var pixel = ee.Geometry.Point([lonlat.lon, lonlat.lat])
- var collection = collectionFilter
- .select(
- ["NDVI"]
- )
- var options = {
- title : 'NDVI CHART VALUES'
- };
- var graph = (
- ui.Chart.image.series(
- collection,
- pixel,
- ee.Reducer.mean(),
- 30
- )
- .setOptions(options)
- );
- print(graph
- )
- Export.table.toDrive({
- collection: collection,
- description: 'exporting in json format each click',
- fileFormat: 'JSON'
- });
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement