Asset#

class geodesic.stac.Asset(**obj)[source]#

A STAC Asset object. Basically contains links and metadata for a STAC Asset.

Parameters:

**obj – the attributes of this Asset

Attributes

description

StringDescr is a string field, raises attribute error if the string isn't set.

href

StringDescr is a string field, raises attribute error if the string isn't set.

local

Get the local path to this asset, if any.

roles

ListDescr is a list field, such as links in a GeoJSON feature collection object.

title

StringDescr is a string field, raises attribute error if the string isn't set.

type

StringDescr is a string field, raises attribute error if the string isn't set.

Methods

clear()

copy()

download([out_dir])

Download the asset to a local directory, returns the full path to the asset.

fromkeys([value])

Create a new dictionary with keys from iterable and values set to value.

get(key[, default])

Return the value for key if key is in the dictionary, else default.

has_role(role)

Does this have a requested role?

items()

keys()

new()

Returns a new asset with all the fields empty.

pop(k[,d])

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem()

Remove and return a (key, value) pair as a 2-tuple.

setdefault(key[, default])

Insert key with a value of default if key is not in the dictionary.

update(*mapping, **kwargs)

values()