Getting started with the Data API

Let's search & download some imagery of farmland near Stockton, CA. Here are the steps we'll follow:

  1. Define an Area of Interest (AOI)
  2. Save our AOI's coordinates to GeoJSON format
  3. Create a few search filters
  4. Search for imagery using those filters
  5. Activate an image for downloading
  6. Download an image

Requirements

Define an Area of Interest

An Area of Interest (or AOI) is how we define the geographic "window" out of which we want to get data.

For the Data API, this could be a simple bounding box with four corners, or a more complex shape, as long as the definition is in GeoJSON format.

For this example, let's just use a simple box. To make it easy, I'll use geojson.io to quickly draw a shape & generate GeoJSON output for our box:

We only need the "geometry" object for our Data API request:


In [1]:
# Stockton, CA bounding box (created via geojson.io) 
geojson_geometry = {
  "type": "Polygon",
  "coordinates": [
    [ 
      [-121.59290313720705, 37.93444993515032],
      [-121.27017974853516, 37.93444993515032],
      [-121.27017974853516, 38.065932950547484],
      [-121.59290313720705, 38.065932950547484],
      [-121.59290313720705, 37.93444993515032]
    ]
  ]
}

Create Filters

Now let's set up some filters to further constrain our Data API search:


In [2]:
# get images that overlap with our AOI 
geometry_filter = {
  "type": "GeometryFilter",
  "field_name": "geometry",
  "config": geojson_geometry
}

# get images acquired within a date range
date_range_filter = {
  "type": "DateRangeFilter",
  "field_name": "acquired",
  "config": {
    "gte": "2016-08-31T00:00:00.000Z",
    "lte": "2016-09-01T00:00:00.000Z"
  }
}

# only get images which have <50% cloud coverage
cloud_cover_filter = {
  "type": "RangeFilter",
  "field_name": "cloud_cover",
  "config": {
    "lte": 0.5
  }
}

# combine our geo, date, cloud filters
combined_filter = {
  "type": "AndFilter",
  "config": [geometry_filter, date_range_filter, cloud_cover_filter]
}

Searching: Items and Assets

Planet's products are categorized as items and assets: an item is a single picture taken by a satellite at a certain time. Items have multiple asset types including the image in different formats, along with supporting metadata files.

For this demonstration, let's get a satellite image that is best suited for analytic applications; i.e., a 4-band image with spectral data for Red, Green, Blue and Near-infrared values. To get the image we want, we will specify an item type of PSScene4Band, and asset type analytic.

You can learn more about item & asset types in Planet's Data API here.

Now let's search for all the items that match our filters:


In [3]:
import os
import json
import requests
from requests.auth import HTTPBasicAuth

# API Key stored as an env variable
PLANET_API_KEY = os.getenv('PL_API_KEY')

item_type = "PSScene4Band"

# API request object
search_request = {
  "interval": "day",
  "item_types": [item_type], 
  "filter": combined_filter
}

# fire off the POST request
search_result = \
  requests.post(
    'https://api.planet.com/data/v1/quick-search',
    auth=HTTPBasicAuth(PLANET_API_KEY, ''),
    json=search_request)

print(json.dumps(search_result.json(), indent=1))


