@@ -588,7 +588,7 @@ A series of GeoJSON descriptions for each of the returned items.
588
588
### Interface
589
589
590
590
```
591
- planet data item-get [OPTIONS] ID ITEM_TYPE
591
+ planet data item-get [OPTIONS] ITEM_TYPE ITEM_ID
592
592
593
593
Get an item.
594
594
@@ -601,31 +601,182 @@ Options:
601
601
--pretty - flag. Pretty-print output
602
602
603
603
Output:
604
- A full GeoJSON description of the returned item.
604
+ A full GeoJSON description of the item, including its properties, assets, and metadata .
605
605
```
606
606
607
607
### Usage Examples
608
608
609
609
User Story: As a CLI user I would like to get the details of an item
610
610
611
611
```
612
- $ planet data item-get 20210819_162141_68_2276 PSScene
612
+ $ planet data item-get PSScene 20210819_162141_68_2276
613
613
614
614
{"_links": {...}, ..., "type": "Feature"}
615
615
```
616
616
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, haze)
634
+ --pretty - Pretty print the output.
635
+
636
+ Output:
637
+ A JSON description of the clear coverage for the provided AOI within the scene.
638
+ ```
639
+
640
+ ### Usage Examples
641
+
642
+ User Story: As a CLI user I want to get clear coverage information for a specific area within an item.
643
+
644
+ ``` console
645
+ $ planet data item-coverage PSScene 20221003_002705_38_2461 \
646
+ --geom '{"type": "Polygon", "coordinates": [[[37.791595458984375, 14.84923123791421],
647
+ [37.90214538574219, 14.84923123791421],
648
+ [37.90214538574219, 14.945448293647944],
649
+ [37.791595458984375, 14.945448293647944],
650
+ [37.791595458984375, 14.84923123791421]]]}'
651
+ ```
652
+ response (pretty-printed)
653
+ ```
654
+ {
655
+ "clear_percent": 90.0,
656
+ "status": "complete"
657
+ }
658
+ ```
659
+
660
+ User Story: As a CLI user I want to get haze coverage over my Feature Ref.
661
+
662
+ ``` console
663
+ $ planet data item-coverage PSScene 20221003_002705_38_2461 \
664
+ --geom 'pl:features/my/[collection-id]/[feature-id]' \
665
+ --band haze
666
+ ```
667
+ response (pretty-printed)
668
+ ```
669
+ {
670
+ "haze_percent": 90.0,
671
+ "status": "complete"
672
+ }
673
+ ```
674
+
675
+ ## asset-get
676
+
677
+ ### Interface
678
+
679
+ planet data asset-get [ OPTIONS] ITEM_TYPE ITEM_ID ASSET_TYPE_ID
680
+
681
+ Get an item asset.
682
+
683
+ Arguments:
684
+ ITEM_TYPE - The type of item (e.g., PSScene, SkySatScene)
685
+ ITEM_ID - The ID of the item
686
+ ASSET_TYPE_ID - The type of asset to get (e.g., basic_udm2)
687
+
688
+ Output:
689
+ A JSON description of the asset, including its status, permissions, and download location if available.
690
+
691
+ ### Usage Examples
692
+
693
+ User Story: As a CLI user I want to get information about a specific asset for an item.
694
+
695
+ ``` console
696
+ $ planet data asset-get PSScene 20221003_002705_38_2461 basic_udm2
697
+ ```
698
+ response (pretty-printed)
699
+ ```
700
+ {
701
+ "_links": {
702
+ "_self": "SELFURL",
703
+ "activate": "ACTIVATEURL",
704
+ "type": "https://api.planet.com/data/v1/asset-types/basic_udm2"
705
+ },
706
+ "_permissions": ["download"],
707
+ "md5_digest": null,
708
+ "status": "active",
709
+ "location": "https://api.planet.com/data/v1/1?token=IAmAToken",
710
+ "type": "basic_udm2"
711
+ }
712
+ ```
713
+
714
+ ## asset-list
715
+
716
+ ### Interface
717
+
718
+ planet data asset-list [ OPTIONS] ITEM_TYPE ITEM_ID
719
+
720
+ List all assets available for an item.
721
+
722
+ Options:
723
+ - --pretty - Pretty print the output.
724
+
725
+ Arguments:
726
+ - ITEM_TYPE - The type of item (e.g., PSScene, SkySatScene)
727
+ - ITEM_ID - The ID of the item
728
+
729
+ Output:
730
+ A JSON dictionary with asset_type_id as keys and asset descriptions as values.
731
+
732
+ ### Usage Examples
733
+
734
+ User Story: As a CLI user I want to see all available assets for an item.
735
+
736
+ ``` console
737
+ $ planet data asset-list PSScene 20221003_002705_38_2461
738
+ ```
739
+ response (pretty-printed)
740
+ ```
741
+ {
742
+ "basic_analytic_4b": {
743
+ "_links": {
744
+ "_self": "SELFURL",
745
+ "activate": "ACTIVATEURL",
746
+ "type": "https://api.planet.com/data/v1/asset-types/basic_analytic_4b"
747
+ },
748
+ "_permissions": ["download"],
749
+ "md5_digest": null,
750
+ "status": "inactive",
751
+ "type": "basic_analytic_4b"
752
+ },
753
+ "basic_udm2": {
754
+ "_links": {
755
+ "_self": "SELFURL",
756
+ "activate": "ACTIVATEURL",
757
+ "type": "https://api.planet.com/data/v1/asset-types/basic_udm2"
758
+ },
759
+ "_permissions": ["download"],
760
+ "md5_digest": null,
761
+ "status": "active",
762
+ "location": "https://api.planet.com/data/v1/1?token=IAmAToken",
763
+ "type": "basic_udm2"
764
+ }
765
+ }
766
+ ```
767
+
617
768
## asset-activate
618
769
619
770
### Interface
620
771
621
772
```
622
- planet data asset-activate ID ITEM_TYPE ASSET_TYPE
773
+ planet data asset-activate ITEM_TYPE ITEM_ID ASSET_TYPE
623
774
624
775
Activate an asset.
625
776
626
777
Arguments:
627
- ID - string. Item identifier.
628
778
ITEM_TYPE - string. Item type identifier.
779
+ ITEM_ID - string. Item identifier.
629
780
ASSET_TYPE - string. Asset type identifier.
630
781
631
782
Output:
@@ -637,20 +788,20 @@ None.
637
788
User Story: As a CLI user I would like to activate an asset for download.
638
789
639
790
```
640
- $ planet data asset-activate 20210819_162141_68_2276 PSScene analytic
791
+ $ planet data asset-activate PSScene 20210819_162141_68_2276 analytic
641
792
```
642
793
643
794
User Story: As a CLI user I would like to activate, wait, and then download an
644
795
asset.
645
796
646
797
```
647
- $ ID=20210819_162141_68_2276 && \
648
- ITEM_TYPE=PSScene && \
798
+ $ ITEM_TYPE=PSScene && \
799
+ ITEM_ID=20210819_162141_68_2276 && \
649
800
ASSET_TYPE=analytic && \
650
- planet data asset-activate $ID $ITEM_TYPE $ASSET_TYPE && \
651
- planet data asset-wait $ID $ITEM_TYPE $ASSET_TYPE && \
801
+ planet data asset-activate $ITEM_TYPE $ITEM_ID $ASSET_TYPE && \
802
+ planet data asset-wait $ITEM_TYPE $ITEM_ID $ASSET_TYPE && \
652
803
planet data asset-download --directory data \
653
- $ID $ITEM_TYPE $ASSET_TYPE
804
+ $ITEM_TYPE $ITEM_ID $ASSET_TYPE
654
805
655
806
data/<psscene_naming 20210819_162141_68_2276>.tif
656
807
```
@@ -660,15 +811,15 @@ data/<psscene_naming 20210819_162141_68_2276>.tif
660
811
### Interface
661
812
662
813
```
663
- planet data asset-wait ID ITEM_TYPE ASSET_TYPE
814
+ planet data asset-wait ITEM_TYPE ITEM_ID ASSET_TYPE
664
815
665
816
Wait for an asset to be activated.
666
817
667
- Returns when the asset state has reached ‘ activated’ and the asset is available.
818
+ Returns when the asset state has reached ' activated' and the asset is available.
668
819
669
820
Arguments:
670
- ID - string. Item identifier.
671
821
ITEM_TYPE - string. Item type identifier.
822
+ ITEM_ID - string. Item identifier.
672
823
ASSET_TYPE - string. Asset type identifier.
673
824
674
825
Output:
@@ -680,15 +831,15 @@ None.
680
831
### Interface
681
832
682
833
```
683
- planet data asset-download [OPTIONS] ID ITEM_TYPE ASSET_TYPE
834
+ planet data asset-download [OPTIONS] ITEM_TYPE ITEM_ID ASSET_TYPE
684
835
685
836
Download an activated asset.
686
837
687
838
Will fail if the asset state is not activated. Consider calling `asset-wait` before this command to ensure the asset is activated.
688
839
689
840
Arguments:
690
- ID - string. Item identifier.
691
841
ITEM_TYPE - string. Item type identifier.
842
+ ITEM_ID - string. Item identifier.
692
843
ASSET_TYPE - string. Asset type identifier.
693
844
694
845
Options:
@@ -708,7 +859,7 @@ directory, overwriting if the file already exists, and silencing reporting.
708
859
$ planet --quiet data asset-download \
709
860
--directory data \
710
861
--overwrite \
711
- 20210819_162141_68_2276 PSScene analytic
862
+ PSScene 20210819_162141_68_2276 analytic
712
863
data/<psscene_naming 20210819_162141_68_2276>.tif
713
864
```
714
865
0 commit comments