Solved

Optimizing CLI Workflow: how to ensure Full AOI Coverage for Downloaded Planet Images

  • 4 August 2023
  • 4 replies
  • 308 views

Badge +1

Hello there!

I'm currently in the process of learning how to utilize the Command Line Interface (CLI) for downloading Planet products.

I've successfully managed to download images that pique my interest. However, I've encountered an issue where none of these images fully cover the area of interest (AOI) that I'm working with.

 

Below are the commands I've been using:

planet data filter --geom "map (1).geojson" --permission --std-quality | planet data search-create PSScene --name "my_search" --filter -

planet data search-run 74abd968151f440b9541e077e1178e00 --limit 2

planet data asset-activate PSScene 20230803_094757_15_248f ortho_analytic_8b_sr

planet data asset-wait PSScene 20230803_094757_15_248f ortho_analytic_8b_sr && planet data asset-download PSScene 20230803_094757_15_248f ortho_analytic_8b_sr

 

Do you know how can I ensure that my images are completely within my AOI?

 

icon

Best answer by Miguel Castro Gomez 23 August 2023, 11:49

View original

4 replies

Badge +2

This seems to be a very useful new feature for CLI SDK to allow filtering assets by areal coverage of AOI in the asset. Right now, it seems you can only do this filter yourself by calculating the coverage. 

#cli #sdk

Badge +4

Hi @lc94

Can you please share the geojson file or coordinates for your AOI to test your case? Also, which version of the planet CLI are you using? (you can check it running planet --version)

Badge +1

 Hi @Miguel Castro Gomez ,

Thank you so much for your response! I really appreciate your willingness to help.

I'm using planet CLI version 2.1.0. As for the AOI, here are the coordinates in geojson format:

{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"coordinates":[[[12.385063194934617,41.741856778369936],[12.385063194934617,41.68776816425759],[12.492736763670166,41.68776816425759],[12.492736763670166,41.741856778369936],[12.385063194934617,41.741856778369936]]],"type":"Polygon"}}]}

It appears that the web interface of Planet is more effective at creating composites for AOIs compared to the Python API or CLI. 

Let me know if you need any further information. Thanks again for your assistance.

Best regards,

Lorenzo

Badge +4

Hi @lc94,

By running a similar search to yours, where I specified the AOI, TOI, and cloud cover:

planet data filter \
--date-range acquired gte 2022-02-27 \
--date-range acquired lte 2022-03-02 \
--range cloud_cover lte 0.2 \
--geom /Users/miguel.castro/Documents/aoi_community.geojson \
| planet data search PSScene \
--filter - \
--pretty


you will get a list of products intersecting your AOI. While in Explorer you can filter by coverage area %, that is not a built-in capability in the CLI or Data API. You could combine the product footprints with your AOI and derive your own coverage % parameter to order only those products above a given threshold of interest.
 

Reply