I cannot subset my images that from ecmwf

hello everyone,
I use snap 5.0 in python and ui,and my computer system is macos with 16G memories.
I downloaded some wind product from ecmwf, like this,

I want to subset it.
I first used python to do it, the code is flowing,

files = ProductIO.readProduct(’./12.dim’)
w = “POLYGON((-72.80000305175781 42.89230728149414, -54.93846130371094 42.89230728149414, -54.93846130371094 26.69230842590332, -72.80000305175781 26.69230842590332, -72.80000305175781 42.89230728149414, -72.80000305175781 42.89230728149414))”
wkt = wktreader()
geometries = wkt.read(w)
subop = subsetop()
dd = subop.getTargetProduct()

ProductIO.writeProduct(dd, ‘13’,‘BEAM-DIMAP’)

the position of the polygon and the image has the relation in flowing:

there is no error, and I got the target file.
Importance, there are no bands. In other words, I got the file, but without images.
I tried some else files, like images from st1-A. The code work out.
I find some answer in forum, like this,http://forum.step.esa.int/t/snappy-subsetting-problems-for-s3a-data/5770/5?u=ycangus.it didn’t work. When I don’t set the parameter ‘setRegion’, I can get all images.

After that, I tried the snap ui.
When I click subset, there is no response.

Then , I built a graph in snap ui.
there is some problem, when I subset in graph with pixel, it can works. But when I subset in geographic, I can’t get the file without any error.

dose anyone give me a help,
waiting online,
Thanks sincerely,

is it possible that your image is geocoded in a different coordinate reference system? If it was UTM, for example, none of the coordinates of your subset would lie within the raster.

I see that you set obj but you read the product and set it to file.
Maybe you just need to set file as source product.

Region should be okay. Even if the product is in UTM they are mapped to the UTM coordinates.

1 Like

I’m sorry for the copy error, the obj has been replaced by files in my code.

I find the geo-lon is in the range 280E to 320E. Should I change the range into -180 to 180. Another problem, how can I change the value?

Thank you very much, I’ve got the results.

Thanks for everyone, the reason is that the longitude should be in the range -180 to 180. Just change that