Cannot create subset with snappy

Hi,
I am new to the snappy library and I could not find any helpful documentation regarding my problem.
My problem is following: I can’t manage to create a subset with following code, although I have seen this approach in the internet several times already, but in my case I get a warning message (below the code), resulting that my subset cant be created.

from snappy import ProductIO
from snappy import jpy

path = ‘MER_FRS_2PPBCM20020602_152647_000000592006_00283_01339_0002.N1’
product = ProductIO.readProduct(path)

SubsetOp = jpy.get_type(‘org.esa.snap.core.gpf.common.SubsetOp’)
WKTReader = jpy.get_type(‘com.vividsolutions.jts.io.WKTReader’)
wkt = ‘POLYGON((72.7083453089 -65.804099946, 71.7118430585 -64.7052231235, 71.982073769 -61.8437412417, 72.9904736876 -62.7934148188, 72.7083453089 -65.804099946))’

geom = WKTReader().read(wkt)
op = SubsetOp()
op.setSourceProduct(product)
op.setGeoRegion(geom)
sub_product = op.getTargetProduct()

Running this code gives me following warning message:
WARNING: org.esa.snap.core.gpf.common.SubsetOp: No intersection with source product boundary MER_FRS_2PPBCM20020602_152647_000000592006_00283_01339_0002.N1

EDIT:
those coordinates are within the picture, but still same problem:
wkt = ‘POLYGON((41.405050 -74.640404, 41.405050 -71.508210, 39.855295 -71.508210, 39.855295 -74.640404, 41.405050 -74.640404))’

1 Like

The error is saying that the coordinates given and the product don’t overlap. Double check that the coordinates are given correctly in lon lat order
These look like they are in the ocean off Antarctica

1 Like

Hi lveci,
I just have realized that I posted the wrong coordinates.
Those should be within the picture:
wkt = ‘POLYGON((41.405050 -74.640404, 41.405050 -71.508210, 39.855295 -71.508210, 39.855295 -74.640404, 41.405050 -74.640404))’

But it still does’nt work

OK, I just realized that I accidentally used the wrong order (lat lon). Now it works!
So it has to be following instead:
wkt = ‘POLYGON((-74.640404 41.405050, -71.508210 41.405050, -71.508210 39.855295, -74.640404 39.855295, -74.640404 41.405050))’

Thank you very much, lveci!

I am trying to subset after interferogram generation. I know for sure that the points are within the image, but I am getting no intersection. what could this be?
I am using SLC image and following standard procedure mentioned here

Is the problem associated with one of the previous steps. I am doing subsetting after Goldstein phase filtering.

Thanks