Intersection between geoJson and product

Hello marpet,

I have a question. I need to obtained intersection zone between an area saved in a .geojson file versus a sentinel 1 product using snappy python.

The file .geojson has the polygon, how I can obtained first the image polygon? and second, how I can obtain the intersection between both images or zones?

Do you have any idea?

Thanks marpet

Geojson is not supported by by SNAP, but you can convert it to a WKT (https://mygeodata.cloud/converter/geojson-to-wkt).

You can use this WKT with the subset operator. Here is an example.


Instead of specifying the WKT in the code you can read it from a file.