0

I was wondering if theres a way to display single Landcover classes from the Corine Land Cover-Dataset in GEE. I know i somehow have to select the landcover_class_names or values in the property section of the image but I'm not sure how to do that.

var corine = ee.ImageCollection('COPERNICUS/CORINE/V18_5_1/100m').first();

print(corine);
print(corine.propertyNames());
var lc_value = corine.get('landcover_class_values');
print(lc_value);

Thats my code so far. Now i only want to display the forest areas.

0

If you want to display a single value (or set of values) in the Map Viewer then I suggest using the ee.Image.updateMask() function. This will set all values in the input image that correspond to 0 values in the mask image to no data.

Here is the code for your example:

var corine = ee.ImageCollection('COPERNICUS/CORINE/V18_5_1/100m').first();

print(corine);
print(corine.propertyNames());
var lc_value = corine.get('landcover_class_values');
print(lc_value);

var forest = corine.updateMask(corine.gte(23).and(corine.lte(32)))

Map.addLayer(forest)

I looked at the Corine image metadata to find which values are forest (23-34) and used logical operators to get an binary image as the mask image to .updateMask(). I hope this helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.