I'm trying to know how many pixels are inside my polygon when I calculate the mean (and other statistics) by using the "count" reducer. I guess many things go into this: what GEE does with pixels that are split, the right choice of scale, etc. I read somewhere that a pixel will be considered in a calculation when more than 50% of it is included in the polygon. I'm trying to understand what is going on with the following code:
In have two polygons, polygon 1 and 2 that are inside the corresponding pixel. Polygon 1 has an area of 316 m2 and Polygon 2 an area of 360 m2, yet when I use the count reducer I get a value of 0 for the first one and a value of 1 for the second one. What is the rule here? Moreover, I still get a value for the mean even though the count is zero. What am I doing wrong?
I was trying to read the scale documentation about this, but I cannot understand what is going on.