Skip to main content
Solved

How to clip mulipolygon?

  • July 25, 2022
  • 2 replies
  • 485 views

elyhienrich
Community Manager 🌎
Forum|alt.badge.img+17

This question was originally asked July 18, 2022 06:55 by user Timur Myrzagaliev

I have around 3000 AOI distributed over the region. Instead of clipping one by one, I want to clip multiple AOI together if they have the same scene. For example, I have scene id X and 10 AOI's that lies within this scene?  

"tools": [    {        "clip": {            "aoi": {                "type": "Polygon",                "coordinates": [                    object_coors                ]            }        }    }]

Should I change the type to Multipolygon and give coordinates or should something different be written? 

The second question is, can I give the list of scene ids and all coordinates that intersect with these scenes? Will this work? For sure, i will not exceed 500 vertices limit

Best answer by elyhienrich

Julia Sauerbrey replied on July 18, 2022 07:00.

 

Hi Timur!

The clipping tool is compatible with MultiPolygon jsons so you can go ahead and try this method! As you're aware, there is a 500 vertices limit, so as long as you don't surpass this, your MultiPolygon should go through perfectly fine. Yes, you can give a list of scene ids and clip it with a MultiPolygon file that intersects with those scenes.

Kindly keep in mind that if you use a MultiPolygon json and products in your list of scene ids won't intersect with it, you will receive an error message as you're then trying to clip a product with an AOI that doesn't intersect.

2 replies

elyhienrich
Community Manager 🌎
Forum|alt.badge.img+17
  • Author
  • Community Manager 🌎
  • 651 posts replied to
  • Answer
  • July 25, 2022

Julia Sauerbrey replied on July 18, 2022 07:00.

 

Hi Timur!

The clipping tool is compatible with MultiPolygon jsons so you can go ahead and try this method! As you're aware, there is a 500 vertices limit, so as long as you don't surpass this, your MultiPolygon should go through perfectly fine. Yes, you can give a list of scene ids and clip it with a MultiPolygon file that intersects with those scenes.

Kindly keep in mind that if you use a MultiPolygon json and products in your list of scene ids won't intersect with it, you will receive an error message as you're then trying to clip a product with an AOI that doesn't intersect.


deanesh.ramsewak
Forum|alt.badge.img+4
  • 🌲🌲🌲🌲
  • 212 posts replied to
  • December 3, 2022

Good to know.