Friday 11 January 2019

Google Earth Engine, Creating a Feature Collection (Geometric points)


I have created an image from the crop landcover dataset containing only the crop type rice (crop_rice). I hoping to make a feature collection (Geometric Points) on all points containing rice. Any ideas on how to go on doing that?


//Select first image crop landcover data set
var dataset = ee.ImageCollection('USDA/NASS/CDL')
.filter(ee.Filter.date('2017-01-01', '2018-12-31'))
.first();

//select band cropland from image
var img_cropLC = dataset.select('cropland');

Map.setCenter(-100.55, 40.71, 4);

//Add visualization layer to view all crop types in the image
Map.addLayer(img_cropLC, {}, 'Crop Landcover');

print(img_cropLC)

//Select all pixel with crop type:Rice (crop class values = 3)
var crop_rice = ee.Image(img_cropLC).eq(3)
print(crop_rice)


//Add a visualization layer to view rice
Map.addLayer(crop_rice.mask(crop_rice),{
bands:'cropland',
palette:'0000FF',
},'Rice Layer')

enter image description here




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...