In Google Earth Engine, the function glcmTexture() outputs 18 types of texture bands. Out of these, one band (suffixed as _maxcorr) is actually not computed by the servers but still exists in the output as a GLCM band with all zero pixel values.

This _maxcorr band creates a problem when band-wise normalization of the image composite is attempted by the unitScale() function as this function requires min value to be less than the max value.

How to tackle this issue?

I thought of two possibilities:

Prevent glcmTexture() from generating the "_maxcorr" band OR Remove "_maxcorr" band before input to unitScale() function

How to remove a specific band from an image in GEE? Trying reverse by using .select() function is not feasible as there are hundreds of other bands in the composite that need to be selected.

3 Answers 3


In order to remove particular bands from an image, you can take the image's bandNames, filter that list to only the bands you want, and select those bands from the image:

function removeMaxCorr(glcmImage) {
  return glcmImage.select(
      ee.Filter.stringEndsWith('item', '_maxcorr').not()));


(The pseudo-property name 'item' is the name used to refer to the value of a List item that isn't a feature with its own properties — here, a string.).

  • What is meant by 'item'?
    – cengstro
    Feb 25, 2022 at 18:14
  • 1
    @cengstro It's the list item itself. I've added a link to the documentation. Thanks for pointing that out!
    – Kevin Reid
    Feb 25, 2022 at 21:09
// Python Implementation for Removing bands
nameOfBands = image.bandNames().getInfo()
print(nameOfBands) // Check if everything in order

image = image.select(nameOfBands) // Select all bands except the one you wanna remove
  • Ha - the Python one is so much more straightforward
    – fionag11
    Sep 29, 2021 at 17:46

Javascript API solution for removing bands in list

var bandNames = image.bandNames()
var bandsToRemove = ['AOT','WVP']
var bandsToKeep = bandNames.removeAll(bandsToRemove)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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