I am trying to do the classification of farming areas and I do not want to include the city and forest areas. so I want to use land without forest and city. I want to make forest_and_city to geometry so I can use it in my study area.

    //// whole world land data
    var dataset = ee.ImageCollection('MODIS/006/MCD12Q1');
    var igbpLandCover = dataset.select('LC_Type1');

    //// Cut  bordor and separated image yearly
    var multiband = igbpLandCover.toBands()
    // print(multiband)

    //// all propery(17) 
    var property1 = multiband.eq(1)
    var property2 = multiband.eq(2)
    var property3 = multiband.eq(3)
    var property4 = multiband.eq(4)
    var property5 = multiband.eq(5)
    var property6 = multiband.eq(6)
    var property7 = multiband.eq(7)
    var property8 = multiband.eq(8)
    var property9 = multiband.eq(9)
    var property10 = multiband.eq(10)
    var property11 = multiband.eq(11)
    var property12 = multiband.eq(12)
    var property13 = multiband.eq(13)
    var property14 = multiband.eq(14)
    var property15 = multiband.eq(15)
    var property16 = multiband.eq(16)
    var property17 = multiband.eq(17)

    var forest_and_city = property1.max(property2)
    forest_and_city = forest_and_city.max(property3)
    forest_and_city = forest_and_city.max(property4)
    forest_and_city = forest_and_city.max(property5)
    forest_and_city = forest_and_city.max(property13)


    forest_and_city= forest_and_city.neq(1).clip(geometry)
    forest_and_city = forest_and_city.updateMask(forest_and_city.neq(0));

  • Welcome to GIS SE! We're a little different from other sites; this isn't a discussion forum but a Q&A site. Your questions should as much as possible describe not just what you want to do, but precisely what you have tried and where you are stuck trying that. Please check out our short tour for more about how the site works. What happens when you run the code that you have presented? – PolyGeo Nov 21 '19 at 11:13