3

I don't know if I am the only one who struggles with this, but I seem to have a lot of problems selecting the best parameters to visualize images in Google Earth Engine. I am wondering if anyone has a methodology for doing this for multiband images (e.g. Landsat)?

I don't need to know what the best parameters are, but rather the best method for selecting parameters.

>     var ROI = ee.Geometry.Rectangle(-79.6179, 34.8945,-78.7994, 35.2923);
>     
>     var landsat5 = "LANDSAT/LT05/C01/T1_SR";
>     
>     var start = '1998-09-24';
>     var end = '1998-09-29';
>     
>     var collection = ee.ImageCollection(landsat5)
>         .filter(ee.Filter.eq('WRS_PATH', 16))
>         .filter(ee.Filter.eq('WRS_ROW', 36))
>         .filterDate(start, end);
>         
>     var image = ee.Image(collection.first()); // get first image
>     
>     // Define the visualization parameters.
>     var visParams = {
>       bands: ['B3', 'B2', 'B1'],
>       min: 0,
>       max: 2500,
>       gamma: [0.95, 1.1, 1]
>     };
> 
> Map.centerObject(ROI); Map.addLayer(image,visParams,
> 'image');

I know that I can change min, max, and gamma, but I always feel like I am just shooting in the dark.

2

I think your best option is to use this

Observe that the visualization parameters are defined by an object literal, which includes a list of bands to display, a minimum and maximum digital number and a gamma value. (Learn more about Landsat bands What are the band designations for the Landsat satellites?. Learn more about image visualization Image Visualization.

  • I do understand Landsat bands and have no trouble displaying them in R or ArcGIS, the problem lies in my understanding of how Google Earth Engine is displaying image. The Image Visualization explanation for GEE is pretty bare bones – user44796 Dec 3 '18 at 16:20
  • 1
    What if you could read out the min and max spectral values for each band in either your extent or within a polygon defined area and then pass these on to the min and max parameters? This way you could get your custom setting for the visualisation parameters. Maybe try and utilise the "image.reduce()" function - developers.google.com/earth-engine/reducers_reduce_region – aneh Jan 23 at 16:14

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.