How to subset an image in the graph builder?

This might sound like a trivial question, but I can’t seem to find a solution. I’m trying to subset S1A files over a given region. This perfectly works when clicking Raster > Subset… from the menu. However, if I want to do this in batch mode using a graph, how can handle this subsetting? I cannot find the subsetting module in the graph builder. What am I missing?

Thanks,
Kristof

I used it several times for the generation of subsets over many images. You can find it under
Add > Raster > Geometric > Subset

It is important that you are clear about the difference between pixel coordinates and geographic coordinates.
Pixel coordinates are tricky in the batch mode because you likely have shifts between different images, especially when using data of different tracks. Geographic coordinates are good but as long as your data is unprojected (if you want to subset SLC products) the geolocation may also shift a little bit. So don’t choose a too narrow subset window.

1 Like

My god, how did I overlook this…
I’m working with geographic lat/lon and S1 GRDH files, so I guess that should work. Let’s try right away, thanks!

Actually, still running into problems. I found the module now, but I can’t get it to work. In the stand-alone module (outside graph), I can just specify border lat/lon coordinates and that works. I’m not able to enter these in the graph builder apparently. Trying to draw a ROI on the map results in an error:

Not sure what I’m doing wrong?

you are right. I get the same error now.
I didn’t get it because I digitized a polygon in QGIS, took the WKT code of it (with the getwkt plugin) and copied it directly in the empty line in snap.

You can also completely do this in SNAP: Digitize a new vector with the boundaries you need. If you then double-click it see get its WKT code. It can be copied to the clipboard and then inserted in the subset module. Click “Update” subsequently and the yellow area changes.

Step 1:

Step 2:

Once you save the xml of the graph you can leave it like that.

4 Likes

Perfect, I got it working that way, thank you!

I am not quite sure if it is my mistake but if I copy from geometry to subset graph builder polygon like this and update it:

POLYGON ((20795.6875 6103.138671875, 20616.173828125 6103.138671875, 20616.173828125 6875.80419921875, 20795.6875 6875.80419921875, 20795.6875 6103.138671875, 20795.6875 6103.138671875))

Then process is completed in 0 seconds and no file si created. I’ve never worked with polygon coordinates, so can someone help me? Thx!

1 Like

It seems that your product on which you have created the polygon has no geo-coding information. Because the point do look like pixel coordinates or is it UTM?
Within the polygon geometry you should use WGS84 lat/lon values.

What product are you using? Which type of coordinates? Those are not geographic coordinates.

I am using raw Sentinel-1 GRD and I’ve created geometry by Rectangle drawing tool on opened scene of Amplitude VH (but whatever - this is not probably important). Then, I’ve opened in product overview by double-click and righ-clicked and copied to clipboard… Paste into the command line of subset and deleted style_css which was also copied (probably bug)

Actually I’ve done something similar to this… youtube.com/watch?v=nmpsHKOgTiw

So should I copy the coordinates from QGIS? Or is it possbile from Snap?

You could find the geographic coordinates of your area and paste them in the subset option:
https://arthur-e.github.io/Wicket/sandbox-gmaps3.html

From SNAP is also possible if your draw the polygon, select it and with the right click over the polygon you open the WKT from geometry option.

1 Like

Great hints! Thanks