PlanetScope Data and Python SDK

Hi SH team,

I have a couple of questions for PlanetScope data and Python SDK.

  1. Can I order PlanetScope visual ortho tiles? We do a lot of visual QA at this stage and it would be helpful to access visual products. If there is an eval script that allows us to convert the analytical product to visual and download it in COG format, that would be great.
  2. Right now, I am only using dates in the data filter when doing a post or get to the API. Is it possible to use the tile_id? That would make it easier to iterate over and do the processing.
    input = {
    “data”: [{
    “type”: “CUSTOM”,
    “dataFilter”: {
    “collectionId”: collection_id,
    “from”: “2020-10-20T00:00:00Z”,
    “to”: “2020-10-22T00:00:00Z”
  3. Is it possible to use SH Python SDK to do the ordering and stuff for PlanetScope?
  4. Is there a way to add Sentinel 1 and 2 imagery to the same collection as Planet data? We try to do continuous monitoring of an area using as much imagery as possible. Having everything in one place would be great.
  5. Can I use my planet API key to authenticate directly for Planetabs API?

Thank you in advance!

Hi Chinmay,

To create a visual (RGB), you can find an example of the request here:

Or, directly, the Custom script, which you need to enter in the Configuration utility.

function setup() {
  return {
    input: [{"bands": ["B1", "B2", "B3", "dataMask"]}], output: { bands: 4}
var f = 2500
function evaluatePixel(sample) {
  return [sample.B3 / f, sample.B2 / f, sample.B1 / f, sample.dataMask]; 

Using this you can then get true color imagery in your own tool using API direclty, e.g. OGC WMS service.
Or you can download it as GeoTiff.

  1. It is not possible to refer to tiles. Why would you want to do that? On the border of the tiles you might get parts of data…
    You can use Catalogue API, Distinct option, to get information about available imagery at some area, then simply iterate over these dates.

  2. Sentinelhub-py does not yet support ordering of Third party data. This is an open-source library, so you are welcome to submit a pull request.

  3. You cannot add Sentinel imagery to the collection as the data are of different constraints. You can however easily access both PlanetScope, Sentinel-1 and Sentinel-2 data in the same request using Data fusion capability.
    Read the documentation here:
    And blog post with some examples here:
    Data Fusion - combine satellite datasets to unlock new possibilities! | by Maxim Lamare | Sentinel Hub Blog | Medium

  4. We have not tested this, but I believe it might work .

Thank you Grega. That was helpful.
Re: 1 - Form what I understand, the script you sent only applies the brightness correction. But the visual product also has the color curve correction applied, no?

Re: 2 - I was talking about the tile id return from BYOC collection. Once I have ordered and added 3rd party imagery to a specific collection, it assigns them tile IDs. Requesting by dates is not a big hassle though.

I see. We do unfortunately not have the custom script yet for this mentioned color curve, although it should probalby not be too difficult to do it. Perhaps a good opportunity for our Custom Script Contest:

1 Like

Thanks Grega! I will look into it. Just need to check how do they apply the color curve correction.

Thanks for this information, @gmilcinski. So the sentinelhub-py package doesn’t have the ability to request data from Planet or Airbus? Has there been any progress on this since this post?

If not, would adding the feature be as simple as adding a definition for these sources similarly to how it is done here: sentinelhub.data_collections — Sentinel Hub 3.4.1 documentation ?

Thank you.

Hi @dlplindsay,

with commercial data (Planet and Airbus and Maxar) there are two steps in the process:

  1. Order the data from the actual data provider
    This part requires purchasing the quota for a specific provider (and related compliance checks), then searching for what data are available and then ordering to ingest it into Sentinel Hub. You can do this part either via user interface or via API. It is an async process, might take a couple of minutes or a couple of hours. At the end, the data will be ingested to Sentinel Hub and available in the same way as you are used to with Sentinel-2 or similar. (this part is what I was referring above that is not yet supported in sh-py).

  2. Fetching the data that were ordered and ingested to be used in your processes. This part is supported via sh-py as Airbus/Planet/Maxar data are ingested in “BYOC”. See this example for getting BYOC data via sh-py.

1 Like