title: Reclassify ranges in Google Earth Engine
body: <p>I would like to reclassify Global Forest Data values i.e like</p>
  
  <p>0  - 20 % --> 1      </p>
  
  <p>21 - 49 % --> 0.5</p>
  
  <p>50 - 100 %  --> 0 </p>
  
  <p>However, I wasn`t able to find how to do this for ranges in GEE. Explanation for reclassifying individual numbers can be found here:</p>
  
  <p><a href="https://sites.google.com/site/globalsnowobservatory/home/Presentations-and-Tutorials/short-tutorial/remap" rel="nofollow noreferrer">https://sites.google.com/site/globalsnowobservatory/home/Presentations-and-Tutorials/short-tutorial/remap</a></p>
  
  <p>but simple procedure for ranges (without decision trees) is hard to find.
  Could someone provide a simple solution for this?</p>
  
  <pre><code>// Example from https://developers.google.com/earth-engine/resample
  // Load a MODIS EVI image.
  var modis = ee.Image(ee.ImageCollection('MODIS/006/MOD13A1').first())
      .select('EVI');
  
  // Get information about the MODIS projection.
  var modisProjection = modis.projection();
  
  // Load and display forest cover data at 30 meters resolution.
  var forest = ee.Image('UMD/hansen/global_forest_change_2015')
      .select('treecover2000');
  
  // Get the forest cover data at MODIS scale and projection.
  var forestMean = forest
      // Force the next reprojection to aggregate instead of resampling.
      .reduceResolution({
        reducer: ee.Reducer.mean(),
        maxPixels: 1024,
        bestEffort:true
      })
      // Request the data at the scale and projection of the MODIS image.
      .reproject({
        crs: modisProjection
      });
  </code></pre>