Skip to content

Commit 6864b6b

Browse files
authored
Merge branch 'main' into readme-test-badge-main-branch
2 parents 47e1fc6 + e90b9f7 commit 6864b6b

File tree

9 files changed

+703
-96
lines changed

9 files changed

+703
-96
lines changed

RELEASE.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,20 @@ The SDK follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and t
1414

1515
## Release Workflow
1616

17-
1. Create a release branch off of `main` that bumps the SDK version number and updates the changelog:
18-
* Update `CHANGES.txt`, adhering to [keep a changelog](https://keepachangelog.com/)
19-
2. Create a PR for the release branch and merge into `main`
20-
3. Create a new GitHub release:
17+
1. Create a new GitHub release:
2118
* From the GitHub UI:
2219
* Navigate to the releases UI
2320
* Set tag to release version
2421
* Set target to `main`
2522
* Set title to tag release version
26-
* Copy description from the new entry in the changelog
23+
* Describe the change(s) that are shipping with this version in the release description
2724
* Alternatively, create a release from the GitHub CLI:
2825
* Make sure the pre-requisite [gh](https://cli.github.com/manual/gh) CLI is installed, and optionally review the docs for CLI command [gh release create](https://cli.github.com/manual/gh_release_create)
2926
* By default, `gh release create` will automatically tag releases from the latest state of the default branch
30-
* Run CLI command `gh release create {VERSION} --notes "{RELEASE NOTES}"` where `VERSION` is the release version and `RELEASE NOTES` is the description copied from the new entry in the changelog
31-
4. Verify the successful run of the Github Action `Autopublish to TestPyPI` and validate the test release on [test.pypi.org](https://test.pypi.org/project/planet/)
32-
5. Run the Github Action `Publish on PyPI`
33-
6. Verify the successful run of the Github Action `Publish on PyPI` and validate the release on [pypi.org](https://pypi.org/project/planet/)
27+
* Run CLI command `gh release create {VERSION} --notes "{RELEASE NOTES}"` where `VERSION` is the release version and `RELEASE NOTES` is the description of changes
28+
2. Verify the successful run of the Github Action `Autopublish to TestPyPI` and validate the test release on [test.pypi.org](https://test.pypi.org/project/planet/)
29+
3. Run the Github Action `Publish on PyPI`
30+
4. Verify the successful run of the Github Action `Publish on PyPI` and validate the release on [pypi.org](https://pypi.org/project/planet/)
3431

3532

3633
## Local publishing

design-docs/CLI-Data.md

Lines changed: 159 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ A series of GeoJSON descriptions for each of the returned items.
588588
### Interface
589589

590590
```
591-
planet data item-get [OPTIONS] ID ITEM_TYPE
591+
planet data item-get [OPTIONS] ITEM_TYPE ITEM_ID
592592
593593
Get an item.
594594
@@ -609,23 +609,165 @@ A full GeoJSON description of the returned item.
609609
User Story: As a CLI user I would like to get the details of an item
610610

611611
```
612-
$ planet data item-get 20210819_162141_68_2276 PSScene
612+
$ planet data item-get PSScene 20210819_162141_68_2276
613613
614614
{"_links": {...}, ..., "type": "Feature"}
615615
```
616616

617+
## item-coverage
618+
619+
### Interface
620+
621+
```
622+
planet data item-coverage [OPTIONS] ITEM_TYPE ITEM_ID
623+
624+
Get item clear coverage within a custom area of interest.
625+
626+
Arguments:
627+
ITEM_TYPE - The type of item (e.g., PSScene)
628+
ITEM_ID - The ID of the item
629+
630+
Options:
631+
--geom TEXT - A GeoJSON geometry or feature reference. [required]
632+
--mode TEXT - Method used for coverage calculation (e.g., UDM2, estimate)
633+
--band TEXT - Specific band to extract from UDM2 (e.g., cloud, snow)
634+
635+
Output:
636+
A JSON description of the clear coverage for the provided AOI within the scene.
637+
```
638+
639+
### Usage Examples
640+
641+
User Story: As a CLI user I want to get clear coverage information for a specific area within an item.
642+
643+
```console
644+
$ planet data item-coverage PSScene 20250304_162555_90_24f2 \
645+
--geom '{"type":"Polygon","coordinates":[[[-81.45,30.31],[-81.45,30.23],[-81.38,30.23],[-81.45,30.31]]]}'
646+
```
647+
response
648+
```
649+
{
650+
"clear_percent": 95,
651+
"status": "complete"
652+
}
653+
```
654+
655+
User Story: As a CLI user I want to get snow coverage over my Feature Ref.
656+
657+
```console
658+
$ planet data item-coverage PSScene 20250304_162555_90_24f2 \
659+
--geom 'pl:features/my/[collection-id]/[feature-id]' \
660+
--band snow
661+
```
662+
response
663+
```
664+
{
665+
"snow_percent": 0.0,
666+
"status": "complete"
667+
}
668+
```
669+
670+
## asset-get
671+
672+
### Interface
673+
674+
planet data asset-get [OPTIONS] ITEM_TYPE ITEM_ID ASSET_TYPE_ID
675+
676+
Get an item asset.
677+
678+
Arguments:
679+
ITEM_TYPE - The type of item (e.g., PSScene, SkySatScene)
680+
ITEM_ID - The ID of the item
681+
ASSET_TYPE_ID - The type of asset to get (e.g., basic_udm2)
682+
683+
Output:
684+
A JSON description of the asset, including its status, permissions, and download location if available.
685+
686+
### Usage Examples
687+
688+
User Story: As a CLI user I want to get information about a specific asset for an item.
689+
690+
```console
691+
$ planet data asset-get PSScene 20221003_002705_38_2461 basic_udm2
692+
```
693+
response
694+
```
695+
{
696+
"_links": {
697+
"_self": "SELFURL",
698+
"activate": "ACTIVATEURL",
699+
"type": "https://api.planet.com/data/v1/asset-types/basic_udm2"
700+
},
701+
"_permissions": ["download"],
702+
"md5_digest": null,
703+
"status": "inactive",
704+
"type": "basic_udm2"
705+
}
706+
```
707+
708+
## asset-list
709+
710+
### Interface
711+
712+
planet data asset-list [OPTIONS] ITEM_TYPE ITEM_ID
713+
714+
List all assets available for an item.
715+
716+
Arguments:
717+
- ITEM_TYPE - The type of item (e.g., PSScene, SkySatScene)
718+
- ITEM_ID - The ID of the item
719+
720+
Output:
721+
A JSON dictionary with asset_type_id as keys and asset descriptions as values.
722+
723+
### Usage Examples
724+
725+
User Story: As a CLI user I want to see all available assets for an item.
726+
727+
```console
728+
$ planet data asset-list PSScene 20221003_002705_38_2461
729+
```
730+
response
731+
```
732+
{
733+
"basic_analytic_4b": {
734+
"_links": {
735+
"_self": "SELFURL",
736+
"activate": "ACTIVATEURL",
737+
"type": "https://api.planet.com/data/v1/asset-types/basic_analytic_4b"
738+
},
739+
"_permissions": ["download"],
740+
"md5_digest": null,
741+
"status": "inactive",
742+
"type": "basic_analytic_4b"
743+
},
744+
"basic_udm2": {
745+
"_links": {
746+
"_self": "SELFURL",
747+
"activate": "ACTIVATEURL",
748+
"type": "https://api.planet.com/data/v1/asset-types/basic_udm2"
749+
},
750+
"_permissions": ["download"],
751+
"md5_digest": null,
752+
"status": "active",
753+
"location": "https://api.planet.com/data/v1/1?token=IAmAToken",
754+
"type": "basic_udm2"
755+
}
756+
}
757+
```
758+
617759
## asset-activate
618760

619761
### Interface
620762

621763
```
622-
planet data asset-activate ID ITEM_TYPE ASSET_TYPE
764+
planet data asset-activate ITEM_TYPE ITEM_ID ASSET_TYPE
623765
624766
Activate an asset.
625767
626768
Arguments:
627-
ID - string. Item identifier.
628769
ITEM_TYPE - string. Item type identifier.
770+
ITEM_ID - string. Item identifier.
629771
ASSET_TYPE - string. Asset type identifier.
630772
631773
Output:
@@ -637,20 +779,20 @@ None.
637779
User Story: As a CLI user I would like to activate an asset for download.
638780

639781
```
640-
$ planet data asset-activate 20210819_162141_68_2276 PSScene analytic
782+
$ planet data asset-activate PSScene 20210819_162141_68_2276 basic_analytic_4b
641783
```
642784

643785
User Story: As a CLI user I would like to activate, wait, and then download an
644786
asset.
645787

646788
```
647-
$ ID=20210819_162141_68_2276 && \
648-
ITEM_TYPE=PSScene && \
649-
ASSET_TYPE=analytic && \
650-
planet data asset-activate $ID $ITEM_TYPE $ASSET_TYPE && \
651-
planet data asset-wait $ID $ITEM_TYPE $ASSET_TYPE && \
789+
$ ITEM_TYPE=PSScene && \
790+
ITEM_ID=20210819_162141_68_2276 && \
791+
ASSET_TYPE=basic_analytic_4b && \
792+
planet data asset-activate $ITEM_TYPE $ITEM_ID $ASSET_TYPE && \
793+
planet data asset-wait $ITEM_TYPE $ITEM_ID $ASSET_TYPE && \
652794
planet data asset-download --directory data \
653-
$ID $ITEM_TYPE $ASSET_TYPE
795+
$ITEM_TYPE $ITEM_ID $ASSET_TYPE
654796
655797
data/<psscene_naming 20210819_162141_68_2276>.tif
656798
```
@@ -660,15 +802,15 @@ data/<psscene_naming 20210819_162141_68_2276>.tif
660802
### Interface
661803

662804
```
663-
planet data asset-wait ID ITEM_TYPE ASSET_TYPE
805+
planet data asset-wait ITEM_TYPE ITEM_ID ASSET_TYPE
664806
665807
Wait for an asset to be activated.
666808
667-
Returns when the asset state has reached activated and the asset is available.
809+
Returns when the asset state has reached 'activated' and the asset is available.
668810
669811
Arguments:
670-
ID - string. Item identifier.
671812
ITEM_TYPE - string. Item type identifier.
813+
ITEM_ID - string. Item identifier.
672814
ASSET_TYPE - string. Asset type identifier.
673815
674816
Output:
@@ -680,15 +822,15 @@ None.
680822
### Interface
681823

682824
```
683-
planet data asset-download [OPTIONS] ID ITEM_TYPE ASSET_TYPE
825+
planet data asset-download [OPTIONS] ITEM_TYPE ITEM_ID ASSET_TYPE
684826
685827
Download an activated asset.
686828
687829
Will fail if the asset state is not activated. Consider calling `asset-wait` before this command to ensure the asset is activated.
688830
689831
Arguments:
690-
ID - string. Item identifier.
691832
ITEM_TYPE - string. Item type identifier.
833+
ITEM_ID - string. Item identifier.
692834
ASSET_TYPE - string. Asset type identifier.
693835
694836
Options:
@@ -708,7 +850,7 @@ directory, overwriting if the file already exists, and silencing reporting.
708850
$ planet --quiet data asset-download \
709851
--directory data \
710852
--overwrite \
711-
20210819_162141_68_2276 PSScene analytic
853+
PSScene 20210819_162141_68_2276 basic_analytic_4b
712854
data/<psscene_naming 20210819_162141_68_2276>.tif
713855
```
714856

docs/cli/cli-data.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,66 @@ curl -s https://raw.githubusercontent.com/ropensci/geojsonio/main/inst/examples/
424424

425425
Just pipe the results to `jq '.buckets | map(.count) | add'` and it’ll give you the total of all the values.
426426

427+
## Get Item Details and Assess Item Clear Coverage
428+
429+
Once you've found items of interest through search, you may want to examine a specific item in detail. The CLI provides a command to retrieve and display detailed information about a single item.
430+
431+
### Get Item
432+
433+
The `item-get` command allows you to retrieve detailed information about a specific item by its Type and ID:
434+
435+
```sh
436+
planet data item-get PSScene 20230310_083933_71_2431
437+
```
438+
439+
### Get Item Coverage
440+
441+
The `item-coverage` command estimates the clear coverage of an item within a specified area of interest (AOI). This is useful for determining how much of your area of interest is covered by clouds or other obstructions:
442+
443+
```sh
444+
planet data item-coverage PSScene 20250304_162555_90_24f2 --geom='{"type":"Polygon","coordinates":[[[-81.45,30.31],[-81.45,30.23],[-81.38,30.23],[-81.45,30.31]]]}'
445+
```
446+
447+
You can also specify additional parameters:
448+
449+
* `--mode`: The mode for coverage calculation
450+
* `UDM2`: calculate clear coverage using a UDM2 asset [default]
451+
* `estimate`: estimate clear coverage based on preview imagery
452+
453+
* `--band`: The band to use for coverage calculation
454+
455+
See [Data API documentation](https://docs.planet.com/develop/apis/data/items/#estimate-clear-coverage-over-an-individual-item-with-a-custom-aoi) for an overview of coverage options.
456+
457+
For example:
458+
459+
```sh
460+
planet data item-coverage PSScene 20250304_162555_90_24f2 --geom='{"type":"Polygon","coordinates":[[[-81.45,30.31],[-81.45,30.23],[-81.38,30.23],[-81.45,30.31]]]}' --band='snow'
461+
```
462+
463+
## Item Asset Management
464+
465+
The CLI provides several commands for managing and working with item assets.
466+
467+
### List Available Assets
468+
469+
To see all available assets for a specific item:
470+
471+
```sh
472+
planet data asset-list PSScene 20230310_083933_71_2431
473+
```
474+
475+
This will show you all asset available for the item, including their status and activation requirements.
476+
477+
### Get Asset Details
478+
479+
To get detailed information about a specific asset:
480+
481+
```sh
482+
planet data asset-get PSScene 20230310_083933_71_2431 ortho_analytic_8b
483+
```
484+
485+
This command provides information about the asset's status download availability.
486+
427487
## Asset Activation and Download
428488

429489
While we recommend using the Orders or Subscriptions API’s to deliver Planet data, the Data API has the capability

0 commit comments

Comments
 (0)