Enum stac_cli::Subcommand

source ·
pub enum Subcommand {
    Item {
        id_or_href: String,
        id: Option<String>,
        key: String,
        role: Vec<String>,
        allow_relative_paths: bool,
        disable_gdal: bool,
        collect: bool,
    },
    Search {
Show 14 fields href: String, max_items: Option<usize>, limit: Option<String>, bbox: Option<String>, datetime: Option<String>, intersects: Option<String>, ids: Option<String>, collections: Option<String>, fields: Option<String>, sortby: Option<String>, filter_crs: Option<String>, filter_lang: Option<String>, filter: Option<String>, stream: bool,
}, Serve { href: Vec<String>, pgstac: Option<String>, }, Sort { href: Option<String>, }, Validate { href: Option<String>, }, }

Variants§

§

Item

Creates a STAC Item.

Fields

§id_or_href: String

The item id or asset href.

§id: Option<String>

The item id, if the positional argument is an href.

If not provided, will be inferred from the filename in the href.

§key: String

The asset key, if the positional argument is an href.

§role: Vec<String>

The asset roles, if the positional argument is an href.

Can be provided multiple times.

§allow_relative_paths: bool

Allow relative paths.

If false, all path will be canonicalized, which requires that the files actually exist on the filesystem.

§disable_gdal: bool

Don’t use GDAL for item creation, if the positional argument is an href.

Automatically set to true if this crate is compiled without GDAL.

§collect: bool

Collect an item or item collection from standard input, and add the newly created to it into a new item collection.

§

Search

Searches a STAC API.

Fields

§href: String

The href of the STAC API.

§max_items: Option<usize>

The maximum number of items to print.

§limit: Option<String>

The maximum number of results to return (page size).

§bbox: Option<String>

Requested bounding box.

§datetime: Option<String>

Requested bounding box. Use double dots .. for open date ranges.

§intersects: Option<String>

Searches items by performing intersection between their geometry and provided GeoJSON geometry.

All GeoJSON geometry types must be supported.

§ids: Option<String>

Comma-delimited list of one ore more Item ids to return.

§collections: Option<String>

Comma-delimited list of one or more Collection IDs that each matching Item must be in.

§fields: Option<String>

Include/exclude fields from item collections.

§sortby: Option<String>

Fields by which to sort results.

§filter_crs: Option<String>

Recommended to not be passed, but server must only accept http://www.opengis.net/def/crs/OGC/1.3/CRS84 as a valid value, may reject any others

§filter_lang: Option<String>

CQL2 filter expression.

§filter: Option<String>

CQL2 filter expression.

§stream: bool

Stream the items to standard output as ndjson.

§

Serve

Serves a STAC API.

By default, uses a basic memory backend, which is not suitable for production. To use the pgstac backend, pass the pgstac connection string to the --pgstac argument.

Fields

§href: Vec<String>

Hrefs of STAC collections and items to load before starting the server.

§pgstac: Option<String>

The pgstac connection string.

§

Sort

Sorts the fields of STAC object.

Fields

§href: Option<String>

The href of the STAC object.

If this is not provided, will read from standard input.

§

Validate

Validates a STAC object or API endpoint using json-schema validation.

Fields

§href: Option<String>

The href of the STAC object or endpoint.

The validator will make some decisions depending on what type of data is returned from the href. If it’s a STAC Catalog, Collection, or Item, that object will be validated. If its a collections endpoint from a STAC API, all collections will be validated. Additional behavior TBD.

If this is not provided, will read from standard input.

Trait Implementations§

source§

impl Debug for Subcommand

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl FromArgMatches for Subcommand

source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches ) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches ) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

impl Subcommand for Subcommand

source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self. Read more
source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can update self. Read more
source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

source§

fn is_within(&self, b: &G2) -> bool