Delivery

last updated: November 16, 2022

Order Layout and Order Manifest

When using the Orders API, you first create an order query JSON block that describes the parameters of order: the kind of imagery you want, an area of interest (AoI) or asset ID, any tool operations you want to perform on that imagery, and any delivery instructions, such as requesting STAC as the file format for scenes or delivering the order to a cloud bucket.

When the order is fulfilled, a JSON manifest is delivered that describes the available assets delivered, as well as the path to those deliverables.

For each asset, a JSON metadata file is also delivered. It describes the asset and details about the imagery such as the date it was captured, with what sensors, and under what conditions.

The following sections explain the order manifest, metadata, and delivery settings:

Order Layout and Order Manifest The metadata.json file
Review the logical structure of delivered assets and the manifest.json file Learn about the asset through the associated metadata.json file
STAC Metadata Delivery to Cloud Storage
Explore the SpatioTemporal Asset Catalog (STAC) format for scene orders Deliver orders to the S3, Azure, GCP, or Oracle

Order Delivery Layout

Your order is delivered following a logical structure of orders, imagery-name, and file types, as well as the order manifest.json file and a metadata.json file for each imagery.

Delivery of scenes

The default order delivery layout for scenes is organized as follows:

{OrderID}/manifest.json
{OrderID}/{ItemType}/{ItemID}_metadata.json
{OrderID}/{ItemType}/{AssetFileName}.{AssetFileExtension}

There are slight structural variations when an order is zipped or composited. When zipped, its layout takes the structure below. After it is unzipped, the resulting layout of the contents look like the layout above.

{OrderID}/manifest.json
{OrderID}/{ArchiveFilename}.zip

When an order is composited, its layout will be organized as follows:

{OrderID}/manifest.json
{OrderID}/composite_udm.tif
{OrderID}/composite.tif
{OrderID}/{ItemID_1}_metadata.json
{OrderID}/{ItemID_1}_{AssetName}_metadata.xml
{OrderID}/{ItemID_2}_metadata.json
{OrderID}/{ItemID_2}_{AssetName}_metadata.xml

Delivery of Basemaps

You can download Basemaps or have them delivered to supported Cloud Storage Providers. Each basemaps order contains delivery results with the image in COG format, sourcetrace, and UDM2 metadata.

The default order delivery layout for Basemaps is organized as follows:

<order_id>/{mosaic_name}/{quad_id}.tif
<order_id>/{mosaic_name}/{quad_id}_metadata.json
<order_id>/{mosaic_name}/{quad_id}_sourcetrace.shz
<order_id>/{mosaic_name}/{quad_id}_sourcetrace.tif
<order_id>/{mosaic_name}/{quad_id}_udm2.tif

Zipped vector resources decompress with the metadata.json file for each imagery at the root, and the Shapefile dataset, as in:

/{mosaic_name}/{quad_id_vector_1}/_metadata.json
/{mosaic_name}/{quad_id_vector_2}/_metadata.json

/{mosaic_name}/{quad_id_vector_1}L15-{quad_id_1}.dbf
/{mosaic_name}/{quad_id_vector_1}/L15-{quad_id_1}.prj
/{mosaic_name}/{quad_id_vector_1}/L15-{quad_id_1}.shp
/{mosaic_name}/{quad_id_vector_1}/L15-{quad_id_1}.shx

{mosaic_name}/{quad_id_vector_2}L15-{quad_id_}.dbf
{mosaic_name}/{quad_id_vector_2}/L15-{quad_id_}.prj
{mosaic_name}/{quad_id_vector_2}/L15-{quad_id_}.shp
{mosaic_name}/{quad_id_vector_2}/L15-{quad_id_}.shx

Delivery Manifests

The contents of your order are described by a JSON manifest, which is delivered alongside your order. This manifest describes the locations of the order's delivered files with additional metadata, such as the size and a cryptographic hash of file contents.

Manifests should be used to learn specifically to which paths data will be delivered. While the file paths referenced in the manifest may be subject to change over time, the order's manifest will always be found at the root directory of where the order data is being delivered.

