Searching Earthdata
EarthData.jl searches CMR granule and collection endpoints and returns typed UMM records:
using EarthData
granule_results = granules(short_name="GEDI02_A")
collection_results = collections(short_name="GEDI02_A")The accepted keyword arguments are CMR search parameters. Use fieldnames(EarthData.GranuleRequest), fieldnames(EarthData.CollectionRequest), and fieldnames(EarthData.QueryParams) to inspect the supported names.
Granules
granules returns Vector{EarthData.Granules.UMM_G}. Each record exposes the UMM-G fields from NASA's schema as Julia struct fields:
gg = granules(short_name="GEDI02_A")
first(gg).GranuleUR
first(gg).RelatedUrlsBy default, EarthData.jl requests one CMR page. Set page_size to control the page size and all=true to continue through all pages using the CMR-Search-After response header:
all_granules = granules(short_name="GEDI02_A", page_size=2000, all=true)Collections
collections searches collection metadata and returns Vector{EarthData.Collections.UMM_C}:
cc = collections(short_name="GEDI02_A")
first(cc).EntryTitle
first(cc).AbstractRequest method
CMR searches use POST by default. Use method=:GET when compatibility with a GET-only proxy or workflow is required:
gg = granules(short_name="GEDI02_A", method=:GET)