Whenever you perform a reduction on an image collection, such as sentinel5p.mean()
, the result does not have the default projection from the input. This is because image collections often have images with many different projections (because satellites may pass over the same location from different angles, producing different pixel grids), and Earth Engine's .projection()
does not attempt to list the entire collection to check if they all have the same projection.
Thus, var native_resolution = output.projection().nominalScale();
does not get you the native resolution of Sentinel-5P — rather, the composite's default projection is the generic WGS 84 1-degree-per-unit, so the number is just the figure of 111 km/degree at the Earth's equator.
In this case, it appears that Sentinel-5P images of different areas do have the same projection — I examined some samples to check:
var list = sentinel5p.toList(3);
print(list.map(function (image) {
return ee.Image(image).projection();
}));
So, in order to find the nominal scale, you need to use the projection of one of the images, not the composite.
var native_resolution = sentinel5p.first().projection().nominalScale();
print(native_resolution);
This prints a value of 1113 m, which is smaller than you're expecting — but remember that this is the figure of meters per stored image pixel, whereas the original data is in a different grid with a different orientation. We can even see this. Here's a closeup of part of the mean composite (limited to only a few images):
The smallest jagged edges visible at the mask reflect the 1.1 km pixel resolution of the images stored in Earth Engine (that is, I've zoomed in past the resolution of the image). The larger solid color rectangles reflect the resolution of the original sensor data — which you can see falls onto several different grids with different aspect ratios.
If you export using the scale and projection from sentinel5p.first()
then you will get an image that contains all of this information, but it will be blocky as above. If you export using a larger scale
number, you'll have fewer pixels (and thus slightly less of the original spatial information) but you'll be closer to the sampling resolution of the actual data. It's up to you to choose what your application actually needs.
But in neither case will you get an image which has pixels of 3.5 × 7 km resolution, because that's not what the dataset that has been stored in Earth Engine actually contains — it's been processed to have a consistent projection rather than to follow the satellite's sensor's swath.