gedidb.L2AGranule#
- class gedidb.L2AGranule(file_path: str, field_mapping: Dict[str, str])[source]#
Represents a GEDI Level 2A granule, providing access to its beams and related data.
This class extends the base Granule class and initializes with a specific file path and a field mapping that maps product variables to the corresponding data fields in the granule.
Methods
__init__(file_path, field_mapping)Initialize an L2AGranule object.
beam(identifier)Get a Beam object by its name or index.
build_virtual_dataset(name, shape, dtype[, ...])Assemble a virtual dataset in this group.
clear()close()Close the granule file safely.
copy(source, dest[, name, shallow, ...])Copy an object or group.
create_dataset(name[, shape, dtype, data])Create a new HDF5 dataset
create_dataset_like(name, other, **kwupdate)Create a dataset similar to other.
create_group(name[, track_order])Create and return a new subgroup.
create_virtual_dataset(name, layout[, fillvalue])Create a new virtual dataset in this group.
flush()Tell the HDF5 library to flush its buffers.
get(name[, default, getclass, getlink])Retrieve an item or other information.
in_memory([file_image])Create an HDF5 file in memory, without an underlying file
items()Get a view object on member items
iter_beams()Iterate over all beams in the granule.
keys()Get a view object on member names
list_beams()Get a list of all beams in the granule.
move(source, dest)Move a link to a new location in the file.
pop(k[,d])If key is not found, d is returned if given, otherwise KeyError is raised.
popitem()as a 2-tuple; but raise KeyError if D is empty.
require_dataset(name, shape, dtype[, exact])Open a dataset, creating it if it doesn't exist.
require_group(name)Return a group, creating it if it doesn't exist.
setdefault(k[,d])update([E, ]**F)If E present and has a .keys() method, does: for k in E.keys(): D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v
validate_beam_name(beam)Validate that the provided beam name exists in the granule.
values()Get a view object on member objects
visit(func)Recursively visit all names in this group and subgroups.
visit_links(func)Recursively visit all names in this group and subgroups.
visititems(func)Recursively visit names and objects in this group.
visititems_links(func)Recursively visit links in this group.
Attributes
abstractGet the abstract description of the granule.
attrsAttributes attached to this object
driverLow-level HDF5 file driver used to open file
fileReturn a File instance associated with this object
filenameGet the file name of the granule.
filename_metadataLazily load and cache the parsed metadata from the granule's filename.
idLow-level identifier appropriate for this object
libverlow, high)
meta_block_sizeMeta block size (in bytes)
modePython mode used to open file
n_beamsGet the number of beams in the granule.
nameReturn the full name of this object.
parentReturn the parent group of this object.
productGet the product name from the granule metadata.
refAn (opaque) HDF5 reference to this object
regionrefCreate a region reference (Datasets only).
start_datetimeGet the start datetime from the parsed filename metadata.
swmr_modeControls single-writer multiple-reader mode
userblock_sizeUser block size (in bytes)
uuidGet the UUID of the granule.
version_granuleGet the granule version from the granule metadata.
version_productGet the product version from the granule metadata.