Region of interest (ROI)

Ahh it can be… Actually I’am working with a stack of radar and optical images. They have been stacked together with the same resolution and projection but maybe something is still not align (??)

Hard to say without having the data at hand. Actually images should be of same size if you have collocated them. However, you can try another way. Create a subset of you data which contains only the ROI and then export this subset product. Use Export/CSV from the menu. Make sure to select the subset product in the product explorer before exporting it.

Hi marpet, thank you again for your answer. It is actually working making a subset. Just to describe better the situation: I derived the stack from gdal and saved it in envi format (the stack has 93 bands). If I try to export a the pixels of a mask (after doing the workaround of opening another view) I get the error message: pixels cannot be export: pos < flushedPos! If I do a subset and then export I still get the same error unless I reboot snap I do the subset and then the export of the mask (still with the workaround)… Hope it can help!

Hi @marpet
I am working on a sentinel 1 product, I have a subset of the displacement (After doing interferometry) and now want to export pixels values of my ROI (a polygon), the process is working fine but it takes hours to write the exported pixels to a .txt file. like the current operation is running for almost 4 hours.
I have a multi core work station, is there any way to allocate more processing resources to this operation to increase the speed.

Unfortunately it is not possible to enhance this operation.
How much data are you exporting? How many bands and how many pixels (roughly)?

When I run the “Export Mask Pixels” utility it shows me roughly 5.7 million pixels, please see attached sample file with 20 pixels. I am interested to export a single band i.e. “20150213_Select_pxl_disp” in the attached, but I am also getting the “displacement” band values as well.

Thanks and Regards20150213 - Copy.txt (1.4 KB)

Ar you doing the export directly after doing the interferometry without saving the result first?
Maybe it is the interferometry what takes so long and not the pixel export.

i have a training data file of a region which i want to clip from a pixel. how should i procees?

In which format is your training data file? Can you already open it?
You just want to extract a single pixel?

Right-click on the specific pixel and select Copy Pixel-Info to Clipboard.

Or use the PixEx tool from the menu: Raster / Export / Extract Pixel Values

the training file is in csv format

sir, actually i am new to snap.i have downloaded the image and i cant open it it in the xml format.
so i dragged down the complete zip folder
i wanted to apply the basic corrections but i couldnt do that as well due to the error
secondly i couldnt clipp the required area off from the single image. kindly help me

So maybe you can use: (File / Import / Vector Data / Vector from CSV)
Please see also the corresponding section in the help.

it isnt working here

sorry sir. but tell me in brief how should i approach

It doesn’t probably work because your CSV format is not what SNAP expects. The expected format is written in the help.

The interferometry results were already saved, now I think I have figured out the probelm, my interferometry data was stored on a network drive and thats what I guess was taking it too long to process the pixel export. When i copy the data to the local drive then it finishes rather quickly.
Thanks alot for your insight


i have incorporated the sh[ fie into the img
now i m not getting how should i clip the rest of area which isny in my interest

If you see the shape area as a mask band in your product, you could theoretically multiply the mask with your image in order to make all non-shape pixels zero.

Right click on the band in the Product View and select Properties. Set as Valid-Pixel Expression the geometry which has been created based on your shape file or modify the existing one.

If you use the Export Mask Pixels, mentioned earlier in this thread you just have to select the mask corresponding to your shapefile.

I see this is still an unresolved issue in JIRA. I have the same problem, grey option in the menu for „Export mask pixels”. I’ve already created a subset, which works fine, but it still does not let me export mask pixels. I’ve also tried the workaround specified in the issue…not working. Any other ideas, besides trying to open the product in a different software?