Example payload for using the clip tool

The clip tool lets you clip a scene to a specified area of interest (polygon or multipolygon) to limit storage costs. clip may also be used as a billing management tool, depending on the Raster Tools Plan  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 1500 vertices. The minimum geographic area of any polygon or internal ring is one square meter.
{
  "name": "clip_example",
  "source_type": "scenes",
  "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

When you clip an AOI with GeoJSON, be aware of the multipolygon limitations below so the order succeeds. 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 the order being rejected. The following geometries are invalid and will result in unsuccessful orders:

  • GeoJSON Polygons with holes first are rejected.
  • GeoJSON Polygons with multiple exterior rings are rejected.
  • GeoJSON MultiPolygons with overlapping/intersecting Polygons are 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 1500 vertices is rejected.
  • Clipping outside of your contractual Area of Access (AOA) may result in a rejected order.
Was this article helpful?
3 out of 3 found this helpful

Comments

1 comment
  • I don't need a specific id_item , but I need all the images that are between x and y dates and has no cloud cover. Do you have any suggestion how to do it?

    0

Article is closed for comments.