1

I am trying to measure river width using GEE, but everytime this error coming up

Feature collection( error)

Image.clip: Parameter 'input' is required.

// Goal: calculate river centerlines and widths for one Landsat 

// load in RivWidthCloud
var fns = require('users/eeProject/RivWidthCloudPaper:rwc_landsat.js');

// assign the image id of the image from which the widths and centerline will be extracted
var imageId = "LANDSAT/LE07/C02/T1_L2/LE07_139043_20170616";

print(imageId);
 
// setting the parameters for the rivwidthcloud (rwc) function
var aoi = ee.Geometry.Polygon(
        [[[87.03177053763748, 23.81382559855354],
          [87.03177053763748, 23.027480838211885],
          [87.1084104302156, 23.027480838211885],
          [87.108104302156, 23.81382559855354]]], null, false);
var rwc = fns.rwGenSR('Jones2019', 4000, 333, 500, aoi);


// apply the rwc function to the image
var widths = rwc(imageId);

// remove the geometry before exporting the width as CSV file
widths = widths.map(function(f) {return(f.setGeometry(null))});
print(widths);

// export the result as a CSV file into Google drive
Export.table.toDrive({
  collection: widths,
  description: imageId,
  folder: "",
  fileNamePrefix: imageId,
  fileFormat: ""});
1

1 Answer 1

0

You are asking for an Image (LANDSAT/LE07/C02/T1_L2/LE07_139043_20170616) that is not supported by that older version RivWidthCloudPaper library:

  1. You are asking for collection 2 data ("C02") and the module only handles collection 1 "C01" images (source). However, collection 1 data is no longer available in GEE, and

  2. The module filters out any post-2003 SLC-OFF Landsat 7 (source) and you are asking for 2017 Landsat 7.

If you want to use this algorithm, you'll need to:

  1. follow the instructions here to use an updated module that supports collection 2 data, i.e.

    var fns = require('users/eeProject/RivWidthCloudPaper:rwc_landsat_C2.js');
    
  2. specify Landsat 8 imagery if you want 2017 data.

Your Answer

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

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