I'm trying to create a raster layer of the USDA NASS Cropland dataset using only certain crop classes. Is ee.Filter.inList only used for ImageCollections and not Images? It seems more appropriate to import the layer as an Image, not an ImageCollection.
var cdl= ee.Image('USDA/NASS/CDL/2017').select('cropland') var crops=ee.List([1,4,5,7,9,10, 31, 33, 36, 45, 63, 64, 86, 241]) var filtered=cdl.filter(ee.Filter.inList('cropland_class_names', crops))
This doesn't work because I get the error 'cdl.filter is not a function' on the last line. I need to export a new raster which only contains the crop types from a list. I also tried filtering manually for each without success.
What is the proper way to filter my raster down to only these crop types?