The clip
tool allows users to 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 500 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
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 the 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 1500 vertices will be rejected.
- Clipping outside of the contract AOI may result in a rejected order.
Comments
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?
Article is closed for comments.