I want to extract the values of all the pixels within my study area and their coordinates, what is the best way to do this?
I read the help and the topics related to this question, but I couldn’t export properly
Thanks to the SNAP team for their quick and continuous response.
Now I understand. I suggested “Export Transect Pixels” which only exports the pixels along the polygone line.
To have the full area, “Export Mask Pixels” is required. This is inactive until you save the product (after digitizing the polygon)
I was trying to expert backscatter coefficient and incident angle from my study area scene using this method but “Export Mask Pixels” option is marked as grey that i am unable to select that, even after saving the product. Please help me to export my pixel values as .CSV file.
Thank you marpet, I did try the method, and it works and the file format is .txt, but I need the pixel values in .CSV format. So is there any option there to extract pixel values with my desired file format?
You can simply exchange the file ending. CSV is just a special type of a text file. The content is tab separated.
Alternatively you can go to the menu at File / Export / CSV. In the file dialog you click on the subset button and select the are you want. Then save the file to disk. This will be a bit different format. But it is also CSV and it has this file ending.
For details of this format, please have a look at the help:
When you export as CSV your NaN values will appear as blanks. I am not able to see in your screenshot if you have values later on the file (you have more than 3000 rows). A fast solution would be to convert you .txt into .csv in Excel. In any case, both formats can be tab separated, if that is what you need.