Its location is calculated by taking the provided path_prefix (if any) and appending the order_id, then "manifest.json". As an example, an order with ID 2284b95e-9e4a-4ab1-a88f-f49dd5f0d883 with a path prefix of "ordered_data/" would result in a manifest at the following key:

data/2284b95e-9e4a-4ab1-a88f-f49dd5f0d883/manifest.json

Sample manifest.json File

{
    "name": "",
    "files": [
        {
            "path": "PSScene/20151119_025740_0c74_metadata.json",
            "media_type": "application/json",
            "size": 747,
            "digests": {
                "md5": "03571ab27a19569f095e467a79b2a8d4",
                "sha256": "bc46e2196cd8d8114e62893ffaebae5bb50651ef91140641118fc468814b329c"
            },
            "annotations": {
                "planet/item_id": "20151119_025740_0c74",
                "planet/item_type": "PSScene"
            }
        },
        {
            "path": "PSScene/20151119_025740_0c74_3B_AnalyticMS.tif",
            "media_type": "image/tiff",
            "size": 94649460,
            "digests": {
                "md5": "35d48007de9d0671452ac789fbd6b9e4",
                "sha256": "58a00ec153c203c48cd2bab8ff8059555482aa9c9c66cfa1c90d7637aa893cb6"
            },
            "annotations": {
                "planet/asset_type": "ortho_analytic_4b",
                "planet/bundle_type": "analytic_udm2",
                "planet/item_id": "20151119_025740_0c74",
                "planet/item_type": "PSScene"
            }
        },
        {
            "path": "PSScene/20151119_025740_0c74_3B_AnalyticMS_metadata.xml",
            "media_type": "text/xml",
            "size": 10384,
            "digests": {
                "md5": "73bf083f08aec24f80fea51dfaceaea9",
                "sha256": "a89787f7b70a9ec3535637bbe5b5b9e229bcda98cb80dae95c84dc54e0444a89"
            },
            "annotations": {
                "planet/asset_type": "ortho_analytic_4b_xml",
                "planet/bundle_type": "analytic_udm2",
                "planet/item_id": "20151119_025740_0c74",
                "planet/item_type": "PSScene"
            }
        },
        {
            "path": "PSScene/20151119_025740_0c74_3B_udm2.tif",
            "media_type": "image/tiff",
            "size": 1652624,
            "digests": {
                "md5": "eb4effb691c370297b748f573169fb3f",
                "sha256": "0b762e81dde1d5be92bf9a39decd98073f5a53c4a6b82eb85176a9bd459f51c7"
            },
            "annotations": {
                "planet/asset_type": "ortho_udm2",
                "planet/bundle_type": "analytic_udm2",
                "planet/item_id": "20151119_025740_0c74",
                "planet/item_type": "PSScene"
            }
        }
    ]
}

To find your ordered assets, you may assume all of these paths are relative to the manifest.json file. The final location of assets in this example order include:

data/2284b95e-9e4a-4ab1-a88f-f49dd5f0d883/PSScene/20151119_025740_0c74_3B_AnalyticMS.tif
data/2284b95e-9e4a-4ab1-a88f-f49dd5f0d883/PSScene/20151119_025740_0c74_3B_AnalyticMS_metadata.xml
data/2284b95e-9e4a-4ab1-a88f-f49dd5f0d883/PSScene/20151119_025740_0c74_3B_udm2.tif
data/2284b95e-9e4a-4ab1-a88f-f49dd5f0d883/PSScene/20151119_025740_0c74_metadata.json

Why you should depend on the manifest file

The manifest.json file is the last file delivered for an order, once the order is fully complete.

Due to potential delay between the time when an order's files are delivered and when they are accessible for download, we recommend waiting for the manifest before you begin accessing files.

The metadata.json file

In addition to your requested assets, your order will include a metadata.json file. This is a copy of the item-level metadata associated with the asset from our catalog. The metadata.json file will appear in the manifest like other assets but will not have planet/bundle_type nor planet/asset_type annotations.

Sample metadata.json File

