GEDI L2B products : removing nan valeus, noises and analysus
-
- Posts: 8
- Joined: Mon May 20, 2024 7:24 am America/New_York
GEDI L2B products : removing nan valeus, noises and analysus
Dear collegues,
I need to do a height map to my aoi, includes more than 30 boundaries. All tutorials, indicates the download of data from usgs with .h5 type. As my area is extensive, I want to do download from Google Earth Engine, but I need all values and not only mean or median , because measurements of central tendency can be obfuscate the data , because is an area heterogeneous (agroforestry)
Above select all data , how I can export all values from rh100?rh90?rh98 etc.??
var dataset = ee.ImageCollection('LARSE/GEDI/GEDI02_A_002_MONTHLY')
.map(qualityMask)
.select(['rh98','rh90','rh75','rh50'])
.filterBounds(municipiosIntersectados)
.filterDate(startDateObj, endDateObj);
I appreciate your time
I need to do a height map to my aoi, includes more than 30 boundaries. All tutorials, indicates the download of data from usgs with .h5 type. As my area is extensive, I want to do download from Google Earth Engine, but I need all values and not only mean or median , because measurements of central tendency can be obfuscate the data , because is an area heterogeneous (agroforestry)
Above select all data , how I can export all values from rh100?rh90?rh98 etc.??
var dataset = ee.ImageCollection('LARSE/GEDI/GEDI02_A_002_MONTHLY')
.map(qualityMask)
.select(['rh98','rh90','rh75','rh50'])
.filterBounds(municipiosIntersectados)
.filterDate(startDateObj, endDateObj);
I appreciate your time
Filters:
-
- User Services
- Posts: 422
- Joined: Mon Sep 30, 2019 10:00 am America/New_York
- Has thanked: 31 times
- Been thanked: 8 times
- Contact:
Re: GEDI L2B products : removing nan valeus, noises and analysus
Hi @loriesouza I will talk with our LP DAAC developers to see if we have any resources that might help you but if you are set on using GEE, we recommend reaching out to them directly here: https://developers.google.com/earth-engine/help. They also sometimes check this forum @earthengine_urs Thanks -- Danielle
Subscribe to the LP DAAC listserv by sending a blank email to lpdaac-join@lists.nasa.gov.
Sign up for the Landsat listserv to receive the most up to date information about Landsat data: https://public.govdelivery.com/accounts/USDOIGS/subscriber/new#tab1.
Sign up for the Landsat listserv to receive the most up to date information about Landsat data: https://public.govdelivery.com/accounts/USDOIGS/subscriber/new#tab1.
-
- Posts: 8
- Joined: Mon May 20, 2024 7:24 am America/New_York
Re: GEDI L2B products : removing nan valeus, noises and analysus
Thanks Danielle !!
1)But in EarthData catalogue I can do download for all data ? I put the shapefile , but returns 80 files for individual download in hdf type, I can do download for all footprints in unique donwload ?
1)But in EarthData catalogue I can do download for all data ? I put the shapefile , but returns 80 files for individual download in hdf type, I can do download for all footprints in unique donwload ?
-
- User Services
- Posts: 422
- Joined: Mon Sep 30, 2019 10:00 am America/New_York
- Has thanked: 31 times
- Been thanked: 8 times
- Contact:
Re: GEDI L2B products : removing nan valeus, noises and analysus
Hi @loriesouza Could you please send your shapefile to lpdaac@usgs.gov, we'd like to look deeper into this. Thanks - Danielle
Subscribe to the LP DAAC listserv by sending a blank email to lpdaac-join@lists.nasa.gov.
Sign up for the Landsat listserv to receive the most up to date information about Landsat data: https://public.govdelivery.com/accounts/USDOIGS/subscriber/new#tab1.
Sign up for the Landsat listserv to receive the most up to date information about Landsat data: https://public.govdelivery.com/accounts/USDOIGS/subscriber/new#tab1.
-
- Posts: 7
- Joined: Tue Feb 14, 2023 3:48 pm America/New_York
Re: GEDI L2B products : removing nan valeus, noises and analysus
@loriesouza I was able to submit a smaller shapefile zip into EDSC. I think you may be running into issues due to your boundary size. We suggest breaking down your shapefile into multiple zips and uploading them that way. If you continue to have issues, please let us know. Thanks!
-Kyra
-Kyra
Re: GEDI L2B products : removing nan valeus, noises and analysus
To export all values (not just mean or median) from specific bands like rh98, rh90, rh75, and rh50 from your dataset, you can use Google Earth Engine's reduceRegion function along with export.table.toDrive to export the data as a CSV file. Here's how you can modify your
script:
// Load the dataset
var dataset = ee.ImageCollection('LARSE/GEDI/GEDI02_A_002_MONTHLY')
.map(qualityMask)
.select(['rh98', 'rh90', 'rh75', 'rh50'])
.filterBounds(municipiosIntersectados)
.filterDate(startDateObj, endDateObj);
// Function to reduce each image to a single row per region of interest
var reduceToTable = function(image) {
var stats = image.reduceRegion({
reducer: ee.Reducer.percentile([98, 90, 75, 50]),
geometry: municipiosIntersectados,
scale: 30, // Adjust scale as per your requirement
bestEffort: true,
});
return ee.Feature(null, stats);
};
// Apply the reduceRegion function to each image in the collection
var reduced = dataset.map(reduceToTable);
// Flatten the collection of features into a single FeatureCollection
var featureCollection = ee.FeatureCollection(reduced);
// Export the FeatureCollection to Google Drive as a CSV file
Export.table.toDrive({
collection: featureCollection,
description: 'GEDI_percentiles_data',
fileFormat: 'CSV',
});
Explanation:
Loading Dataset: Load the GEDI dataset and apply any necessary filters (qualityMask, filterBounds, filterDate).
Mapping Percentiles: Select the bands (rh98, rh90, rh75, rh50) and map a function (reduceToTable) over the image collection to compute the percentiles for each image.
ReduceRegion Function: Within reduceToTable, use reduceRegion with ee.Reducer.percentile to calculate the specified percentiles (98, 90, 75, 50) for each image within the specified region (municipiosIntersectados).
FeatureCollection: Convert the reduced image collection (reduced) into a FeatureCollection where each feature contains the computed percentiles as properties.
Export to Drive: Use Export.table.toDrive to export the FeatureCollection to Google Drive as a CSV file. Adjust description and other parameters (fileFormat, scale, etc.) as per your specific needs.
Make sure to replace municipiosIntersectados, startDateObj, and endDateObj with your actual variables or values. Adjust the scale parameter in reduceRegion according to the resolution needed for your analysis.
script:
// Load the dataset
var dataset = ee.ImageCollection('LARSE/GEDI/GEDI02_A_002_MONTHLY')
.map(qualityMask)
.select(['rh98', 'rh90', 'rh75', 'rh50'])
.filterBounds(municipiosIntersectados)
.filterDate(startDateObj, endDateObj);
// Function to reduce each image to a single row per region of interest
var reduceToTable = function(image) {
var stats = image.reduceRegion({
reducer: ee.Reducer.percentile([98, 90, 75, 50]),
geometry: municipiosIntersectados,
scale: 30, // Adjust scale as per your requirement
bestEffort: true,
});
return ee.Feature(null, stats);
};
// Apply the reduceRegion function to each image in the collection
var reduced = dataset.map(reduceToTable);
// Flatten the collection of features into a single FeatureCollection
var featureCollection = ee.FeatureCollection(reduced);
// Export the FeatureCollection to Google Drive as a CSV file
Export.table.toDrive({
collection: featureCollection,
description: 'GEDI_percentiles_data',
fileFormat: 'CSV',
});
Explanation:
Loading Dataset: Load the GEDI dataset and apply any necessary filters (qualityMask, filterBounds, filterDate).
Mapping Percentiles: Select the bands (rh98, rh90, rh75, rh50) and map a function (reduceToTable) over the image collection to compute the percentiles for each image.
ReduceRegion Function: Within reduceToTable, use reduceRegion with ee.Reducer.percentile to calculate the specified percentiles (98, 90, 75, 50) for each image within the specified region (municipiosIntersectados).
FeatureCollection: Convert the reduced image collection (reduced) into a FeatureCollection where each feature contains the computed percentiles as properties.
Export to Drive: Use Export.table.toDrive to export the FeatureCollection to Google Drive as a CSV file. Adjust description and other parameters (fileFormat, scale, etc.) as per your specific needs.
Make sure to replace municipiosIntersectados, startDateObj, and endDateObj with your actual variables or values. Adjust the scale parameter in reduceRegion according to the resolution needed for your analysis.