Image Scaling¶
Image scaling now is A LOT EASIER with eemont! Let’s see how!
Before anything, let’s import our modules and authenticate in Google Earth Engine:
import ee, eemont
ee.Authenticate()
ee.Initialize()
Now, we are ready to go!
Overview¶
The eemont package extends the ee.Image and ee.ImageCollection classes with the method scale()
:
Supported Platforms¶
This method automatically scales images from the following supported satellite platforms:
Sentinel Missions¶
Landsat Missions¶
MODIS Products (Terra + Aqua)¶
MODIS Products (Terra)¶
MOD09GA.006 Terra Surface Reflectance Daily Global 1km and 500m
MOD11A1.006 Terra Land Surface Temperature and Emissivity Daily Global 1km
MOD11A2.006 Terra Land Surface Temperature and Emissivity 8-Day Global 1km
MOD14A1.006: Terra Thermal Anomalies & Fire Daily Global 1km
MOD17A2H.006: Terra Gross Primary Productivity 8-Day Global 500M 500m
MOD17A3HGF.006: Terra Net Primary Production Gap-Filled Yearly Global 500m
MODIS Products (Aqua)¶
MYD09GA.006 Aqua Surface Reflectance Daily Global 1km and 500m
MYD11A1.006 Aqua Land Surface Temperature and Emissivity Daily Global 1km
MYD11A2.006 Aqua Land Surface Temperature and Emissivity 8-Day Global 1km
MYD17A2H.006: Aqua Gross Primary Productivity 8-Day Global 500M 500m
MYD17A3HGF.006: Aqua Net Primary Production Gap-Filled Yearly Global 500m
Warning
Not supported satellite platforms will raise an Exception.
Usage¶
The scale()
method scales each image according to the Scale and Offset parameters.
Let’s take the Sentinel-2 SR image collection as example:
S2 = ee.ImageCollection('COPERNICUS/S2_SR')
The spectral bands from Sentinel-2 have values close to the (0, 10000) range, but they’re unscaled. In order to get the real values, each spectral band must be multiplied by 0.0001, while AOT and WVP bands must be multiplied by 0.001. This scaling is automatically done by the scale()
method, without any additional parameters:
S2.scale()
The Scale and Offset parameters vary according to the satellite platform and the scale()
method detects the platform and do the scaling according to its parameters.
Let’s take now the MOD11A2 product from MODIS. The LST_Day_1km and LST_Night_1km bands must be multiplied by 0.02, the Day_view_time and Night_view_time bands must be multiplied by 0.1,
the Emis_31 and Emis_32 bands must be multiplied by 0.002 and added by 0.49, while the Day_view_angl and Night_view_angl bands must be added by -65. All of this scaling
is simply done by the scale()
method:
MOD11A2scaled = ee.ImageCollection('MODIS/006/MOD11A2').scale()
The scale()
method can be applied to single images as well:
MOD11A2scaled = ee.ImageCollection('MODIS/006/MOD11A2').first().scale()