{
 "_links": {
  "_first": "https://api.planet.com/data/v1/searches/958fd93870424ba594faace4a6c0d970/results?_page=eyJxdWVyeV9wYXJhbXMiOiB7fSwgInNvcnRfcHJldiI6IGZhbHNlLCAicGFnZV9zaXplIjogMjUwLCAic29ydF9ieSI6ICJwdWJsaXNoZWQiLCAic29ydF9zdGFydCI6IG51bGwsICJzb3J0X2xhc3RfaWQiOiBudWxsLCAic29ydF9kZXNjIjogdHJ1ZX0%3D",
  "_next": "https://api.planet.com/data/v1/searches/958fd93870424ba594faace4a6c0d970/results?_page=eyJxdWVyeV9wYXJhbXMiOiB7fSwgInNvcnRfcHJldiI6IGZhbHNlLCAicGFnZV9zaXplIjogMjUwLCAic29ydF9ieSI6ICJwdWJsaXNoZWQiLCAic29ydF9zdGFydCI6ICIyMDE2LTA5LTE0VDE5OjAyOjI2LjAwMDAwMFoiLCAic29ydF9sYXN0X2lkIjogIjIwMTYwODMxXzE4MDIzNF8wZTBlIiwgInNvcnRfZGVzYyI6IHRydWV9",
  "_self": "https://api.planet.com/data/v1/searches/958fd93870424ba594faace4a6c0d970/results?_page=eyJxdWVyeV9wYXJhbXMiOiB7fSwgInNvcnRfcHJldiI6IGZhbHNlLCAicGFnZV9zaXplIjogMjUwLCAic29ydF9ieSI6ICJwdWJsaXNoZWQiLCAic29ydF9zdGFydCI6IG51bGwsICJzb3J0X2xhc3RfaWQiOiBudWxsLCAic29ydF9kZXNjIjogdHJ1ZX0%3D"
 },
 "features": [
  {
   "_links": {
    "_self": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_143848_0c79",
    "assets": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_143848_0c79/assets/",
    "thumbnail": "https://tiles.planet.com/data/v1/item-types/PSScene4Band/items/20160831_143848_0c79/thumb"
   },
   "_permissions": [
    "assets.basic_analytic_rpc_nitf:download",
    "assets.analytic_xml:download",
    "assets.basic_analytic_dn:download",
    "assets.basic_analytic_dn_xml_nitf:download",
    "assets.basic_analytic_dn_nitf:download",
    "assets.basic_analytic_xml:download",
    "assets.basic_analytic_nitf:download",
    "assets.basic_analytic_rpc:download",
    "assets.analytic_dn:download",
    "assets.basic_udm:download",
    "assets.basic_analytic_dn_rpc_nitf:download",
    "assets.analytic:download",
    "assets.analytic_dn_xml:download",
    "assets.basic_analytic_dn_xml:download",
    "assets.basic_analytic_dn_rpc:download",
    "assets.basic_analytic_xml_nitf:download",
    "assets.basic_analytic:download",
    "assets.udm:download"
   ],
   "geometry": {
    "coordinates": [
     [
      [
       -121.41743299025435,
       38.06578738355417
      ],
      [
       -121.56267369981376,
       38.21111898225768
      ],
      [
       -121.51994371200804,
       38.23759083304046
      ],
      [
       -121.37474398417915,
       38.092197665949286
      ],
      [
       -121.41743299025435,
       38.06578738355417
      ]
     ]
    ],
    "type": "Polygon"
   },
   "id": "20160831_143848_0c79",
   "properties": {
    "acquired": "2016-08-31T14:38:48.006174Z",
    "anomalous_pixels": 0,
    "cloud_cover": 0,
    "columns": 5562,
    "epsg_code": 32610,
    "ground_control": true,
    "gsd": 3.1,
    "instrument": "PS2",
    "item_type": "PSScene4Band",
    "origin_x": 625833,
    "origin_y": 4233213,
    "pixel_resolution": 3,
    "provider": "planetscope",
    "published": "2018-06-26T00:20:32Z",
    "quality_category": "test",
    "rows": 6306,
    "satellite_id": "0c79",
    "strip_id": "232281",
    "sun_azimuth": 88.5,
    "sun_elevation": 11.7,
    "updated": "2018-06-26T00:20:33Z",
    "usable_data": 0,
    "view_angle": 2.9
   },
   "type": "Feature"
  },
  {
   "_links": {
    "_self": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_212703_0c43",
    "assets": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_212703_0c43/assets/",
    "thumbnail": "https://tiles.planet.com/data/v1/item-types/PSScene4Band/items/20160831_212703_0c43/thumb"
   },
   "_permissions": [
    "assets.basic_analytic_rpc_nitf:download",
    "assets.analytic_xml:download",
    "assets.basic_analytic_dn:download",
    "assets.basic_analytic_dn_xml_nitf:download",
    "assets.basic_analytic_dn_nitf:download",
    "assets.basic_analytic_xml:download",
    "assets.basic_analytic_nitf:download",
    "assets.basic_analytic_rpc:download",
    "assets.analytic_dn:download",
    "assets.basic_udm:download",
    "assets.basic_analytic_dn_rpc_nitf:download",
    "assets.analytic:download",
    "assets.analytic_dn_xml:download",
    "assets.basic_analytic_dn_xml:download",
    "assets.basic_analytic_dn_rpc:download",
    "assets.basic_analytic_xml_nitf:download",
    "assets.basic_analytic:download",
    "assets.udm:download"
   ],
   "geometry": {
    "coordinates": [
     [
      [
       -121.40677819747573,
       38.200049419317
      ],
      [
       -121.54345931991529,
       38.057584126594016
      ],
      [
       -121.60235542531755,
       38.09256165628602
      ],
      [
       -121.46271110811539,
       38.23820011087285
      ],
      [
       -121.41912195602232,
       38.21227868694899
      ],
      [
       -121.42209799976756,
       38.209176581701776
      ],
      [
       -121.40677819747573,
       38.200049419317
      ]
     ]
    ],
    "type": "Polygon"
   },
   "id": "20160831_212703_0c43",
   "properties": {
    "acquired": "2016-08-31T21:27:03.039969Z",
    "anomalous_pixels": 0,
    "cloud_cover": 0,
    "columns": 5650,
    "epsg_code": 32610,
    "ground_control": true,
    "gsd": 3.1,
    "instrument": "PS2",
    "item_type": "PSScene4Band",
    "origin_x": 622557,
    "origin_y": 4233363,
    "pixel_resolution": 3,
    "provider": "planetscope",
    "published": "2016-11-06T22:11:16Z",
    "quality_category": "standard",
    "rows": 6720,
    "satellite_id": "0c43",
    "strip_id": "232154",
    "sun_azimuth": 216.8,
    "sun_elevation": 55,
    "updated": "2017-10-01T03:19:42Z",
    "usable_data": 0,
    "view_angle": 1.7
   },
   "type": "Feature"
  },
  {
   "_links": {
    "_self": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_212705_0c43",
    "assets": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_212705_0c43/assets/",
    "thumbnail": "https://tiles.planet.com/data/v1/item-types/PSScene4Band/items/20160831_212705_0c43/thumb"
   },
   "_permissions": [
    "assets.basic_analytic_rpc_nitf:download",
    "assets.analytic_xml:download",
    "assets.basic_analytic_dn:download",
    "assets.basic_analytic_dn_xml_nitf:download",
    "assets.basic_analytic_dn_nitf:download",
    "assets.basic_analytic_xml:download",
    "assets.basic_analytic_nitf:download",
    "assets.basic_analytic_rpc:download",
    "assets.analytic_dn:download",
    "assets.basic_udm:download",
    "assets.basic_analytic_dn_rpc_nitf:download",
    "assets.analytic:download",
    "assets.analytic_dn_xml:download",
    "assets.basic_analytic_dn_xml:download",
    "assets.basic_analytic_dn_rpc:download",
    "assets.basic_analytic_xml_nitf:download",
    "assets.basic_analytic:download",
    "assets.udm:download"
   ],
   "geometry": {
    "coordinates": [
     [
      [
       -121.2587594235103,
       38.09766208518974
      ],
      [
       -121.39596737938672,
       37.95476964327532
      ],
      [
       -121.45471807185086,
       37.989780753190566
      ],
      [
       -121.31492675677839,
       38.13546003805358
      ],
      [
       -121.27006495578891,
       38.108679585820326
      ],
      [
       -121.27265839695171,
       38.10597840030598
      ],
      [
       -121.2587594235103,
       38.09766208518974
      ]
     ]
    ],
    "type": "Polygon"
   },
   "id": "20160831_212705_0c43",
   "properties": {
    "acquired": "2016-08-31T21:27:05.553514Z",
    "anomalous_pixels": 0,
    "cloud_cover": 0,
    "columns": 5662,
    "epsg_code": 32610,
    "ground_control": true,
    "gsd": 3.1,
    "instrument": "PS2",
    "item_type": "PSScene4Band",
    "origin_x": 635694,
    "origin_y": 4222188,
    "pixel_resolution": 3,
    "provider": "planetscope",
    "published": "2016-11-06T22:11:15Z",
    "quality_category": "standard",
    "rows": 6726,
    "satellite_id": "0c43",
    "strip_id": "232154",
    "sun_azimuth": 217.1,
    "sun_elevation": 55,
    "updated": "2017-10-01T03:19:42Z",
    "usable_data": 0,
    "view_angle": 1.8
   },
   "type": "Feature"
  },
  {
   "_links": {
    "_self": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_212706_0c43",
    "assets": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_212706_0c43/assets/",
    "thumbnail": "https://tiles.planet.com/data/v1/item-types/PSScene4Band/items/20160831_212706_0c43/thumb"
   },
   "_permissions": [
    "assets.basic_analytic_rpc_nitf:download",
    "assets.analytic_xml:download",
    "assets.basic_analytic_dn:download",
    "assets.basic_analytic_dn_xml_nitf:download",
    "assets.basic_analytic_dn_nitf:download",
    "assets.basic_analytic_xml:download",
    "assets.basic_analytic_nitf:download",
    "assets.basic_analytic_rpc:download",
    "assets.analytic_dn:download",
    "assets.basic_udm:download",
    "assets.basic_analytic_dn_rpc_nitf:download",
    "assets.analytic:download",
    "assets.analytic_dn_xml:download",
    "assets.basic_analytic_dn_xml:download",
    "assets.basic_analytic_dn_rpc:download",
    "assets.basic_analytic_xml_nitf:download",
    "assets.basic_analytic:download",
    "assets.udm:download"
   ],
   "geometry": {
    "coordinates": [
     [
      [
       -121.2079998853447,
       38.06320903761407
      ],
      [
       -121.34553945966752,
       37.920040227288396
      ],
      [
       -121.40426068728785,
       37.9550855452214
      ],
      [
       -121.26422292994484,
       38.10093112094555
      ],
      [
       -121.21915588143924,
       38.073965692289185
      ],
      [
       -121.2216349372774,
       38.07138746633599
      ],
      [
       -121.2079998853447,
       38.06320903761407
      ]
     ]
    ],
    "type": "Polygon"
   },
   "id": "20160831_212706_0c43",
   "properties": {
    "acquired": "2016-08-31T21:27:06.38977Z",
    "anomalous_pixels": 0,
    "cloud_cover": 0,
    "columns": 5671,
    "epsg_code": 32610,
    "ground_control": true,
    "gsd": 3.1,
    "instrument": "PS2",
    "item_type": "PSScene4Band",
    "origin_x": 640191,
    "origin_y": 4218438,
    "pixel_resolution": 3,
    "provider": "planetscope",
    "published": "2016-11-06T22:11:03Z",
    "quality_category": "standard",
    "rows": 6735,
    "satellite_id": "0c43",
    "strip_id": "232154",
    "sun_azimuth": 217.2,
    "sun_elevation": 55,
    "updated": "2017-10-01T03:19:39Z",
    "usable_data": 0,
    "view_angle": 1.8
   },
   "type": "Feature"
  },
  {
   "_links": {
    "_self": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_212707_0c43",
    "assets": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_212707_0c43/assets/",
    "thumbnail": "https://tiles.planet.com/data/v1/item-types/PSScene4Band/items/20160831_212707_0c43/thumb"
   },
   "_permissions": [
    "assets.basic_analytic_rpc_nitf:download",
    "assets.analytic_xml:download",
    "assets.basic_analytic_dn:download",
    "assets.basic_analytic_dn_xml_nitf:download",
    "assets.basic_analytic_dn_nitf:download",
    "assets.basic_analytic_xml:download",
    "assets.basic_analytic_nitf:download",
    "assets.basic_analytic_rpc:download",
    "assets.analytic_dn:download",
    "assets.basic_udm:download",
    "assets.basic_analytic_dn_rpc_nitf:download",
    "assets.analytic:download",
    "assets.analytic_dn_xml:download",
    "assets.basic_analytic_dn_xml:download",
    "assets.basic_analytic_dn_rpc:download",
    "assets.basic_analytic_xml_nitf:download",
    "assets.basic_analytic:download",
    "assets.udm:download"
   ],
   "geometry": {
    "coordinates": [
     [
      [
       -121.15721225219308,
       38.02842465499087
      ],
      [
       -121.29480658904201,
       37.88539373982487
      ],
      [
       -121.35345653729958,
       37.920473896931114
      ],
      [
       -121.21320365229488,
       38.06633030457349
      ],
      [
       -121.16806766141471,
       38.039257324871706
      ],
      [
       -121.17069786793836,
       38.03652592081954
      ],
      [
       -121.15721225219308,
       38.02842465499087
      ]
     ]
    ],
    "type": "Polygon"
   },
   "id": "20160831_212707_0c43",
   "properties": {
    "acquired": "2016-08-31T21:27:07.223909Z",
    "anomalous_pixels": 0,
    "cloud_cover": 0,
    "columns": 5672,
    "epsg_code": 32610,
    "ground_control": true,
    "gsd": 3.1,
    "instrument": "PS2",
    "item_type": "PSScene4Band",
    "origin_x": 644721,
    "origin_y": 4214682,
    "pixel_resolution": 3,
    "provider": "planetscope",
    "published": "2016-11-06T22:11:02Z",
    "quality_category": "standard",
    "rows": 6738,
    "satellite_id": "0c43",
    "strip_id": "232154",
    "sun_azimuth": 217.4,
    "sun_elevation": 55,
    "updated": "2017-10-01T03:19:39Z",
    "usable_data": 0,
    "view_angle": 1.8
   },
   "type": "Feature"
  },
  {
   "_links": {
    "_self": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_212704_0c43",
    "assets": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_212704_0c43/assets/",
    "thumbnail": "https://tiles.planet.com/data/v1/item-types/PSScene4Band/items/20160831_212704_0c43/thumb"
   },
   "_permissions": [
    "assets.basic_analytic_rpc_nitf:download",
    "assets.analytic_xml:download",
    "assets.basic_analytic_dn:download",
    "assets.basic_analytic_dn_xml_nitf:download",
    "assets.basic_analytic_dn_nitf:download",
    "assets.basic_analytic_xml:download",
    "assets.basic_analytic_nitf:download",
    "assets.basic_analytic_rpc:download",
    "assets.analytic_dn:download",
    "assets.basic_udm:download",
    "assets.basic_analytic_dn_rpc_nitf:download",
    "assets.analytic:download",
    "assets.analytic_dn_xml:download",
    "assets.basic_analytic_dn_xml:download",
    "assets.basic_analytic_dn_rpc:download",
    "assets.basic_analytic_xml_nitf:download",
    "assets.basic_analytic:download",
    "assets.udm:download"
   ],
   "geometry": {
    "coordinates": [
     [
      [
       -121.30873833274296,
       38.1317658307185
      ],
      [
       -121.4454322319012,
       37.98943846763158
      ],
      [
       -121.50421859688318,
       38.024474326141224
      ],
      [
       -121.36474107573338,
       38.1697710715392
      ],
      [
       -121.32056553816454,
       38.14343607755677
      ],
      [
       -121.3233781357555,
       38.14050512643633
      ],
      [
       -121.30873833274296,
       38.1317658307185
      ]
     ]
    ],
    "type": "Polygon"
   },
   "id": "20160831_212704_0c43",
   "properties": {
    "acquired": "2016-08-31T21:27:04.723994Z",
    "anomalous_pixels": 0,
    "cloud_cover": 0,
    "columns": 5648,
    "epsg_code": 32610,
    "ground_control": true,
    "gsd": 3.1,
    "instrument": "PS2",
    "item_type": "PSScene4Band",
    "origin_x": 631284,
    "origin_y": 4225917,
    "pixel_resolution": 3,
    "provider": "planetscope",
    "published": "2016-11-06T22:10:54Z",
    "quality_category": "standard",
    "rows": 6712,
    "satellite_id": "0c43",
    "strip_id": "232154",
    "sun_azimuth": 217,
    "sun_elevation": 55,
    "updated": "2017-10-01T03:19:37Z",
    "usable_data": 0,
    "view_angle": 1.8
   },
   "type": "Feature"
  },
  {
   "_links": {
    "_self": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_212703_1_0c43",
    "assets": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_212703_1_0c43/assets/",
    "thumbnail": "https://tiles.planet.com/data/v1/item-types/PSScene4Band/items/20160831_212703_1_0c43/thumb"
   },
   "_permissions": [
    "assets.basic_analytic_rpc_nitf:download",
    "assets.analytic_xml:download",
    "assets.basic_analytic_dn:download",
    "assets.basic_analytic_dn_xml_nitf:download",
    "assets.basic_analytic_dn_nitf:download",
    "assets.basic_analytic_xml:download",
    "assets.basic_analytic_nitf:download",
    "assets.basic_analytic_rpc:download",
    "assets.analytic_dn:download",
    "assets.basic_udm:download",
    "assets.basic_analytic_dn_rpc_nitf:download",
    "assets.analytic:download",
    "assets.analytic_dn_xml:download",
    "assets.basic_analytic_dn_xml:download",
    "assets.basic_analytic_dn_rpc:download",
    "assets.basic_analytic_xml_nitf:download",
    "assets.basic_analytic:download",
    "assets.udm:download"
   ],
   "geometry": {
    "coordinates": [
     [
      [
       -121.35797983943802,
       38.16574039920444
      ],
      [
       -121.49445034206978,
       38.02357484425646
      ],
      [
       -121.55328752275567,
       38.0585735397704
      ],
      [
       -121.41363863073502,
       38.20413669715483
      ],
      [
       -121.36999926779542,
       38.17813743526288
      ],
      [
       -121.37319351319957,
       38.174809943776175
      ],
      [
       -121.35797983943802,
       38.16574039920444
      ]
     ]
    ],
    "type": "Polygon"
   },
   "id": "20160831_212703_1_0c43",
   "properties": {
    "acquired": "2016-08-31T21:27:03.883939Z",
    "anomalous_pixels": 0,
    "cloud_cover": 0,
    "columns": 5642,
    "epsg_code": 32610,
    "ground_control": true,
    "gsd": 3.1,
    "instrument": "PS2",
    "item_type": "PSScene4Band",
    "origin_x": 626919,
    "origin_y": 4229655,
    "pixel_resolution": 3,
    "provider": "planetscope",
    "published": "2016-11-06T22:10:50Z",
    "quality_category": "standard",
    "rows": 6719,
    "satellite_id": "0c43",
    "strip_id": "232154",
    "sun_azimuth": 216.9,
    "sun_elevation": 55,
    "updated": "2017-10-01T03:19:36Z",
    "usable_data": 0,
    "view_angle": 1.8
   },
   "type": "Feature"
  },
  {
   "_links": {
    "_self": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_180302_0e26",
    "assets": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_180302_0e26/assets/",
    "thumbnail": "https://tiles.planet.com/data/v1/item-types/PSScene4Band/items/20160831_180302_0e26/thumb"
   },
   "_permissions": [
    "assets.basic_analytic_rpc_nitf:download",
    "assets.analytic_xml:download",
    "assets.basic_analytic_dn:download",
    "assets.basic_analytic_dn_xml_nitf:download",
    "assets.basic_analytic_dn_nitf:download",
    "assets.basic_analytic_xml:download",
    "assets.basic_analytic_nitf:download",
    "assets.basic_analytic_rpc:download",
    "assets.analytic_dn:download",
    "assets.basic_udm:download",
    "assets.basic_analytic_dn_rpc_nitf:download",
    "assets.analytic:download",
    "assets.analytic_dn_xml:download",
    "assets.analytic_sr:download",
    "assets.basic_analytic_dn_xml:download",
    "assets.basic_analytic_dn_rpc:download",
    "assets.basic_analytic_xml_nitf:download",
    "assets.basic_analytic:download",
    "assets.udm:download"
   ],
   "geometry": {
    "coordinates": [
     [
      [
       -121.56892766713494,
       38.06513147256947
      ],
      [
       -121.27163231566934,
       38.01130592131673
      ],
      [
       -121.29367575170563,
       37.93509767037928
      ],
      [
       -121.59134291369642,
       37.98920638915476
      ],
      [
       -121.5740753072543,
       38.04971911106893
      ],
      [
       -121.57336401202598,
       38.04958955482905
      ],
      [
       -121.56892766713494,
       38.06513147256947
      ]
     ]
    ],
    "type": "Polygon"
   },
   "id": "20160831_180302_0e26",
   "properties": {
    "acquired": "2016-08-31T18:03:02.59036Z",
    "anomalous_pixels": 0,
    "cloud_cover": 0,
    "columns": 9344,
    "epsg_code": 32610,
    "ground_control": true,
    "gsd": 4.1,
    "instrument": "PS2",
    "item_type": "PSScene4Band",
    "origin_x": 623697,
    "origin_y": 4214010,
    "pixel_resolution": 3,
    "provider": "planetscope",
    "published": "2016-11-06T21:42:33Z",
    "quality_category": "standard",
    "rows": 4675,
    "satellite_id": "0e26",
    "strip_id": "231989",
    "sun_azimuth": 128.6,
    "sun_elevation": 49.3,
    "updated": "2017-10-17T01:29:05Z",
    "usable_data": 0,
    "view_angle": 3.2
   },
   "type": "Feature"
  },
  {
   "_links": {
    "_self": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_180303_0e26",
    "assets": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_180303_0e26/assets/",
    "thumbnail": "https://tiles.planet.com/data/v1/item-types/PSScene4Band/items/20160831_180303_0e26/thumb"
   },
   "_permissions": [
    "assets.basic_analytic_rpc_nitf:download",
    "assets.analytic_xml:download",
    "assets.basic_analytic_dn:download",
    "assets.basic_analytic_dn_xml_nitf:download",
    "assets.basic_analytic_dn_nitf:download",
    "assets.basic_analytic_xml:download",
    "assets.basic_analytic_nitf:download",
    "assets.basic_analytic_rpc:download",
    "assets.analytic_dn:download",
    "assets.basic_udm:download",
    "assets.basic_analytic_dn_rpc_nitf:download",
    "assets.analytic:download",
    "assets.analytic_dn_xml:download",
    "assets.analytic_sr:download",
    "assets.basic_analytic_dn_xml:download",
    "assets.basic_analytic_dn_rpc:download",
    "assets.basic_analytic_xml_nitf:download",
    "assets.basic_analytic:download",
    "assets.udm:download"
   ],
   "geometry": {
    "coordinates": [
     [
      [
       -121.58862086000653,
       37.9987455733216
      ],
      [
       -121.29168376120943,
       37.94508675042985
      ],
      [
       -121.31366224424758,
       37.868863889145864
      ],
      [
       -121.61161830108884,
       37.92294658469418
      ],
      [
       -121.59451603875645,
       37.983160459064315
      ],
      [
       -121.5931395864826,
       37.98291011635951
      ],
      [
       -121.58862086000653,
       37.9987455733216
      ]
     ]
    ],
    "type": "Polygon"
   },
   "id": "20160831_180303_0e26",
   "properties": {
    "acquired": "2016-08-31T18:03:03.631837Z",
    "anomalous_pixels": 0,
    "cloud_cover": 0,
    "columns": 9359,
    "epsg_code": 32610,
    "ground_control": true,
    "gsd": 4.1,
    "instrument": "PS2",
    "item_type": "PSScene4Band",
    "origin_x": 622026,
    "origin_y": 4206618,
    "pixel_resolution": 3,
    "provider": "planetscope",
    "published": "2016-11-06T21:42:31Z",
    "quality_category": "standard",
    "rows": 4671,
    "satellite_id": "0e26",
    "strip_id": "231989",
    "sun_azimuth": 128.5,
    "sun_elevation": 49.3,
    "updated": "2017-10-17T01:20:24Z",
    "usable_data": 0,
    "view_angle": 3.1
   },
   "type": "Feature"
  },
  {
   "_links": {
    "_self": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_180301_0e26",
    "assets": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_180301_0e26/assets/",
    "thumbnail": "https://tiles.planet.com/data/v1/item-types/PSScene4Band/items/20160831_180301_0e26/thumb"
   },
   "_permissions": [
    "assets.basic_analytic_rpc_nitf:download",
    "assets.analytic_xml:download",
    "assets.basic_analytic_dn:download",
    "assets.basic_analytic_dn_xml_nitf:download",
    "assets.basic_analytic_dn_nitf:download",
    "assets.basic_analytic_xml:download",
    "assets.basic_analytic_nitf:download",
    "assets.basic_analytic_rpc:download",
    "assets.analytic_dn:download",
    "assets.basic_udm:download",
    "assets.basic_analytic_dn_rpc_nitf:download",
    "assets.analytic:download",
    "assets.analytic_dn_xml:download",
    "assets.analytic_sr:download",
    "assets.basic_analytic_dn_xml:download",
    "assets.basic_analytic_dn_rpc:download",
    "assets.basic_analytic_xml_nitf:download",
    "assets.basic_analytic:download",
    "assets.udm:download"
   ],
   "geometry": {
    "coordinates": [
     [
      [
       -121.54995015759951,
       38.13196642543737
      ],
      [
       -121.2513420222768,
       38.077813169470836
      ],
      [
       -121.25617689137235,
       38.061562216759384
      ],
      [
       -121.25557507417821,
       38.06145271492599
      ],
      [
       -121.27297155375429,
       38.001520252188755
      ],
      [
       -121.57156408387726,
       38.055895271790455
      ],
      [
       -121.55674852266706,
       38.10779886343243
      ],
      [
       -121.55703551093714,
       38.107851224593
      ],
      [
       -121.54995015759951,
       38.13196642543737
      ]
     ]
    ],
    "type": "Polygon"
   },
   "id": "20160831_180301_0e26",
   "properties": {
    "acquired": "2016-08-31T18:03:01.540205Z",
    "anomalous_pixels": 0,
    "cloud_cover": 0,
    "columns": 9351,
    "epsg_code": 32610,
    "ground_control": true,
    "gsd": 4.1,
    "instrument": "PS2",
    "item_type": "PSScene4Band",
    "origin_x": 625320,
    "origin_y": 4221453,
    "pixel_resolution": 3,
    "provider": "planetscope",
    "published": "2016-11-06T21:42:17Z",
    "quality_category": "standard",
    "rows": 4688,
    "satellite_id": "0e26",
    "strip_id": "231989",
    "sun_azimuth": 128.7,
    "sun_elevation": 49.2,
    "updated": "2017-10-16T20:47:15Z",
    "usable_data": 0,
    "view_angle": 3.2
   },
   "type": "Feature"
  },
  {
   "_links": {
    "_self": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_143847_0c79",
    "assets": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_143847_0c79/assets/",
    "thumbnail": "https://tiles.planet.com/data/v1/item-types/PSScene4Band/items/20160831_143847_0c79/thumb"
   },
   "_permissions": [
    "assets.basic_analytic_rpc_nitf:download",
    "assets.analytic_xml:download",
    "assets.basic_analytic_dn:download",
    "assets.basic_analytic_dn_xml_nitf:download",
    "assets.basic_analytic_dn_nitf:download",
    "assets.basic_analytic_xml:download",
    "assets.basic_analytic_nitf:download",
    "assets.basic_analytic_rpc:download",
    "assets.analytic_dn:download",
    "assets.basic_udm:download",
    "assets.basic_analytic_dn_rpc_nitf:download",
    "assets.analytic:download",
    "assets.analytic_dn_xml:download",
    "assets.basic_analytic_dn_xml:download",
    "assets.basic_analytic_dn_rpc:download",
    "assets.basic_analytic_xml_nitf:download",
    "assets.basic_analytic:download",
    "assets.udm:download"
   ],
   "geometry": {
    "coordinates": [
     [
      [
       -121.467743861725,
       38.03260473151942
      ],
      [
       -121.61328193852071,
       38.1781253214791
      ],
      [
       -121.55658609384078,
       38.21331159716797
      ],
      [
       -121.41229748371306,
       38.06896455234931
      ],
      [
       -121.42713286115494,
       38.05978639282532
      ],
      [
       -121.42589708341244,
       38.0585499395869
      ],
      [
       -121.467743861725,
       38.03260473151942
      ]
     ]
    ],
    "type": "Polygon"
   },
   "id": "20160831_143847_0c79",
   "properties": {
    "acquired": "2016-08-31T14:38:47.168105Z",
    "anomalous_pixels": 0,
    "cloud_cover": 0,
    "columns": 5938,
    "epsg_code": 32610,
    "ground_control": true,
    "gsd": 3.1,
    "instrument": "PS2",
    "item_type": "PSScene4Band",
    "origin_x": 621456,
    "origin_y": 4230468,
    "pixel_resolution": 3,
    "provider": "planetscope",
    "published": "2016-09-14T20:33:26Z",
    "quality_category": "test",
    "rows": 6643,
    "satellite_id": "0c79",
    "strip_id": "232281",
    "sun_azimuth": 88.5,
    "sun_elevation": 11.7,
    "updated": "2018-06-26T00:20:32Z",
    "usable_data": 0,
    "view_angle": 2.9
   },
   "type": "Feature"
  },
  {
   "_links": {
    "_self": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_143846_0c79",
    "assets": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_143846_0c79/assets/",
    "thumbnail": "https://tiles.planet.com/data/v1/item-types/PSScene4Band/items/20160831_143846_0c79/thumb"
   },
   "_permissions": [
    "assets.basic_analytic_rpc_nitf:download",
    "assets.analytic_xml:download",
    "assets.basic_analytic_dn:download",
    "assets.basic_analytic_dn_xml_nitf:download",
    "assets.basic_analytic_dn_nitf:download",
    "assets.basic_analytic_xml:download",
    "assets.basic_analytic_nitf:download",
    "assets.basic_analytic_rpc:download",
    "assets.analytic_dn:download",
    "assets.basic_udm:download",
    "assets.basic_analytic_dn_rpc_nitf:download",
    "assets.analytic:download",
    "assets.analytic_dn_xml:download",
    "assets.basic_analytic_dn_xml:download",
    "assets.basic_analytic_dn_rpc:download",
    "assets.basic_analytic_xml_nitf:download",
    "assets.basic_analytic:download",
    "assets.udm:download"
   ],
   "geometry": {
    "coordinates": [
     [
      [
       -121.60663604334096,
       38.180058543884314
      ],
      [
       -121.46228342475021,
       38.03599111771432
      ],
      [
       -121.47743672003068,
       38.026596238468976
      ],
      [
       -121.47645139230839,
       38.02561094438858
      ],
      [
       -121.51792686388396,
       37.999846022237556
      ],
      [
       -121.66326671493395,
       38.14485692935789
      ],
      [
       -121.60663604334096,
       38.180058543884314
      ]
     ]
    ],
    "type": "Polygon"
   },
   "id": "20160831_143846_0c79",
   "properties": {
    "acquired": "2016-08-31T14:38:46.333255Z",
    "anomalous_pixels": 0,
    "cloud_cover": 0,
    "columns": 5939,
    "epsg_code": 32610,
    "ground_control": true,
    "gsd": 3.1,
    "instrument": "PS2",
    "item_type": "PSScene4Band",
    "origin_x": 617130,
    "origin_y": 4226712,
    "pixel_resolution": 3,
    "provider": "planetscope",
    "published": "2016-09-14T20:33:26Z",
    "quality_category": "standard",
    "rows": 6626,
    "satellite_id": "0c79",
    "strip_id": "232281",
    "sun_azimuth": 88.4,
    "sun_elevation": 11.7,
    "updated": "2017-10-01T03:18:40Z",
    "usable_data": 0,
    "view_angle": 2.9
   },
   "type": "Feature"
  },
  {
   "_links": {
    "_self": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_143845_0c79",
    "assets": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_143845_0c79/assets/",
    "thumbnail": "https://tiles.planet.com/data/v1/item-types/PSScene4Band/items/20160831_143845_0c79/thumb"
   },
   "_permissions": [
    "assets.basic_analytic_rpc_nitf:download",
    "assets.analytic_xml:download",
    "assets.basic_analytic_dn:download",
    "assets.basic_analytic_dn_xml_nitf:download",
    "assets.basic_analytic_dn_nitf:download",
    "assets.basic_analytic_xml:download",
    "assets.basic_analytic_nitf:download",
    "assets.basic_analytic_rpc:download",
    "assets.analytic_dn:download",
    "assets.basic_udm:download",
    "assets.basic_analytic_dn_rpc_nitf:download",
    "assets.analytic:download",
    "assets.analytic_dn_xml:download",
    "assets.basic_analytic_dn_xml:download",
    "assets.basic_analytic_dn_rpc:download",
    "assets.basic_analytic_xml_nitf:download",
    "assets.basic_analytic:download",
    "assets.udm:download"
   ],
   "geometry": {
    "coordinates": [
     [
      [
       -121.65639832649398,
       38.14635842702872
      ],
      [
       -121.51274287679391,
       38.00306635991506
      ],
      [
       -121.52760450921275,
       37.99383418514373
      ],
      [
       -121.52622557612354,
       37.99245859969175
      ],
      [
       -121.56791445611796,
       37.96649582021182
      ],
      [
       -121.71294530192883,
       38.11107930066283
      ],
      [
       -121.65639832649398,
       38.14635842702872
      ]
     ]
    ],
    "type": "Polygon"
   },
   "id": "20160831_143845_0c79",
   "properties": {
    "acquired": "2016-08-31T14:38:45.499088Z",
    "anomalous_pixels": 0,
    "cloud_cover": 0,
    "columns": 5915,
    "epsg_code": 32610,
    "ground_control": true,
    "gsd": 3.1,
    "instrument": "PS2",
    "item_type": "PSScene4Band",
    "origin_x": 612831,
    "origin_y": 4222908,
    "pixel_resolution": 3,
    "provider": "planetscope",
    "published": "2016-09-14T20:33:26Z",
    "quality_category": "standard",
    "rows": 6615,
    "satellite_id": "0c79",
    "strip_id": "232281",
    "sun_azimuth": 88.4,
    "sun_elevation": 11.6,
    "updated": "2017-10-01T03:18:38Z",
    "usable_data": 0,
    "view_angle": 2.8
   },
   "type": "Feature"
  },
  {
   "_links": {
    "_self": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_143843_1_0c79",
    "assets": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_143843_1_0c79/assets/",
    "thumbnail": "https://tiles.planet.com/data/v1/item-types/PSScene4Band/items/20160831_143843_1_0c79/thumb"
   },
   "_permissions": [
    "assets.basic_analytic_rpc_nitf:download",
    "assets.analytic_xml:download",
    "assets.basic_analytic_dn:download",
    "assets.basic_analytic_dn_xml_nitf:download",
    "assets.basic_analytic_dn_nitf:download",
    "assets.basic_analytic_xml:download",
    "assets.basic_analytic_nitf:download",
    "assets.basic_analytic_rpc:download",
    "assets.analytic_dn:download",
    "assets.basic_udm:download",
    "assets.basic_analytic_dn_rpc_nitf:download",
    "assets.analytic:download",
    "assets.analytic_dn_xml:download",
    "assets.basic_analytic_dn_xml:download",
    "assets.basic_analytic_dn_rpc:download",
    "assets.basic_analytic_xml_nitf:download",
    "assets.basic_analytic:download",
    "assets.udm:download"
   ],
   "geometry": {
    "coordinates": [
     [
      [
       -121.70712284266092,
       38.11243223625825
      ],
      [
       -121.56345873026306,
       37.969270733517455
      ],
      [
       -121.57756779254204,
       37.96048396657465
      ],
      [
       -121.57582250056866,
       37.95874427821078
      ],
      [
       -121.6181858863555,
       37.93230739328116
      ],
      [
       -121.76362596441905,
       38.077146984409396
      ],
      [
       -121.70712284266092,
       38.11243223625825
      ]
     ]
    ],
    "type": "Polygon"
   },
   "id": "20160831_143843_1_0c79",
   "properties": {
    "acquired": "2016-08-31T14:38:43.947766Z",
    "anomalous_pixels": 0,
    "cloud_cover": 0,
    "columns": 5915,
    "epsg_code": 32610,
    "ground_control": true,
    "gsd": 3.1,
    "instrument": "PS2",
    "item_type": "PSScene4Band",
    "origin_x": 608436,
    "origin_y": 4219080,
    "pixel_resolution": 3,
    "provider": "planetscope",
    "published": "2016-09-14T20:33:26Z",
    "quality_category": "standard",
    "rows": 6626,
    "satellite_id": "0c79",
    "strip_id": "232281",
    "sun_azimuth": 88.3,
    "sun_elevation": 11.5,
    "updated": "2017-10-01T03:18:40Z",
    "usable_data": 0,
    "view_angle": 2.1
   },
   "type": "Feature"
  },
  {
   "_links": {
    "_self": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_180236_0e0e",
    "assets": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_180236_0e0e/assets/",
    "thumbnail": "https://tiles.planet.com/data/v1/item-types/PSScene4Band/items/20160831_180236_0e0e/thumb"
   },
   "_permissions": [
    "assets.basic_analytic_rpc_nitf:download",
    "assets.analytic_xml:download",
    "assets.basic_analytic_dn:download",
    "assets.basic_analytic_dn_xml_nitf:download",
    "assets.basic_analytic_dn_nitf:download",
    "assets.basic_analytic_xml:download",
    "assets.basic_analytic_nitf:download",
    "assets.basic_analytic_rpc:download",
    "assets.analytic_dn:download",
    "assets.basic_udm:download",
    "assets.basic_analytic_dn_rpc_nitf:download",
    "assets.analytic:download",
    "assets.analytic_dn_xml:download",
    "assets.analytic_sr:download",
    "assets.basic_analytic_dn_xml:download",
    "assets.basic_analytic_dn_rpc:download",
    "assets.basic_analytic_xml_nitf:download",
    "assets.basic_analytic:download",
    "assets.udm:download"
   ],
   "geometry": {
    "coordinates": [
     [
      [
       -121.50890448481191,
       37.89644636172443
      ],
      [
       -121.80327683634364,
       37.9559427739406
      ],
      [
       -121.77830505795973,
       38.03307001060126
      ],
      [
       -121.48457619529293,
       37.973679053204705
      ],
      [
       -121.48932563688444,
       37.95920665503185
      ],
      [
       -121.48839087807914,
       37.95901794311589
      ],
      [
       -121.50890448481191,
       37.89644636172443
      ]
     ]
    ],
    "type": "Polygon"
   },
   "id": "20160831_180236_0e0e",
   "properties": {
    "acquired": "2016-08-31T18:02:36.869026Z",
    "anomalous_pixels": 0,
    "cloud_cover": 0.01,
    "columns": 9323,
    "epsg_code": 32610,
    "ground_control": true,
    "gsd": 4.1,
    "instrument": "PS2",
    "item_type": "PSScene4Band",
    "origin_x": 605133,
    "origin_y": 4210191,
    "pixel_resolution": 3,
    "provider": "planetscope",
    "published": "2016-09-14T19:02:27Z",
    "quality_category": "standard",
    "rows": 4940,
    "satellite_id": "0e0e",
    "strip_id": "232396",
    "sun_azimuth": 128.5,
    "sun_elevation": 49.3,
    "updated": "2018-06-26T00:28:26Z",
    "usable_data": 0,
    "view_angle": 0.7
   },
   "type": "Feature"
  },
  {
   "_links": {
    "_self": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_180235_0e0e",
    "assets": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_180235_0e0e/assets/",
    "thumbnail": "https://tiles.planet.com/data/v1/item-types/PSScene4Band/items/20160831_180235_0e0e/thumb"
   },
   "_permissions": [
    "assets.basic_analytic_rpc_nitf:download",
    "assets.analytic_xml:download",
    "assets.basic_analytic_dn:download",
    "assets.basic_analytic_dn_xml_nitf:download",
    "assets.basic_analytic_dn_nitf:download",
    "assets.basic_analytic_xml:download",
    "assets.basic_analytic_nitf:download",
    "assets.basic_analytic_rpc:download",
    "assets.analytic_dn:download",
    "assets.basic_udm:download",
    "assets.basic_analytic_dn_rpc_nitf:download",
    "assets.analytic:download",
    "assets.analytic_dn_xml:download",
    "assets.analytic_sr:download",
    "assets.basic_analytic_dn_xml:download",
    "assets.basic_analytic_dn_rpc:download",
    "assets.basic_analytic_xml_nitf:download",
    "assets.basic_analytic:download",
    "assets.udm:download"
   ],
   "geometry": {
    "coordinates": [
     [
      [
       -121.48792857176652,
       37.96346376237182
      ],
      [
       -121.78317725409431,
       38.02307039859819
      ],
      [
       -121.75811788668378,
       38.10017255040613
      ],
      [
       -121.46411507114685,
       38.0408069209492
      ],
      [
       -121.46898400003386,
       38.026002088483075
      ],
      [
       -121.46750324694341,
       38.02570338106258
      ],
      [
       -121.48792857176652,
       37.96346376237182
      ]
     ]
    ],
    "type": "Polygon"
   },
   "id": "20160831_180235_0e0e",
   "properties": {
    "acquired": "2016-08-31T18:02:35.82284Z",
    "anomalous_pixels": 0,
    "cloud_cover": 0.01,
    "columns": 9325,
    "epsg_code": 32610,
    "ground_control": true,
    "gsd": 4.1,
    "instrument": "PS2",
    "item_type": "PSScene4Band",
    "origin_x": 606801,
    "origin_y": 4217658,
    "pixel_resolution": 3,
    "provider": "planetscope",
    "published": "2016-09-14T19:02:26Z",
    "quality_category": "standard",
    "rows": 4940,
    "satellite_id": "0e0e",
    "strip_id": "232396",
    "sun_azimuth": 128.6,
    "sun_elevation": 49.3,
    "updated": "2018-06-26T00:28:25Z",
    "usable_data": 0,
    "view_angle": 0.8
   },
   "type": "Feature"
  },
  {
   "_links": {
    "_self": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_180234_0e0e",
    "assets": "https://api.planet.com/data/v1/item-types/PSScene4Band/items/20160831_180234_0e0e/assets/",
    "thumbnail": "https://tiles.planet.com/data/v1/item-types/PSScene4Band/items/20160831_180234_0e0e/thumb"
   },
   "_permissions": [
    "assets.basic_analytic_rpc_nitf:download",
    "assets.analytic_xml:download",
    "assets.basic_analytic_dn:download",
    "assets.basic_analytic_dn_xml_nitf:download",
    "assets.basic_analytic_dn_nitf:download",
    "assets.basic_analytic_xml:download",
    "assets.basic_analytic_nitf:download",
    "assets.basic_analytic_rpc:download",
    "assets.analytic_dn:download",
    "assets.basic_udm:download",
    "assets.basic_analytic_dn_rpc_nitf:download",
    "assets.analytic:download",
    "assets.analytic_dn_xml:download",
    "assets.analytic_sr:download",
    "assets.basic_analytic_dn_xml:download",
    "assets.basic_analytic_dn_rpc:download",
    "assets.basic_analytic_xml_nitf:download",
    "assets.basic_analytic:download",
    "assets.udm:download"
   ],
   "geometry": {
    "coordinates": [
     [
      [
       -121.46758404421757,
       38.03025889974506
      ],
      [
       -121.7625594957127,
       38.08976497133559
      ],
      [
       -121.73748955468407,
       38.16686616710216
      ],
      [
       -121.44391196589203,
       38.1076352539157
      ],
      [
       -121.44904738746592,
       38.09208095176651
      ],
      [
       -121.44736404983642,
       38.09174133997502
      ],
      [
       -121.46758404421757,
       38.03025889974506
      ]
     ]
    ],
    "type": "Polygon"
   },
   "id": "20160831_180234_0e0e",
   "properties": {
    "acquired": "2016-08-31T18:02:34.776554Z",
    "anomalous_pixels": 0,
    "cloud_cover": 0,
    "columns": 9305,
    "epsg_code": 32610,
    "ground_control": true,
    "gsd": 4.1,
    "instrument": "PS2",
    "item_type": "PSScene4Band",
    "origin_x": 608511,
    "origin_y": 4225083,
    "pixel_resolution": 3,
    "provider": "planetscope",
    "published": "2016-09-14T19:02:26Z",
    "quality_category": "standard",
    "rows": 4935,
    "satellite_id": "0e0e",
    "strip_id": "232396",
    "sun_azimuth": 128.7,
    "sun_elevation": 49.2,
    "updated": "2018-06-26T00:28:25Z",
    "usable_data": 0,
    "view_angle": 0.8
   },
   "type": "Feature"
  }
 ],
 "type": "FeatureCollection"
}

Our search returns metadata for all of the images within our AOI that match our date range and cloud coverage filters. It looks like there are multiple images here; let's extract a list of just those image IDs:


In [4]:
# extract image IDs only
image_ids = [feature['id'] for feature in search_result.json()['features']]
print(image_ids)


['20160831_143848_0c79', '20160831_212703_0c43', '20160831_212705_0c43', '20160831_212706_0c43', '20160831_212707_0c43', '20160831_212704_0c43', '20160831_212703_1_0c43', '20160831_180302_0e26', '20160831_180303_0e26', '20160831_180301_0e26', '20160831_143847_0c79', '20160831_143846_0c79', '20160831_143845_0c79', '20160831_143843_1_0c79', '20160831_180236_0e0e', '20160831_180235_0e0e', '20160831_180234_0e0e']

Since we just want a single image, and this is only a demonstration, for our purposes here we can arbitrarily select the first image in that list. Let's do that, and get the asset list available for that image:


In [5]:
# For demo purposes, just grab the first image ID
id0 = image_ids[0]
id0_url = 'https://api.planet.com/data/v1/item-types/{}/items/{}/assets'.format(item_type, id0)

# Returns JSON metadata for assets in this ID. Learn more: planet.com/docs/reference/data-api/items-assets/#asset
result = \
  requests.get(
    id0_url,
    auth=HTTPBasicAuth(PLANET_API_KEY, '')
  )

