Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stac-utils/stac-terminal
Output info on STAC Items in the terminal
https://github.com/stac-utils/stac-terminal
Last synced: 3 months ago
JSON representation
Output info on STAC Items in the terminal
- Host: GitHub
- URL: https://github.com/stac-utils/stac-terminal
- Owner: stac-utils
- License: mit
- Created: 2021-04-11T04:15:34.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-31T22:46:25.000Z (about 1 year ago)
- Last Synced: 2024-04-25T08:00:31.240Z (7 months ago)
- Language: Python
- Size: 156 KB
- Stars: 13
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-earthobservation-code - stac-terminal - Output info on STAC Items in the terminal (`Python` processing of optical imagery (non deep learning) / Cloud Native Geospatial)
README
# stacterm
This library is for displaying information (tables, calendars, plots,
histograms) about [STAC](https://stacspec.org/) Items in the terminal. It takes
as input a STAC ItemCollection (a GeoJSON FeatureCollection of STAC Items),
either by specifying a filename or by piping output from another program.## Installation
Install from PyPi:
```cmdline
❯ pip install stacterm
```PySTAC and Pandas are required, along with two dependencies for rendering
tables ([termtables](https://pypi.org/project/termtables/)) and plots
([plotext](https://pypi.org/project/plotext/)) in the terminal.## Usage
stacterm main usage is as a CLI progam `stacterm`. Use help to see options
available:```cmdline
❯ stacterm -h
usage: stacterm [-h] {table,cal,hist,plot} ...Terminal STAC
positional arguments:
{table,cal,hist,plot}
table Output a table
cal Output a calendar
hist Output a histogram
plot Output a plotoptional arguments:
-h, --help show this help message and exit
```All of the sub-commands in `stacterm` can take optional field names. A field
name is:- `id`: The ID of the Item
- `collection`: The collection of the Item
- Dates
- `date`: The date portion of the Item's `datetime` field
- `year-month`: The year and month of the Item's `datetime` field
- `year`: The year of the Item's `datetime` field
- Any property`stacterm` reads from in stdin allowing other programs to pipe output to it,
such as [pystac-client](https://github.com/stac-utils/pystac-client).```cmdline
❯ export STAC_API_URL=https://earth-search.aws.element84.com/v0
❯ stac-client search --intersects aoi.json \
--datetime 2020-07-01/2020-12-31 \
-c sentinel-s2-l2a-cogs landsat-8-l1-c1 | stacterm cal --label platform
```The detailed usage examples below are all shown using the item collection from
a search saved to a file and redirected to stdin.![](images/cal.png)
### Tables
Use `stacterm` to display tabularized data from a saved ItemCollection.
```cmdline
❯