Tools

last updated: August 26, 2021

The Subscriptions API supports select raster processing tools which can be applied to imagery before delivery to reduce time spent in data post-processing.

Tools Schema

The schema for Subscriptions API tools is below. Note that this schema varies slightly different from the tools schema of the Orders API.

"tools": [
    {
        "type": "tool-name",
        "parameters": {
            "parameter-1-name": "p1-value",
            "parameter-2-name": "p2-value"
        }
    }  
]

Supported Tools

Clip

The clip tool allows you to clip a scene to a specified area of interest (polygon or multipolygon) to limit your storage costs. clip may also be used as a billing management tool, depending on the Raster Tools Plan you’ve purchased.

Product Inputs

The clip tool supports all item types except SkySatVideo and all asset types except for non-orthorectified, basic_* asset types.

Tool Outputs

Imagery and udm files will be clipped to your area of interest. nodata pixels will be preserved. Xml file attributes “filename”, “numRows”, “numColumns” and “footprint” will be updated based on the clip results.

The clipped output files will have “_clip” appended to their file names. If the clip aoi is so large that full scenes may be delivered without any clipping, those files will not have “_clip” appended to their file name.

Note: There may sometimes be discrepancies between an item’s footprint and the area of its usable pixels. When clipping, this can result in a clipped aoi which does not intersect with any usable pixels of an image. In this circumstance, no imagery file will be delivered while auxiliary assets will continue to be delivered.

Parameters

  • aoi (dict): GeoJSON polygon or multipolygon defining the clip area, with up to 500 vertices

Example Request

"tools": [
    {
        "type": "clip",
        "parameters": {
            "aoi": {
                "type": "Polygon",
                "coordinates": [
                    [
                        -163.828125,
                        -44.59046718130883
                    ],
                    [
                        181.7578125,
                        -44.59046718130883
                    ],
                    [
                        181.7578125,
                        78.42019327591201
                    ],
                    [
                        -163.828125,
                        78.42019327591201
                    ],
                    [
                        -163.828125,
                        -44.59046718130883
                    ]
                ]
            }
        }
    }  
]

Reproject

The reproject tool allows you to reproject, resample, and rescale imagery products to a new projected coordinate system and resolution.

Product Inputs

The reproject tool supports all item types and all bundle types except for those with non-orthorectified images (basic_* bundles).

Tool Outputs

One imagery output file reprojected to the target configuration is produced for each product bundle. Udm files are also reprojected to the target configuration. These file outputs will have “_reproject” appended to their file names.

Parameters

  • projection (string): A coordinate system in the form EPSG:n (ex. EPSG:4326 for WGS84, EPSG:32611 for UTM 11 North (WGS84), or EPSG:3857 for Web Mercator). This parameter is case sensitive.
  • resolution (float): The pixel width and height in the output file. If not provided, it will default to the resolution of the input item. This value will be in meters unless the coordinate system is geographic (like EPSG:4326), then it will be a pixel size in decimal degrees.
  • kernel (string): The resampling kernel used. If not provided, it will default to "near". Udm files will always use "near". This parameter also supports "bilinear", "cubic", "cubicspline", "lanczos", "average" and "mode" (see the gdalwarp "resampling_method" docs for details). This parameter is not case sensitive.

Example

"tools": [
  {
    "type": "reproject",
    "parameters": {
      "projection": "EPSG:4326",
      "kernel": "near"
    }
  }
]