Skip to content

Commit

Permalink
remove!: USGS EROS
Browse files Browse the repository at this point in the history
  • Loading branch information
gadomski committed Jul 14, 2023
1 parent 0f69ace commit 8180abd
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 138 deletions.
14 changes: 0 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,27 +74,13 @@ Some clients require some setup before use; they are called out in this table, a
| `S3Client` | Simple S3 client | Use `requester_pays=True` in the client initializer to enable access to requester pays buckets, e.g. USGS landsat's public AWS archive |
| `FilesystemClient` | Moves files from place to place on a local filesystem | Mostly used for testing |
| `PlanetaryComputerClient` | Signs urls with the [Planetary Computer Authentication API](https://planetarycomputer.microsoft.com/docs/reference/sas/) | No additional setup required, works out of the box |
| `UsgsErosClient` | Uses a token-based authentication workflow to download data, e.g. landsat, from USGS EROS | Requires creation of a personal access token, see section below |
| `EarthdataClient` | Uses a token-based authentication to download data, from _some_ Earthdata providers, e.g. DAACs | Requires creation of a personal access token, see section below |

### S3Client

To use the `requester_pays` option, you need to configure your AWS credentials.
See [the AWS documentation](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html) for instructions.

#### USGS EROS

The USGS EROS system, which hosts landsat data, requires a personal access token to download assets.
Here's how to create and use your personal access token with **stac-asset**:

1. [Create a new personal access token](https://ers.cr.usgs.gov/password/appgenerate)
2. Set two environment variables:
- `USGS_EROS_USERNAME` to your username (found in the top right of the web UI)
- `USGS_EROS_PAT` to your personal access token
3. Use `UsgsErosClient.default()` to create a new client.

You can also provide your username and password to the `UsgsErosClient.login` method.

#### Earthdata

You'll need a personal access token.
Expand Down
2 changes: 0 additions & 2 deletions src/stac_asset/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
from .planetary_computer_client import PlanetaryComputerClient
from .s3_client import S3Client
from .strategy import FileNameStrategy
from .usgs_eros_client import UsgsErosClient

__all__ = [
"DownloadWarning",
Expand All @@ -44,7 +43,6 @@
"HttpClient",
"PlanetaryComputerClient",
"S3Client",
"UsgsErosClient",
"download_item",
"download_item_collection",
"guess_client",
Expand Down
3 changes: 0 additions & 3 deletions src/stac_asset/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from .s3_client import S3Client
from .strategy import FileNameStrategy
from .types import PathLikeObject
from .usgs_eros_client import UsgsErosClient


async def download_item(
Expand Down Expand Up @@ -142,8 +141,6 @@ async def guess_client(href: str, s3_requester_pays: bool = False) -> Client:
return S3Client(requester_pays=s3_requester_pays)
elif url.host.endswith("blob.core.windows.net"):
return await PlanetaryComputerClient.default()
elif url.host == "landsatlook.usgs.gov":
return await UsgsErosClient.default()
elif url.scheme == "http" or url.scheme == "https":
return await HttpClient.default()
else:
Expand Down
89 changes: 0 additions & 89 deletions src/stac_asset/usgs_eros_client.py

This file was deleted.

30 changes: 0 additions & 30 deletions tests/test_usgs_eros_client.py

This file was deleted.

0 comments on commit 8180abd

Please sign in to comment.