{
   "id":"20220304_093300_37_2430",
   "type":"Feature",
   "geometry":{
      "coordinates":[
         [
            [
               6.167210381911106,
               45.95660761074959
            ],
            [
               6.106906222592715,
               45.76425741356103
            ],
            [
               6.565372737977715,
               45.69159280834395
            ],
            [
               6.628858947551485,
               45.88187947653463
            ],
            [
               6.167210381911106,
               45.95660761074959
            ]
         ]
      ],
      "type":"Polygon"
   },
   "properties":{
      "acquired":"2022-03-04T09:33:00.375453Z",
      "anomalous_pixels":0,
      "clear_confidence_percent":87,
      "clear_percent":63,
      "cloud_cover":0,
      "cloud_percent":0,
      "ground_control":true,
      "gsd":4.1,
      "heavy_haze_percent":0,
      "instrument":"PSB.SD",
      "item_type":"PSScene",
      "light_haze_percent":0,
      "pixel_resolution":3,
      "provider":"planetscope",
      "ps4b_geometry":{
         "coordinates":[
            [
               [
                  6.167210381911106,
                  45.95660761074959
               ],
               [
                  6.106906222592715,
                  45.76425741356103
               ],
               [
                  6.565372737977715,
                  45.69159280834395
               ],
               [
                  6.628858947551485,
                  45.88187947653463
               ],
               [
                  6.167210381911106,
                  45.95660761074959
               ]
            ]
         ],
         "type":"Polygon"
      },
      "published":"2022-03-04T22:56:32Z",
      "publishing_stage":"finalized",
      "quality_category":"test",
      "satellite_azimuth":102.2,
      "satellite_id":"2430",
      "shadow_percent":2,
      "snow_ice_percent":34,
      "strip_id":"5455214",
      "sun_azimuth":141.5,
      "sun_elevation":30.3,
      "updated":"2022-03-12T02:38:49Z",
      "view_angle":5.1,
      "visible_confidence_percent":75,
      "visible_percent":100
   }
}

STAC Metadata

For scenes orders, you can also opt in to receiving additional metadata in the SpatioTemporal Asset Catalog (STAC) format.

STAC provides a standardized format for a wide range of geospatial information, including satellite imagery and accompanying assets.

Note

This is a beta feature available only for source_type scenes orders at this time. STAC is not available for source_type basemaps. The precise version of STAC and STAC extensions used may change as the specifications are finalized and our implementation is further developed. STAC is only available with standard delivery layout format. It is not supported for the legacy_deprecated layout format.

STAC files and structure

Each order contains:

  • A single STAC Catalog file at the root of the order that represents the entire order's contents. It contains references to each item type Collection in the order.
    • filename: catalog.json
  • A STAC Collection file for each item type in the order with references to each Item associated with that item type.
    • filename: <item_type>_collection.json
  • A STAC Item file for each Planet item in the order with an Asset link to each file associated with that Item.
    • filename: <item_id>.json

STAC files are provided as a self-contained catalog with relative links within the context of a specific order.

Example Request

To receive order links in the STAC format, add a metadata section with a stac field to the Create Order request.

{
    "name": "stac output",
    "products": [
        {
            "item_ids": [
                "20201127_075950_38_2262",
                "20210129_075502_95_2223"
            ],
            "item_type": "PSScene",
            "product_bundle": "analytic_udm2"
        }
    ],
    "metadata": {
        "stac": {
        }
    }
}

Delivery to Cloud Storage

You may choose to have your order delivered to either Amazon S3, Microsoft Azure Blob Storage, Google Cloud Storage, or Oracle Cloud Storage. For any cloud storage provider, you will need to create an account with both write and delete access.

Cloud Credential Security

When creating an order, a user must input their credentials for successful cloud delivery of Planet data. This poses a potential security risk. For secure handling of cloud service credentials in the request, please ensure that access is limited to the desired delivery path with no read/write access for any other storage locations or cloud services.

Delivery to Amazon S3

For Amazon S3 delivery you will need an AWS account with GetObject, PutObject, and DeleteObject permissions.

