Subset doesn't crop images properly

I’m working in SNAP 5.0 with Landsat 8 images. When I try to crop an image using Subset, the result I get has different geographical coordinates than I used, therefore shows a different area. How can I get it to work properly?

How exactly are they different ? Perhaps you could post the coordinates of your original image (you can see them in the Subset operator box in the Geo Coordinates tab like on the attached image), as well as the coordinates of the subset you want. How are you doing the subset, are you using the Geo Coordinates tab ?

Okay, so I’m using the Geo Coordinates tab in Subset. Here are the coordinates I’m putting (besides the Subset window I put them in degrees, minutes and seconds for you to clearly see the difference):

And here is what I’m getting:

Does the preview in the Subset window correspond to the area you want ?
You could compare the Geo-Coding details (the rest of the window you captured) of the two products (before and after subset), maybe it’s a question of projection.

Yes, the preview shows roughly my area of interest.
I looked through the Geo-Coding details and all of it looks the same in both images except PARAMETER “elt_0_2” and PARAMETER “elt_1_2”. I don’t know what they are but I suppose they have to be different? Other than that, every parameter, value and text is the same.

I tried to crop this image to a different area, and every time this problem occurs. In other cases the preview doesn’t always correspond to the chosen area.

The preview should show exactly your area of interest (if by area of interest you mean the subset you’re trying to create). Does the preview always match the result ? If you use the preview box to reproduce your area of interest instead of writing in coordinates, does the result match your area of interest ?

When I put the geo coordinates manually, the preview shows exactly the area that I want, but the result is a different area, shifted to the right (my area is near the left corner of the band image and the output I get is somewhere near the right corner of band image).

When I use preview box to draw my area instead of writing in coordinates, the same thing happens: preview is obviously correct, because I’ve drawn the rectangular myself, but the result is a different area.

I’ve also tried to use Spatial Subset from View. This time the preview showed area located partially outside the band image (which was wrong because I zoomed in the view somewhere near the center) but the output looked like I wanted it to - it showed the area I zoomed into earlier. However, geo coordinates displayed in Subset didn’t match the ones in the image.

If you need me to make detailed screenshots, I can do that tomorrow morning (now it’s late evening where I live). Thank you for your interest and time, I appreciate it!

I’ve exhausted all ideas, I’m sorry… I hope one of the developers stops by your post. I guess I’d try saving the original product you read to BEAM-DIMAP and then reading this product to subset to see if you get the same bug. Another idea, although it’s a longshot : is the image flipped ? Are the features in the subset mirrored compared to the original ? I only mention this because you say your target area is on the far left but the result is on the right.

Saving it as a BEAM-DIMAP helped! This time the preview didn’t match the area but the result has the coordinates I put in Subset (the difference was max 0.002 degree). Thank you so much for the help! :slight_smile:

By the way, the incorrect image wasn’t mirrored compared to the original, it was just on the other side of the band image I was trying to crop.

Actually I noticed that the problems happens only for Landsat 8 data, Sentinel 2 is okay. Maybe it has something to do with the rotation of the image? I don’t know if I can explain this right but you can see in my previous screenshots that Landsat image is turned 45 degrees, while S2 images are more straight, because they are cut into smaller granules.

I think in Landsat 8 type of scenes there is a problem with linking the coordinates from the image to the Subset tool, or sometimes the image and preview coordinates.

Anyway, your idea worked. Thanks again!

1 Like

Could you please tell me the step that you have followed to solve the problem?
I have the same issue:
I subset an image inserting the geo coordinates of a city, but at the end when I export the final file in google eart, I have not that city but only a part of it (moved to the left).
I have tried to do what have you done but the problem persists.
Maybe I have not understood what I have to do.
have a nice day.