Get image metadata by identifier from planet CLI or python client library
I have already downloaded images (20180910_073032_104a, 20180922_080435_100a, 20181015_080958_0f15 and more (PSScene4Band)).
How I can get metadata (sun_elevation, cloud_cover, footprint geometry) for each image by their ID from planet CLI or python client library?
thanks!
-
Official comment
Hi Alexander,
You can use the CLI to get the metadata in JSON format using the following command:
planet -k YOUR_PLANET_API_KEY data search --item-type PSScene4Band --string-in id 20180910_073032_104a,20180922_080435_100a,20181015_080958_0f15To save it to a JSON file on your local filesystem you can do the following:
planet -k YOUR_PLANET_API_KEY data search --item-type PSScene4Band --string-in id 20180910_073032_104a,20180922_080435_100a,20181015_080958_0f15 > metadata.jsonPlease have a look at the recent forum post of my colleague Sam who put together a great cheat sheet for the PLanet CLI: https://support.planet.com/hc/en-us/community/posts/360021787993-Cheat-Sheet-Planet-Command-Line-Interface
Another helpful resource is the examples from the CLI documentation: https://planetlabs.github.io/planet-client-python/cli/examples.html
I hope that gets you started.
Best,
GrischaComment actions
Please sign in to leave a comment.
Comments
2 comments