Parameters

  • aws_access_key_id (required): AWS credentials.
  • aws_secret_access_key (required): AWS credentials.
  • bucket (required): The name of the bucket that will receive the order output.
  • aws_region (required): The region where the bucket lives in AWS.
  • path_prefix (optional): An optional string that will be prepended to the files delivered to the bucket. A slash (/) character will be treated as a "folder". Any other characters will be added as a prefix to the files.

Example Request

{  
   "name": "amazon_s3_delivery_order",
   "products": [
      {  
         "item_ids": [  
            "20151119_025740_0c74",
            "20151119_025741_0c74"
         ],
         "item_type":"PSScene",
         "product_bundle":"analytic_udm2"
      }
   ],
   "delivery": {  
      "amazon_s3": {  
         "bucket": "foo-bucket",
         "aws_region": "us-east-2",
         "aws_access_key_id": "",
         "aws_secret_access_key": "",
         "path_prefix": "folder1/prefix/"
      }
   }

The path_prefix specified above will produce a result in S3 which looks like the following:

/folder1/prefix/{order_id}}/320170716_144316_1041_3B_AnalyticMS.tif

Delivery to Microsoft Azure

For Microsoft Azure delivery you will need an Azure account with read, write, delete, and list permissions.

Parameters

  • account (required): Azure account name.
  • container (required): The name of the container which will receive the order output.
  • sas_token (required): Azure Shared Access Signature token. Token should be specified with a leading '?' (i.e. "?sv=2017-04-17u0026si=writersr=cu0026sig=LGqc").
  • storage_endpoint_suffix (optional): To deliver your order to a sovereign cloud a storage_endpoint_suffix should be set appropriately for your cloud. The default is "core.windows.net".
  • path_prefix (optional): String that will be prepended to the files delivered to the bucket. A slash (/) character will be treated as a "folder"; other characters will be a prefix to the files.

Example Request

{  
   "name": "azure_delivery_order",
   "products":[  
      {  
         "item_ids": [  
            "20151119_025740_0c74",
            "20151119_025741_0c74"
         ],
         "item_type":"PSScene",
         "product_bundle":"analytic_udm2"
      }
   ],
   "delivery":{  
      "azure_blob_storage":{  
         "account": "accountname",
         "container": "containername",
         "sas_token": "?sv=2017-04-17u0026si=writersr=cu0026sig=LGqc",
         "storage_endpoint_suffix": "core.windows.net",
         "path_prefix": "myprefix/"
      }
   }
}

Delivery to Google Cloud Storage

For Google Cloud Storage delivery, you need an account with write and delete permissions. For instance, you may have set up a service account to handle calls to Planet APIs. When you did so, you would have also generated and downloaded a JSON file with that service agent’s credentials. Also, you would have assigned a role to the service account—or you would have created a custom role—that gives the service agent permissions to write to your Google Cloud Storage bucket, for example storage.objects.create, storage.objects.get, and storage.objects.delete permissions.

If you have such an account set up and assigned a role with the right permissions, you can then use that service agent JSON credentials file, base64-encode it, and include that output as the credentials, below. As noted above, access should be limited to the desired delivery path with no read/write access for any other storage locations or cloud services.

Preparing Your Google Cloud Storage Credentials

The Google Cloud Storage delivery option requires a single-line base64 version of your service account credentials for use by the credentials parameter.

Download your service account credentials in JSON format (not P12) and encode them as a base64 string with a command line operation such as:

cat api_service_agent_creds.json | base64 | tr -d '\n'

Parameters

  • credentials (required): GCS credentials.
  • bucket (required): The name of the GCS bucket which will receive the order output.
  • path_prefix (optional): String that will be prepended to the files delivered to the bucket. A slash (/) character will be treated as a "folder"; other characters will be a prefix to the files.

Example Request

{
   "name":"gcs_delivery_order",
   "products": [  
      {  
         "item_ids": [  
            "20151119_025740_0c74",
            "20151119_025741_0c74"
         ],
         "item_type":"PSScene",
         "product_bundle":"analytic_udm2"
      }
    ],
    "delivery": {
        "google_cloud_storage": {
            "bucket":"[your-orders-delivery-bucket]",
            "credentials":"[base64-encoded-credentials]",
            "path_prefix":"[optionalsubfolder/]"
        }
    }
}