# List of asset types available for this particular satellite image
print(result.json().keys())


dict_keys(['analytic', 'analytic_dn', 'analytic_dn_xml', 'analytic_xml', 'basic_analytic', 'basic_analytic_dn', 'basic_analytic_dn_nitf', 'basic_analytic_dn_rpc', 'basic_analytic_dn_rpc_nitf', 'basic_analytic_dn_xml', 'basic_analytic_dn_xml_nitf', 'basic_analytic_nitf', 'basic_analytic_rpc', 'basic_analytic_rpc_nitf', 'basic_analytic_xml', 'basic_analytic_xml_nitf', 'basic_udm', 'udm'])

Activation and Downloading

The Data API does not pre-generate assets, so they are not always immediately availiable to download. In order to download an asset, we first have to activate it.

Remember, earlier we decided we wanted a color-corrected image best suited for analytic applications. We can check the status of the analytic asset we want to download like so:


In [6]:
# This is "inactive" if the "analytic" asset has not yet been activated; otherwise 'active'
print(result.json()['analytic']['status'])


active

Let's now go ahead and activate that asset for download:


In [7]:
# Parse out useful links
links = result.json()[u"analytic"]["_links"]
self_link = links["_self"]
activation_link = links["activate"]

# Request activation of the 'analytic' asset:
activate_result = \
  requests.get(
    activation_link,
    auth=HTTPBasicAuth(PLANET_API_KEY, '')
  )

