Skip to content

Granules

# Base.Filesystem.rmMethod.

rm(granule::Granule)

Remove the file associated with granule from the local filesystem.

source

# SpaceLiDAR.downloadFunction.

download(granule::Granule, folder=".")

Download the file associated with granule to the folder, from an http(s) location if it doesn't already exists locally. Returns a new granule. See download! for a mutating version.

Will require credentials (netrc) which can be set with netrc!.

source

# SpaceLiDAR.downloadFunction.

download(granules::Vector{<:Granule}, folder=".")

Like download, but for a vector of granules.

source

# SpaceLiDAR.download!Function.

download!(granule::Granule, folder=".")

Download the file associated with granule to the folder, from an http(s) location if it doesn't already exists locally.

Will require credentials (netrc) which can be set with netrc!.

source

# SpaceLiDAR.download!Function.

download!(granules::Vector{<:Granule}, folder=".")

Like download!, but for a vector of granules. Will make use of aria2c (parallel).

source

# SpaceLiDAR.syncFunction.

sync(folder::AbstractString, all::Bool=false; kwargs...)
sync(folders::AbstractVector{<:AbstractString}, all::Bool=false; kwargs...)
sync(product::Symbol, folder::AbstractString, all::Bool=false; kwargs...)
sync(product::Symbol, folders::AbstractVector{<:AbstractString}, all::Bool=false; kwargs...)

Syncronize an existing archive of local granules in folder(s) with the latest granules available. Specifically, this will run search and download for any granules not yet present in folder(s), to the first folder in the list.

Warning

Using sync could result in downloading significant (TB+) amounts of data.

Assumes all folders contain granules of the same product. If not, pass the product as Symbol: sync instead.

When all is false (the default), sync will search only for granules past the date of the latest granule found in folders. If true, it will search for all granules. Note that ICESat granules are not timestamped, so sync will try to download all ICESat granules not yet present, regardless of this setting.

Any kwargs... are passed to the search function. This enables sync to only download granules within a certain extent, for example.

source

# SpaceLiDAR.ICESatQualityType.

ICESatQuality()

Filter: keep only high-quality ICESat (GLAH06/GLAH14) returns following Smith et al. (2020). The product-specific attitude column is selected by dispatch (:sigma_att_flg for GLAH06, :attitude for GLAH14). See icesat_quality.

source

# SpaceLiDAR.ICESat_GranuleType.

ICESat_Granule{product} <: Granule

A granule of the ICESat product product. Normally created automatically from either search, granule or granules.

source

# SpaceLiDAR.SaturationCorrectType.

SaturationCorrect()

Transform: add :saturation_correction to :height (ICESat). Equivalent to icesat_saturation_correct.

source

# SpaceLiDAR.TopexToWGS84Type.

TopexToWGS84()

Transform: convert ICESat (GLAH06/GLAH14) TOPEX/Poseidon ellipsoid :height (and :height_reference if present) to WGS84. Equivalent to topex_to_wgs84.

source

# SpaceLiDAR.infoMethod.

info(g::ICESat_Granule)

Derive info based on the filename. The name is built up as follows: GLAH06_[release]_[orbit]_[cycle]_[track]_[segment]_[revision]_[filetype].H5.

source

# SpaceLiDAR.ICESat2_GranuleType.

ICESat2_Granule{product} <: Granule

A granule of the ICESat-2 product product. Normally created automatically from either search, granule or granules.

source

# Base.convertMethod.

Base.convert(product::Symbol, g::ICESat2_Granule{T})

Converts the granule g to the product product, by guessing the correct name.

source

# SpaceLiDAR.boundsMethod.

bounds(granule::ICESat2_Granule)

Return the bounding box of the granule as a NamedTuple with fields (min_x, min_y, max_x, max_y).

Warning

This opens the .h5 file, so it is slow.

source

# SpaceLiDAR.infoMethod.

info(g::ICESat2_Granule)

Derive info based on the filename. The name is built up as follows: ATL03_[yyyymmdd][hhmmss]_[ttttccss]_[vvv_rr].h5. See section 1.2.5 in the user guide.

source

# SpaceLiDAR.GEDI_GranuleType.

GEDI_Granule{product} <: Granule

A granule of the GEDI product product. Normally created automatically from either search, granule or granules.

source

# SpaceLiDAR.infoMethod.

info(g::GEDI_Granule)

Derive info based on the filename. This is built up as follows: GEDI02_A_2019110014613_O01991_T04905_02_001_01.h5 or in case of v"2": GEDI02_A_2019242104318_O04046_01_T02343_02_003_02_V002.h5. See section 2.4 in the user guide.

source

Track Angles

# SpaceLiDAR.track_angleFunction.

track_angle(longitude::Vector{Real}, latitude::Vector{Real})

Calculate the angle of direction from previous points in [°] where North is 0°. Points are given as longitude and latitude pairs in their own vector. The angle for the first point is undefined and set to the second.

Because of the inherent noise in the point locations, the angles will be noisy too, especially for ICESat-2 ATL03. Either smooth the results or use an approximation using SpaceLiDAR.track_angle.

Returns a Vector{Real} of angles.

source

track_angle(::GEDI_Granule, latitude = 0.0)

Rough approximation of the track angle (0° is North) of ICESat-2 at a given latitude.

Examples

julia> g = GEDI_Granule(:GEDI02_A, "GEDI02_A_2019242104318_O04046_01_T02343_02_003_02_V002.h5", "", (;))
julia> track_angle(g, 0.0)
38.24944944866377

source

track_angle(::ICESat2_Granule, latitude = 0.0)

Rough approximation of the track angle (0° is North) of ICESat-2 at a given latitude.

Examples

julia> g = ICESat2_Granule(:ATL08, "ATL08_20181120173503_04550102_005_01.h5", "", (;), (;))
julia> track_angle(g, 0.0)
-1.9923955416702257

source