Page 1 of 1
GEDI L2B products : removing nan valeus, noises and analysus
Posted: Mon May 20, 2024 7:31 am America/New_York
by loriesouza
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
Re: GEDI L2B products : removing nan valeus, noises and analysus
Posted: Mon May 20, 2024 10:15 am America/New_York
by LP DAAC-EDL - dgolon
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
Re: GEDI L2B products : removing nan valeus, noises and analysus
Posted: Mon May 20, 2024 1:56 pm America/New_York
by loriesouza
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 ?
Re: GEDI L2B products : removing nan valeus, noises and analysus
Posted: Tue Jun 18, 2024 9:40 am America/New_York
by LP DAAC-EDL - dgolon
Hi
@loriesouza Could you please send your shapefile to
lpdaac@usgs.gov, we'd like to look deeper into this. Thanks - Danielle
Re: GEDI L2B products : removing nan valeus, noises and analysus
Posted: Mon Jul 01, 2024 3:14 pm America/New_York
by LP DAAC-EDL - kyrad
@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
Re: GEDI L2B products : removing nan valeus, noises and analysus
Posted: Wed Jul 03, 2024 9:02 am America/New_York
by vuelitics
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.