Delivery to Oracle Cloud Storage

For Oracle Cloud Storage delivery you need an Oracle account with read, write, and delete permissions. For authentication you need a Customer Secret Key which consists of an Access Key/Secret Key pair.

Parameters

  • customer_access_key_id (required): Customer Secret Key credentials.
  • customer_secret_key (required): Customer Secret Key credentials.
  • bucket (required): The name of the bucket that will receive the order output.
  • region (required): The region where the bucket lives in Oracle.
  • namespace (required): Object Storage namespace name.
  • path_prefix (optional): An optional string that will be prepended to the files delivered to the bucket. A slash (/) character is treated as a "folder". A slash will be added to the end of the path_prefix if not already provided.

Example Request

{
   "name": "oracle_delivery_order",
   "products": [
      {
         "item_ids": [
            "20151119_025740_0c74",
            "20151119_025740_0c74"
         ],
         "item_type":"PSScene",
         "product_bundle":"analytic_udm2"
      }
   ],
   "delivery": {
      "oracle_cloud_storage": {
         "bucket": "foo-bucket",
         "namespace": "ORACLE_NAMESPACE",
         "region": "us-sanjose-1",
         "customer_access_key_id": "YOUR_ACCESS_ID",
         "customer_secret_key": "YOUR_SECRET_KEY",
         "path_prefix": "folder1/prefix/"
      }
   }
}

Zipping results

With the zip delivery option, you can receive the output of your order as a "per order" or "per bundle" zip archive.

Parameters

  • archive_type (optional): Only zip format is supported.
  • archive_filename (optional): The name of the archive file you will receive. You can use template variables {{name}} and {{order_id}} and in the string, which vary based on whether the order is per-bundle or per-order (i.e. single_archive) and are described in more detail below.
  • single_archive (optional): When true, this option will archive all bundles together in a single file.

Per-Bundle Zipping

For per-bundle zipping (i.e. when single_archive is null or false), the archive filename variable {{name}} will return {item_typeitem_idproduct_bundle} and {{order_id}} will return the order_id.

Example Request

{  
   "name": "per-bundle-zipped-order",
   "products": [  
      {  
         "item_ids": [  
            "20151119_025740_0c74",
            "20151119_025741_0c74"
         ],
         "item_type":"PSScene",
         "product_bundle":"analytic_udm2"
      }
   ],
   "delivery": {  
      "archive_type": "zip",
      "archive_filename": "{{name}}_{{order_id}}.zip"
   }
}

Output files (order_id = 68b2e5c0-aaf0-49cb-b5a8-13a96083dd41):

68b2e5c0-aaf0-49cb-b5a8-13a96083dd41/PSScene_20151119_025741_0c74_analytic_68b2e5c0-aaf0-49cb-b5a8-13a96083dd41.zip
68b2e5c0-aaf0-49cb-b5a8-13a96083dd41/PSScene_20151119_025740_0c74_analytic_68b2e5c0-aaf0-49cb-b5a8-13a96083dd41.zip
68b2e5c0-aaf0-49cb-b5a8-13a96083dd41/manifest.json

Whole-Order Zipping

For per-order zipping (i.e. when single_archive is true), the archive filename variable {{name}} will list the order name and {{order_id}} will list the order_id.

Example Request

{  
   "name": "per-order-zipped-order",
   "products": [  
      {  
         "item_ids": [  
            "20151119_025740_0c74",
            "20151119_025741_0c74"
         ],
         "item_type":"PSScene",
         "product_bundle":"analytic_udm2"
      }
   ],
   "delivery":{
      "archive_type": "zip",
      "single_archive": true,
      "archive_filename": "{{name}}_{{order_id}}.zip"
   }
}

Output files (order_id = 1b36c36c-8965-4e6f-9eef-ee9694f3d69c):

1b36c36c-8965-4e6f-9eef-ee9694f3d69c/per-order-zipped-order_1b36c36c-8965-4e6f-9eef-ee9694f3d69c.zip
1b36c36c-8965-4e6f-9eef-ee9694f3d69c/manifest.json


Rate this guide: