Extract pixel values

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.

Did you read this,

Use pins to export pixel values, Source of the post

With regards to coordinates you could export each pin coordinate as well,

Yes I read. I have about 1000 pixels. You mean to pin each pixel and extract the values and coordinates of them? Isn’t this a bit time consuming?

you can also digitize a polygon and then right-click > export transect pixels > write to file



This gives you a table with pixel coordinates and values, line by line

If you have a subset of your area, you could export the whole image as CSV: File/Export/CSV.
You will have a text file with all the information of every pixel in your image in table format.

Thanks. I checked this, I have about 1000 pixels but here it shows me 124 pixels

and its output file is not very usable

Thanks, I exported CSV, but output file haven’t any coordinate and pixel pixel value

Have you selected “Write to file“?

If so, could you please share the txt file in here?

S2A_MSIL2A_20180911T073611_N9999_R092_T38SPH_20190902T180719_resampled_msk_TRANSECT.txt (9.5 KB)

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)


File > Save Product



Thanks for your attention. Solved.:pray::pray: