MODIS Data Inconsistencies with GEE
Posted: Fri Dec 20, 2024 2:04 am America/New_York
I can export MODIS data using the geemap library in Python or from Google Earth Engine (both option results are the same). However, I am comparing the data downloaded via GEE with the data downloaded directly from the source and noticing inconsistencies in pixel values when inspecting the data in ArcGIS.
Data source: https://doi.org/10.5067/MODIS/MOD17A3HGF.061
The following code exports the Net Primary Productivity (NPP) data for Turkey in 2022 using Google Earth Engine (GEE):
// Load the NPP data for 2022 from MODIS
var npp2022 = ee.Image('MODIS/061/MYD17A3HGF/2022_01_01')
.select('Npp') // Select the 'Npp' band
.multiply(0.0001) // Apply the scale factor
.rename('NPP_2022'); // Rename the band for clarity
// Define the geometry for Turkey using a country boundaries dataset
var turkey = ee.FeatureCollection('USDOS/LSIB_SIMPLE/2017')
.filter(ee.Filter.eq('country_na', 'Turkey')); // Filter for Turkey
// Clip the NPP image to the geometry of Turkey
var nppTurkey = npp2022.clip(turkey);
// Export the NPP image for Turkey to Google Drive
Export.image.toDrive({
image: nppTurkey, // Image to export
description: 'NPP_2022_Turkey_Map', // Description of the exported file
scale: 500, // Spatial resolution in meters
crs: 'EPSG:4326', // Coordinate reference system
region: turkey, // Region of interest
maxPixels: 1e13 // Maximum number of pixels allowed
});
Data source: https://doi.org/10.5067/MODIS/MOD17A3HGF.061
The following code exports the Net Primary Productivity (NPP) data for Turkey in 2022 using Google Earth Engine (GEE):
// Load the NPP data for 2022 from MODIS
var npp2022 = ee.Image('MODIS/061/MYD17A3HGF/2022_01_01')
.select('Npp') // Select the 'Npp' band
.multiply(0.0001) // Apply the scale factor
.rename('NPP_2022'); // Rename the band for clarity
// Define the geometry for Turkey using a country boundaries dataset
var turkey = ee.FeatureCollection('USDOS/LSIB_SIMPLE/2017')
.filter(ee.Filter.eq('country_na', 'Turkey')); // Filter for Turkey
// Clip the NPP image to the geometry of Turkey
var nppTurkey = npp2022.clip(turkey);
// Export the NPP image for Turkey to Google Drive
Export.image.toDrive({
image: nppTurkey, // Image to export
description: 'NPP_2022_Turkey_Map', // Description of the exported file
scale: 500, // Spatial resolution in meters
crs: 'EPSG:4326', // Coordinate reference system
region: turkey, // Region of interest
maxPixels: 1e13 // Maximum number of pixels allowed
});