At this point, we wait for the activation status for the asset we are requesting to change from inactive to active. We can monitor this by polling the "status" of the asset:


In [8]:
activation_status_result = \
  requests.get(
    self_link,
    auth=HTTPBasicAuth(PLANET_API_KEY, '')
  )
    
print(activation_status_result.json()["status"])


active

Once the asset has finished activating (status is "active"), we can download it.

Note: the download link on an active asset is temporary


In [9]:
# Image can be downloaded by making a GET with your Planet API key, from here:
download_link = activation_status_result.json()["location"]
print(download_link)


https://api.planet.com/data/v1/download?token=eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ5QlZZMHhHczVjZ0JqRzg0dktRM2FuWXgyRlZuOEMydmxPUWFrSTdqeDR1ZGo4YVZvMWJ0V3NDaFo5cklTYyt2eEJYUFo1N3llZDR4YmNFNUMxRHhSZz09IiwiaXRlbV90eXBlX2lkIjoiUFNTY2VuZTRCYW5kIiwidG9rZW5fdHlwZSI6InR5cGVkLWl0ZW0iLCJleHAiOjE1Mzk5MDkzNDIsIml0ZW1faWQiOiIyMDE2MDgzMV8xNDM4NDhfMGM3OSIsImFzc2V0X3R5cGUiOiJhbmFseXRpYyJ9.BCxPq586Lg5xgn7wllKZLFnczbPzeYTjQXf2xm_bxHn7x9a7eImTknRobUM19reOCBDrBeXJBqnEu6MrYVMtlQ