To check if curl is installed on your computer, open a terminal/command prompt (Windows users: open Powershell), and at the prompt type:
curl --help
If you see a long result showing command usage information, it means curl is installed and ready to use. However, if you see command not found, you can download the curl executable for your operating system here: https://curl.se/download.html
To extract the footprint of a PlanetScope image, type at the terminal/command prompt:
Syntax:
curl -L -H "Authorization: api-key 123456" \
'https://api.planet.com/data/v1/item-types/{item_type_id}/items/{item_id}' \
| jq '.geometry' > item_id.geojson Examples:
- PSScene
curl -L -H "Authorization: api-key 123456" \
'https://api.planet.com/data/v1/item-types/PSScene/items/20220924_145758_22_24a4' \
| jq '.geometry' > 20220924_145758_22_24a4.geojson- REOrthoTile
curl -L -H "Authorization: api-key 123456" \
'https://api.planet.com/data/v1/item-types/REOrthoTile/items/20160707_195147_1057916_RapidEye-1' \
| jq '.geometry' > 20160707_195147_1057916_RapidEye-1.geojson
Comments
Please sign in to leave a comment.