Example payload for using the clip tool

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.

 

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

  • aoi (dict): GeoJSON polygon or multipolygon defining the clip area, with up to 500 vertices. The minimum geographic area of any polygon or internal ring is one square meter.
{
  "name": "clip_example",
  "products": [
    {
      "item_ids": [
        "20201129_150531_19_1065"
      ],
      "item_type": "PSScene",
      "product_bundle": "analytic_sr_udm2"
    }
  ],
  "tools": [
    {
      "clip": {
        "aoi": {
          "type": "Polygon",
          "coordinates": [
            [
              [
                -71.42186164855957,
                41.830816472727356
              ],
              [
                -71.41611099243164,
                41.812267143599804
              ],
              [
                -71.39302253723143,
                41.821862295060974
              ],
              [
                -71.39920234680176,
                41.83363038420449
              ],
              [
                -71.42186164855957,
                41.830816472727356
              ]
            ]
          ]
        }
      }
    }
  ]
}

 

AOI geometry limits

While clipping an AOI with GeoJSON, users should be aware of multipolygon limitation for successful order creation. The python-geojson and python-shapely validation process involved in passing an AOI to the clip tool, as well as Orders v2 limitations, may flag validation errors that result in your order being rejected. The following geometries are invalid and will result in unsuccessful orders:

  • GeoJSON Polygons with holes first will be rejected.
  • GeoJSON Polygons with multiple exterior rings will be rejected.
  • GeoJSON MultiPolygons with overlapping/intersecting Polygons will be rejected. The GeoJSON spec technically allows this, but is generally invalid geometry in many programs (PostGIS, Shapely, QGIS to name a few).
  • GeoJSON containing more than 500 vertices will be rejected.
  • Clipping outside of the contract AOI may result in a rejected order.
Was this article helpful?
2 out of 2 found this helpful

Comments

0 comments

Please sign in to leave a comment.