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

285
Views
I can find area of both classes 0 and 1. But after this I need to use if condition for both 0 and 1. How can I do? FYI, 0 is field and 1 is not field

I can find area of both classes 0 and 1. But after this I need to use if condition for both 0 and 1. How can I do? FYI, 0 is field and 1 is not field.

var training_points=Field.merge(non_field)
var training_data =image.sampleRegions({collection:training_points, properties: 
['LC'],scale:30})
var classifier=ee.Classifier.smileCart()
var classifier=classifier.train({features:training_data,classProperty:'LC', 
inputProperties:["B1","B2","B3","B4","B5","B6","B7","B8","B8A","B9","B11","B12"]})
var classified_image= image.classify(classifier)
var clipped_classified_image=classified_image.clip(point)
Map.addLayer(clipped_classified_image,{min:0,max:1, palette:['black','white']}, 
'classified image')
print (clipped_classified_image) 

var all_classes_area = ee.Image.pixelArea().addBands(clipped_classified_image)
                  .reduceRegion({
                    reducer: ee.Reducer.sum().group({groupField:1}), 
                    geometry: clipped_classified_image.geometry(),
                    scale: 30,
                    bestEffort: true
                  })
print(all_classes_area, 'All Classes Area in Square M')

I need something like this: if group(0)>group(1): continue the process.....

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!