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')
No comments:
Post a Comment