0

I previously posted about this same problem as Iterating over years for features in feature collection using Google Earth Engine?

I realized recently that the results that I was getting based on the solution were actually incorrect as I had misread what the variables mean. In fact, it is impossible to get the 'gain' in trees per year so I'm not really sure what the values the code computed were.

Anyhow, I've rewritten the code, and it seems to work in theory, but I am having difficulty with one aspect of it. In particular, I understand that the resolution of the Hansen data is 30 meters per pixel. For this reason, I followed the tutorial for the data and tried to set scale: 30 in my image reduction. However, this causes the console to time out, even though I set maxPixels: 1e9.

When I increase the scale to 100 or greater, it works fine. However, I have been reading about scale here: https://developers.google.com/earth-engine/scale and I still don't have a clear idea what exactly it means for the interpretability of my results. Ideally, I am trying to use the data to be able to talk about square meters of loss in forest, as they do in the tutorial: https://developers.google.com/earth-engine/tutorial_forest_03

Is it okay for me to set scale to higher than scale:30, and what will that mean for interpreting the computation?

2

As described here, use Export to overcome time out errors. If you are using a higher scale, the aggregated data will be resampled as necessary to perform the computation at the specified scale. However, the pyramiding policy of the 'loss' and 'gain' bands is mean, which means that two 0s and two 1s becomes a 1, introducing a slight positive bias. If you can get away with an export instead of reduced scale, that is the recommended approach.

  • Thanks, I actually ended up finding that guide and using the Export strategy. It took about 40 minutes to compile, but it worked. But thanks for explaining the bias issue. Is it true for any kind of data if you change the scale? – Sveinn Apr 3 '18 at 18:49
  • The aggregation (pyramiding) policy can differ for each image and each band within an image. Generally, use mean for continuous data and mode for nominal data, though it's clear that rule is not universally implemented. Also, mode in this context would introduce a different kind of bias since sample is used to break ties. If the answer helps, please upvote it. – Nicholas Clinton Apr 4 '18 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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