Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

257
Views
Line 18: Unrecognized arguments (Properties) to function: Image.sampleRegions(image, collection, properties, scale, projection, tileScale, geometries)

in google earth engine, i am not able to run my code. i got an error message of "Line 18: Unrecognized arguments (Properties) to function: Image.sampleRegions(image, collection, properties, scale, projection, tileScale, geometries)"

 var image = ee.ImageCollection("COPERNICUS/S2_SR")
   .filterDate('2022-01-01','2022-03-30')
.filterBounds(table)
.median();
var visParamsTrue = {bands: ['B4', 'B3', 'B2'], min: 0, max: 2500, gamma: 1.1};
Map.addLayer(image.clip(table), visParamsTrue, 'Sentinel 2022');
Map.centerObject(table, 8);

//create training data
var training = Waterbody.merge(Builtup).merge(Agriculture).merge(Vegetation).merge(BarrenLand);
print(training);
var label = 'Class';
var bands = ['B2', 'B3', 'B4', 'B5'];
var input = image.select(bands);
print (input);

//overlay THE POINTS ON THE IMAGERY Training
var trainImage = input.sampleRegions({
  collection: training,
  Properties: label,
  scale: 10,
  //region: table
}).flatten();

var trainingData = trainImage.randomColumn();
var trainSet = trainingData.filter(ee.Filter.lessThan('random', 0.8));
var trainSet = trainingData.filter(ee.Filter.greaterThanOrEquals('random', 0.8));

//classification model
var classifier = ee.Classifier.smilecart().train(trainset, label, bands);

//Classify the image
var classified = input.classify(classifier);

//Define a pallete for the classification
var landcoverPallete = [
  '253494',
  '969696',
  'FF8000',
  '006837',
  '000000',
];

Map.addLayer(classified.clip(table), {palette: landcoverPlaette, min:0, max:4}, 'classification CART');

this is my code code link is https://code.earthengine.google.com/b03394b859814bc185c607c847781609

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!