[GIS] How to download satellite image from planet.com using API key

apiimageplanetpythonsatellite

I would like to know what to do (step by step in simple words) and how to get data from www.planet.com

There is tutorial
https://www.planet.com/docs/api-quickstart-examples/
but anyways I have problem..

So I have API key and Trial 14 days access to the platform. I tried to use Python command line to get satellite image that I chosed, but actually I am not good at Python at all and I don't know how to build request.

export PL_API_KEY=mykey (does not work either)

Best Answer

You will need to have python installed to install the planet command line tool. Open up a terminal window:

Step 1 - install planet command line tool:

pip install planet

Step 2 - export your API key:

export PL_API_KEY=XXXXX

Step 3 - download your image (for example a RapidEye visual product with the id "20160707_195146_1057917_RapidEye-1")

planet data download --item-type REOrthoTile --asset-type visual --string-in id 20160707_195146_1057917_RapidEye-1

Notes:

I like to add the --verbose option which provides a little more feedback of what is going on:

planet --verbose data download --item-type REOrthoTile --asset-type visual --string-in id 20160707_195146_1057917_RapidEye-1

You can skip Step 2 and alternatively provide your API key in the command itself:

planet --api-key XXXXXX --verbose data download --item-type REOrthoTile --asset-type visual --string-in id 20160707_195146_1057917_RapidEye-1    

Quickstart is here: https://www.planet.com/docs/api-quickstart-examples/cli/

Restrictions because of the trial may apply, of course, as mentioned in the comments above.

Related Question