0

I am working on a vegetation type classification using random forest and Sentinel-2 imagery, and I would like to export my final output map (GeoTIFF) which contains 7 classes and some masked areas with no value. However, when exporting the data to my gee assets with the pyramiding policies set to MODE and comparing the output to the original map, I find lots of discrepancies. Also, when I downloaded the output map to my computer I noticed that the masked areas were joined with the first class.

Am I exporting it wrong? Does anyone know what is happening and how I could fix that?

I basically have a trained classifier that I apply on a sentinel-2 mosaic with multiple bands and export it like this:

var trainedClassifier = ee.Classifier.smileRandomForest(100).train({ features: trainingSample, classProperty: label, inputProperties: bands }); var imgClassified = INPUT_IMAGE.classify(trainedClassifier).updateMask(tree_mask); var exportParams = { image: imgClassified, description: 'RF_my_map', assetId: 'users/myuserID/name', scale: 10, region: geometry, maxPixels: 2000000000 }; Export.image.toAsset(exportParams); 
2
  • It would be nice if you could post your code (and a shared link from GEE) so others can track (and replicate) your error by following the steps you conducted in order to export the results. Commented Aug 29, 2023 at 10:28
  • @Nikos Thanks for your reply! I updated my post with some snippets of my code Commented Aug 29, 2023 at 10:46

1 Answer 1

0

That code does not contain anything specifying the pyramiding policy. You need to add:

pyramidingPolicy: {".default": "mode"}, 

to the export.

1
  • Thanks for your reply! I added this line but it does not change anything to the result. The exported map still looks a bit different. I tried all different pyramiding policies. Commented Sep 4, 2023 at 10:12

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.